[LLVMdev] JIT: Inlining introduces intrinsics.

Óscar Fuentes ofv at wanadoo.es
Thu Nov 24 19:48:15 PST 2011


Nick Lewycky <nicholas at mxc.ca> writes:

>> For the record: the cause is that the JIT compiler calls
>> getPointerToFunction for all defined functions on the module
>
> Intrinsics are only declared, they have no definition. The JIT may
> codegen functions which call those intrinsics, but that shouldn't
> cause any problems, as codegen should handle them.

Are you suggesting that there should be no problem with this idiom so it
is a LLVM bug?

>>      for (Module::iterator it = M->begin(); it != M->end(); ++it)
>>         EE->getPointerToFunction(&*it);
>>
>>      Function *mf = M->getFunction("mainf");
>>
>>      EE->runFunction(mf, args);



More information about the llvm-dev mailing list