[LLVMdev] MCJIT

Ashok Nalkund ashoknn at qualcomm.com
Mon May 14 10:40:43 PDT 2012


On 5/14/2012 10:28 AM, Jim Grosbach wrote:
>
> On May 14, 2012, at 10:21 AM, Ashok Nalkund<ashoknn at qualcomm.com>  wrote:
>
>> On 5/14/2012 9:51 AM, Jim Grosbach wrote:
>>>
>>>>>
>>>>> If you're hitting that code, you're running the old JIT (which does indeed not support inline assembly), not the MCJIT.
>>>>>
>>>>
>>>> Do I need to enable anything at configure, my configure looks like this:
>>>>> ../llvm/configure --enable-libffi --enable-targets=host-only --prefix=/local/mnt/workspace/ashoknn/crd/neo/llvm/proto/llvmsvn/build/bin
>>>>
>>>> I added the enable-libffi when trying to figure out resolving external libs.
>>>>
>>>
>>>
>>> No, selecting MCJIT vs. the old JIT is done in the EngineBuilder. If you're using lli, you can pass -use-mcjit on the command line. If you're using your own driver, you can use the lli.cpp for a reference.
>>>
>>> -Jim
>>
>> Thats what I was pointed to earlier, and following that I set the flag in EngineBuilder.setUseMCJIT(true). I looked at the code of EngineBuilder, it saves the flag but the flag doesnt seem to be used anywhere. Am I missing something?
>
> Hm. OK, that's odd. It should change which constructor gets called in EngineBuilder::create()  (which is in lib/ExecutionEngine/ExecutionEngine.cpp). Are you perhaps calling setUseMCJIT(true) after having already called create()? Can you step through EngineBuilder::create() and see what's happening there?
>
> -Jim

lli.cpp instantiates the builder, sets options/flags etc and then calls 
create(). In my driver, I have:
> llvm::EngineBuilder(m_LLVMMod).setErrorStr(&engErr).setUseMCJIT(true).create();

which is what you mentioned. I'll step through create() and check whats 
happening.

thanks,
ashok



More information about the llvm-dev mailing list