Repository navigation
Conversation
Add a machine code optimization setting to the JIT and AOT APIs and expose it as --llvm_codegen_opt_level in eval_proc_main. Default to LLVM's backend level 2. At LLVM IR O1, lowering the backend level from 2 to 0 cut median block JIT compile time for a local block JIT benchmark from 2.15 s to 1.56 s (27%). Execution rose from 21.8 to 40.8 ms per 10,000 calls.
|
Ok this seems mostly fine but can we maybe instead just have 'opt_level' control both the opt level and codegen_opt_level. I honestly can't think of many situations where I wouldn't want these to be identical. That seems like it would be a much simpler change. |
|
I was thinking that having more granular controls would be better, as it would allow us to isolate and diagnose issues more easily. I'm also planning to continue my research into JIT compilation performance, so keeping the keys separate would give us a bit more flexibility. What do you think? |
|
I guess maybe. For now can we just split this into two where the first CL just controls both with the single --llvm_opt_level flag. For the second give 3 flags --llvm_middle_end_opt_level for current opt_level, --llvm_codegen_opt_level for this stuff and --llvm_opt_level which sets the default value for the other two. This flag is mostly just a control for running things faster. I don't think we really care too much about debugging llvm internals using this. |
Add a machine code optimization setting to the JIT and AOT APIs and expose it as --llvm_codegen_opt_level in eval_proc_main. Default to LLVM's backend level 2.
At LLVM IR O1, lowering the backend level from 2 to 0 cut median block JIT compile time for a local block JIT benchmark from 2.15 s to 1.56 s (27%). Execution rose from 21.8 to 40.8 ms per 10,000 calls.