[LLVMdev] MCJIT

Jim Grosbach grosbach at apple.com
Mon May 14 09:51:52 PDT 2012


On May 14, 2012, at 9:42 AM, Ashok Nalkund <ashoknn at qualcomm.com> wrote:

> 
> On 5/14/2012 9:18 AM, Jim Grosbach wrote:
>> 
>> On May 14, 2012, at 9:07 AM, Ashok Nalkund<ashoknn at qualcomm.com>  wrote:
>> 
>>> I was able to get past the error by calling InitializeNativeTargetAsmParser() in my code. Now I have a failure in resolving external libraries, so looking into that (recompiled with --enable-ffi but I now get an error LLVMgold.so not found).
>>> 
>>> Then I hda to disable the following code in lib/Target/X86/X86CodeEmitter.cpp:
>>>>      case TargetOpcode::INLINEASM:
>>>>        // We allow inline assembler nodes with empty bodies - they can
>>>>        // implicitly define registers, which is ok for JIT.
>>>>        //if (MI.getOperand(0).getSymbolName()[0])
>>>>        //  report_fatal_error("in X86CodeEmitter.cpp JIT does not support inline asm!");
>>>>        break;
>>> 
>>> otherwise, when it sees a non-zero char in the inline asm (say load) and report failure and die.
>> 
>> 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



More information about the llvm-dev mailing list