[LLVMdev] running optimization pass in lli tool

Philip Reames listmail at philipreames.com
Tue Dec 31 16:16:34 PST 2013


Sara,

If I'm interpreting your question correctly, I believe you may be 
misinterpreting the intended usage of MCJIT.  Generally, you would run 
your chosen collection of function passes before passing the Module to 
MCJIT to compile.  MCJIT does have an OptLevel, but this controls 
relatively low level optimizations during code generation not high level 
transforms like your describing.

I'd recommend taking a look at 
examples/Kaleidoscope/MCJIT/complete/toy.cpp for an example of how this 
can be structured.

Yours,
Philip

On 12/28/2013 09:06 PM, Sara Elshobaky wrote:
> Hello,
>
> I’m currently trying to implement a new loop optimization pass in the LLVM.
>
> Till now, I’m using the ‘opt’ tool to run my pass. But, I need to
> include my pass in the MCJIT pass sequence.
>
> I can’t find a command option in the ‘lli’ tool to include any loop
> optimization pass.
>
> For example, I can’t include the ‘-loop-rotate’ pass in JIT to be
> performed at runtime.
>
> In my case, does it require a code modification? Where?
>
> Please advice
>
> Sara Elshobaky
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list