From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16310 invoked by alias); 14 Apr 2011 14:09:45 -0000 Received: (qmail 16301 invoked by uid 22791); 14 Apr 2011 14:09:44 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Apr 2011 14:09:38 +0000 Received: by wye20 with SMTP id 20so1708761wye.20 for ; Thu, 14 Apr 2011 07:09:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.16.98 with SMTP id n34mr886943wba.31.1302790176018; Thu, 14 Apr 2011 07:09:36 -0700 (PDT) Received: by 10.227.0.140 with HTTP; Thu, 14 Apr 2011 07:09:35 -0700 (PDT) In-Reply-To: References: <20110414133453.GA18805@intel.com> Date: Thu, 14 Apr 2011 14:09:00 -0000 Message-ID: Subject: Re: PATCH: PR middle-end/48608: Alignment adjust of local variables is lost From: Richard Guenther To: "H.J. Lu" Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01073.txt.bz2 On Thu, Apr 14, 2011 at 4:01 PM, H.J. Lu wrote: > On Thu, Apr 14, 2011 at 6:57 AM, Richard Guenther > wrote: >> On Thu, Apr 14, 2011 at 3:34 PM, H.J. Lu wrote: >>> We have >>> >>> static unsigned int >>> get_decl_align_unit (tree decl) >>> { >>> =A0unsigned int align =3D LOCAL_DECL_ALIGNMENT (decl); >>> =A0return align / BITS_PER_UNIT; >>> } >>> >>> LOCAL_DECL_ALIGNMENT may increase alignment for local variable. =A0But = it is >>> never saved. =A0DECL_ALIGN (decl) returns the old alignment. =A0This pa= tch >>> updates DECL_ALIGN if needed. =A0OK for trunk if there are no regressio= ns? >> >> 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. >