[LLVMdev] JIT on armhf
Amara Emerson
amara.emerson at gmail.com
Fri Feb 8 15:07:19 PST 2013
> So I'm using "llvm/ExecutionEngine/MCJIT.h" instead of
> "llvm/ExecutionEngine/JIT.h", and I've added setUseMCJIT(true) to
> EngineBuilder, but what actually happens is:
>
> LLVM ERROR: Target does not support MC emission!
>
> Do I need to do anything else?
IIRC, this error might be due to not linking against the MCJIT library
component. Add the appropriate flags to your build config, and also
ensure that you call InitializeNativeTargetAsmPrinter() and
InitializeNativeTargetAsmParser().
> Also, what's the code quality of MCJIT compared to the old JIT? As I'm
> basically compiling statically at runtime, I don't mind if LLVM spends
> time generating the code --- I'm using a module pass, eager code
> generation and setOptLevel(llvm::CodeGenOpt::Aggressive) --- and right
> now I'm extremely happy with the quality of the code being emitted for
> amd64.
The MCJIT uses the exact same mechanism as the static code generator
so the code quality is therefore good. You should note though that
using just the ExecutionEngine codegen optimization level parameter
won't run the full set of target independent optimizations that a tool
like opt will run.
Unfortunately there are inconsistencies in the triple handling between
clang and the rest of LLVM. I'm not at my workstation so I can't give
much more information at the moment.
Amara
More information about the llvm-dev
mailing list