This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR debug/36977: Incorrect debug info for stack variables with stack alignment


On Thu, Jul 31, 2008 at 3:11 PM, Jason Merrill <jason@redhat.com> wrote:
> If the stack alignment isn't necessary, then managing the DRAP register
> isn't necessary either, right?  It seems like the right solution is to make
> the optimizers remove that code as well, in which case the debug info will
> be right automatically, using FP for the CFA.
>

This optimization is done after reload. We have done everything to align the
stack. At the very last minute when we generate prologue to align the stack,
we do a double check and find out that we don't need to align the stack.
We can't go back to undo reload and others. The only thing we can do
is not to generate the "and" instruction.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]