On Thu, Apr 14, 2011 at 4:01 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
> On Thu, Apr 14, 2011 at 6:57 AM, Richard Guenther
> <richard.guent...@gmail.com> wrote:
>> On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu <hongjiu...@intel.com> wrote:
>>> We have
>>>
>>> static unsigned int
>>> get_decl_align_unit (tree decl)
>>> {
>>>  unsigned int align = LOCAL_DECL_ALIGNMENT (decl);
>>>  return align / BITS_PER_UNIT;
>>> }
>>>
>>> LOCAL_DECL_ALIGNMENT may increase alignment for local variable.  But it is
>>> never saved.  DECL_ALIGN (decl) returns the old alignment.  This patch
>>> updates DECL_ALIGN if needed.  OK for trunk if there are no regressions?
>>
>> A get_* function does not seem like a good place to do such things.
>
> Any suggestion to how to do it properly? I can rename
> get_decl_align_unit to align_local_variable.

That works for me.

>> Why does it matter that DECL_ALIGN is updated?
>>
>
> My port needs accurate alignment information on local variables.

I see.

Richard.

> --
> H.J.
>

Reply via email to