[LLVMdev] Why google-perftools fails on the JITted code?

Chris Lattner clattner at apple.com
Sat Jun 19 10:56:58 PDT 2010


On Jun 19, 2010, at 6:57 AM, Paul Davey wrote:

> On Sat, Jun 19, 2010 at 4:35 AM, Chris Lattner <clattner at apple.com> wrote:
>> 
>> On Jun 18, 2010, at 3:29 AM, Yuri wrote:
>> 
>>> Now I see that JITted code doesn't have standard prolog, on x86 each
>>> procedure instead begins with 'sub    $0x4,%esp'.
>>> 
>>> Is there an option to make JIT generate regular prologs?
>> 
>> Try turning off frame pointer elimination.  On the llc command line, this is -disable-fp-elim
>> 
> 
> What does llc have to do with the JIT?

llc and lli use the same code generator.  LLI takes the -disable-fp-elim flag also.  If you have embedded this JIT in your own stuff (which wasn't specified) you need to use the same api that the -disable-fp-elim flag sets in these two tools.

-Chris



More information about the llvm-dev mailing list