public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost
Date: Thu, 14 Apr 2011 14:09:00 -0000	[thread overview]
Message-ID: <BANLkTim0gCb+_BQNAf2ORWpnYOcmQ4Ew9w@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=tm2Lw0cASOmAKdiSgpvnkZfG=Cw@mail.gmail.com>

On Thu, Apr 14, 2011 at 4:01 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Apr 14, 2011 at 6:57 AM, Richard Guenther
> <richard.guenther@gmail.com> wrote:
>> On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu <hongjiu.lu@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	other threads:[~2011-04-14 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 13:34 H.J. Lu
2011-04-14 13:57 ` Richard Guenther
2011-04-14 14:01   ` H.J. Lu
2011-04-14 14:09     ` Richard Guenther [this message]
2011-04-14 14:27       ` H.J. Lu
2011-04-14 14:30         ` Richard Guenther
2011-04-14 15:26           ` Michael Matz
2011-04-14 15:48             ` H.J. Lu
2011-04-14 15:57               ` Richard Guenther
2011-04-15 12:34               ` Michael Matz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTim0gCb+_BQNAf2ORWpnYOcmQ4Ew9w@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).