This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix DECL_ALIGN during expand with dynamic stack realignment (PR target/44542)
- From: Michael Matz <matz at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Jun 2010 16:52:38 +0200 (CEST)
- Subject: Re: [PATCH] Fix DECL_ALIGN during expand with dynamic stack realignment (PR target/44542)
- References: <20100617122054.GW7811@tyan-ft48-01.lab.bos.redhat.com>
Hi,
On Thu, 17 Jun 2010, Jakub Jelinek wrote:
> The last hunk is just to make sure the so computed DECL_ALIGN isn't later on
> considered again for stack realignment purposes. On the 4.4 branch
> expand_one_var could be called for the same variable more than once, on the
> trunk it is unclear whether that can happen and is just a latent issue.
> I'm aware that Michael suggested doing the adjustments only for
> !really_expand, but we never call it with !really_expand at -O0 and for -O1+
> we call it too early (during inlining etc.), rather than right before the
> actual expansion.
Yeah, I misremembered the flow of events when making this inquiry. Still
...
> + else if (DECL_HAS_VALUE_EXPR_P (var)
> + || (DECL_RTL_SET_P (var)
> + && MEM_P (DECL_RTL (var))
> + && (XEXP (DECL_RTL (var), 0) == virtual_stack_vars_rtx
> + || (GET_CODE (XEXP (DECL_RTL (var), 0)) == PLUS
> + && XEXP (XEXP (DECL_RTL (var), 0), 0)
> + == virtual_stack_vars_rtx
> + && CONST_INT_P (XEXP (XEXP (DECL_RTL (var), 0), 1))))))
... this reads uneasy to me (that's the reason I bothered with the
really_expand suggestion). Why do you have to test the form of the MEM,
shouldn't "DECL_RTL_SET_P (var) && MEM_P (DECL_RTL (var))" be enough, or
even without testing for MEM_P?
Ciao,
Michael.