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] Fix DECL_ALIGN during expand with dynamic stack realignment (PR target/44542)


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.


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