[LLVMdev] LLVM 3.3 JIT code speed
Stéphane Letz
letz at grame.fr
Thu Jul 18 09:07:14 PDT 2013
Hi,
Our DSL LLVM IR emitted code (optimized with -O3 kind of IR ==> IR passes) runs slower when executed with the LLVM 3.3 JIT, compared to what we had with LLVM 3.1. What could be the reason?
I tried to play with TargetOptions without any success…
Here is the kind of code we use to allocate the JIT:
EngineBuilder builder(fResult->fModule);
builder.setOptLevel(CodeGenOpt::Aggressive);
builder.setEngineKind(EngineKind::JIT);
builder.setUseMCJIT(true);
builder.setCodeModel(CodeModel::JITDefault);
builder.setMCPU(llvm::sys::getHostCPUName());
TargetOptions targetOptions;
targetOptions.NoFramePointerElim = true;
targetOptions.LessPreciseFPMADOption = true;
targetOptions.UnsafeFPMath = true;
targetOptions.NoInfsFPMath = true;
targetOptions.NoNaNsFPMath = true;
targetOptions.GuaranteedTailCallOpt = true;
builder.setTargetOptions(targetOptions);
TargetMachine* tm = builder.selectTarget();
fJIT = builder.create(tm);
if (!fJIT) {
return false;
}
….
Any idea?
Thanks.
Stéphane Letz
More information about the llvm-dev
mailing list