From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53820 invoked by alias); 8 Oct 2015 14:30:40 -0000 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 Received: (qmail 53805 invoked by uid 89); 8 Oct 2015 14:30:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 08 Oct 2015 14:30:37 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 70FEC2E6CD0; Thu, 8 Oct 2015 14:30:36 +0000 (UTC) Received: from localhost.localdomain (vpn1-4-126.ams2.redhat.com [10.36.4.126]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t98EUYaY013755; Thu, 8 Oct 2015 10:30:34 -0400 Subject: Re: [PATCH ARM]: PR67745: Fix function alignment after __attribute__ 2/2 To: Christian Bruel , "law@redhat.com" References: <560A90F2.5010708@st.com> <560C31CD.7060009@redhat.com> <560CDCD7.9080108@st.com> <560D5B36.2020600@st.com> <5614C412.5080400@st.com> <5614F17B.5060402@redhat.com> <5614F7D0.8010409@st.com> <56155841.6000404@redhat.com> <56155B72.4020807@redhat.com> <56166C36.7040600@st.com> <56166DA5.3030909@redhat.com> <561674C1.8030008@st.com> Cc: "gcc-patches@gcc.gnu.org" , "Ramana.Radhakrishnan@arm.com" , "kyrylo.tkachov@arm.com" , "richard.earnshaw@arm.com" From: Bernd Schmidt Message-ID: <56167E09.3010502@redhat.com> Date: Thu, 08 Oct 2015 14:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <561674C1.8030008@st.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00846.txt.bz2 On 10/08/2015 03:50 PM, Christian Bruel wrote: > Humm, I don't know what kind of alignment optimization for functions we > have based on a declaration only. greping DECL_ALIGN on functions there > are some bits in the ipa-icf code that seems to merge code using this > information, but I think we have a definition at that point. > but honestly, I'm very unfamiliar with this pass. Do you have something > else in mind ? I had a vague memory of us optimizing that, but I can't find the code either and maybe it's just not there. That doesn't mean someone isn't going to add it in the future, and I'm uncomfortable leaving incorrect DECL_ALIGN values around. It looks like rest_of_decl_compilation may be a good place to take care of declarations, but using FUNCTION_BOUNDARY is probably going to give the wrong results. So maybe a target hook, function_boundary_for_decl, defaulting to just returning FUNCTION_BOUNDARY? Eventually it could replace the macro entirely. Bernd