This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR debug/36977: Incorrect debug info for stack variables with stack alignment
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Jason Merrill" <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Joey Ye" <joey dot ye at intel dot com>, "Xuepeng Guo" <xuepeng dot guo at intel dot com>
- Date: Thu, 31 Jul 2008 15:17:37 -0700
- Subject: Re: PATCH: PR debug/36977: Incorrect debug info for stack variables with stack alignment
- References: <20080730161055.GA21664@lucon.org> <20080731035047.GA9138@lucon.org> <48923896.3070901@redhat.com>
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.