[LLVMdev] bug in ARMFrameLowering.cpp:processFunctionBeforeCalleeSavedScan

Alok Manchanda almancha at adobe.com
Mon Dec 5 20:29:58 PST 2011


Thanks James, Anton. I'll try and get a working test case, but it might take a bit of time as it's been a while since I encountered the error. Hopefully the input which caused it is not too hard to locate.

-----Original Message-----
From: James Molloy [mailto:james.molloy at arm.com] 
Sent: Monday, December 05, 2011 8:15 PM
To: 'Anton Korobeynikov'; Alok Manchanda
Cc: llvmdev at cs.uiuc.edu
Subject: RE: [LLVMdev] bug in ARMFrameLowering.cpp:processFunctionBeforeCalleeSavedScan

Hi Alok,

Echoing Anton's statements, please provide a testcase! :)

Apart from that, looking at your patch and description I actually think that it is estimateRSStackSizeLimit that is wrong.

It is performing a check for a Thumb2 addressing mode whether the target has a FP register. That's the main check - for some reason it is appending another check AFI->hasStackFrame() which seems wrong. The function should assume the function has a stack frame, because its entire function is to estimate its size!

It looks like that check has been copy-pasted from elsewhere in the file. Anton, would you agree with this? I haven't looked at ARMFrameLowering before.

Cheers,

James

-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Anton Korobeynikov
Sent: 05 December 2011 11:11
To: Alok Manchanda
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] bug in ARMFrameLowering.cpp:processFunctionBeforeCalleeSavedScan

Hello Alok,

> I fixed this by performing the CanEliminateFrame and
> RegInfo->cannotEliminateFrame checks before the call to
> estimateRSSStackSizeLimit, since these values are available before 
> BigStack is initialized. Does that sound reasonable? I’ve attached a 
> patch with my change.
Will you please provide a testcase which reproduces the problem?

Thanks!
--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

_______________________________________________
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