<div dir="ltr">Hi Nemanja,<div><br></div><div>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 CodeGen optimizations.</div><div><br></div><div>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.</div><div><br></div><div>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. </div><div><br></div><div>Cheers,</div><div>Lang.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 11, 2016 at 7:17 AM, Nemanja Ivanovic via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>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.<br><br></div>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).<br><br></div>Thanks for your help,<br><br></div>Nemanja<br></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>