[llvm-dev] Selecting optimization passes in the JIT
Lang Hames via llvm-dev
llvm-dev at lists.llvm.org
Thu May 12 11:52:25 PDT 2016
LLVM's JIT libraries (ORC and MCJIT) do not run IR level optimizations in
their default configurations. Running IR passes is left for the client to
do before they add the IR to the JIT. The optimization level passed to LLI
(and passed from there to EngineBuilder::setOptLevel) only controls the
So assuming you're running LLI (or something like it) you're free to run
any IR passes you like using opt before you invoke LLI to run the IR.
If you're interested in manually specifying which CodeGen passes to run
this is also possible, but more involved. Let me know if you would like
help with this.
On Wed, May 11, 2016 at 7:17 AM, Nemanja Ivanovic via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> When trying to narrow down which pass causes a failure with the static
> compiler, I will often produce an IR file that I will pass to the "opt"
> tool and enable/disable passes until I spot which pass causes the issue.
> I am wondering how I might do that with the JIT. I don't know much about
> the JIT or the application that is using it, but as far as I can tell, the
> application sets up the JIT with an optimization level (i.e. -O2) and uses
> it. What I'd like to do instead is manually specify which passes are to be
> run (much like I do with opt).
> Thanks for your help,
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev