[LLVMdev] LLVM Execution engine: Native call vs LLVM IR function call

Óscar Fuentes ofv at wanadoo.es
Thu Mar 28 04:05:57 PDT 2013


nlamee at cs.mcgill.ca writes:

> I would like to understand why calling a native function from a function
> in LLVM IR can be much faster than calling an equivalent function in LLVM
> IR.

Do you optimize the LLVM IR? The IR version can inline the call and just
that would make it faster than the "native" version.

Please describe how do you compile your LLVM IR.

Once knowing that, if you optimize the IR and it still slower, the real
answer should pop up by looking at the assembler.




More information about the llvm-dev mailing list