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

nlamee at cs.mcgill.ca nlamee at cs.mcgill.ca
Thu Mar 28 07:40:36 PDT 2013


Hi Óscar,

Thank you for your response. I did not explicitly optimize the IR.

I compile and run the two versions with

...
GenericValue gv = EE->runFunction(bsqr, args);
...
GenericValue gv2 = EE->runFunction(cppnat, args);

I am calling method runFunction of ExecutionEngine. I am using the default
code gen optimization level.

Best regards,
Nurudeen.

On Thu, March 28, 2013 7:05 am, Óscar Fuentes wrote:
> 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.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>





More information about the llvm-dev mailing list