From patchwork Thu Nov 24 22:27:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 699023 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tPv491Vflz9t1H for ; Fri, 25 Nov 2016 09:28:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="tIzMhOQy"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=nZiMMtRxxFxUnt2a 7JYTGUnxlHzVkxUkS4PQDe/OrhN6wPkBotlHbt4qeFqx56vPXx4auSPBYEfHRvGv eKApV+o+BkcaamqD0qGdrHSNj5xJM1vmAoUPHlTG7chBiqCdnK6t1t7Znx0jevMF 8IdWqVNr+jUz5vAanWIa+9Kz2aU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=X+F5DCio5xg0+jvmNcQCTd Yt2Uw=; b=tIzMhOQyN4l35QVxHch/6+Z1ueHfe72/vnKC9HySFzVC7lwFwBXDCP 9VTQKhcuDhJZuLlyZkYqlF5MFoHCLC71N03us3zRClAOM6sqKPXbrODwkzWSA/dt hobpV60SVWMDjTmW7WQ+iIBW2+T7VHSHlaUNyw89opfmp2pBQTb+Y= Received: (qmail 130164 invoked by alias); 24 Nov 2016 22:28:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 130150 invoked by uid 89); 24 Nov 2016 22:28:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*r:LMTP, Hx-languages-length:1624 X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Nov 2016 22:28:05 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 229F6A79; Thu, 24 Nov 2016 23:28:03 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OyxXXJkiXw+L; Thu, 24 Nov 2016 23:27:59 +0100 (CET) Received: from fuego.CeBiTec.Uni-Bielefeld.DE (p5DCE3560.dip0.t-ipconnect.de [93.206.53.96]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id BB807A78; Thu, 24 Nov 2016 23:27:58 +0100 (CET) From: Rainer Orth To: Jeff Law Cc: Bernd Schmidt , Denys Vlasenko , GCC Patches Subject: Re: New option -flimit-function-alignment References: <0105be2b-46da-1e48-87cc-a88b46825cf0@redhat.com> <3da48583-d19b-ac0e-46c8-eb25e5b89ad3@redhat.com> <797cae7c-18bb-503b-d775-db5447b00ee3@redhat.com> <7ae116b8-2750-36b2-96d7-b242630078d7@redhat.com> Date: Thu, 24 Nov 2016 23:27:57 +0100 In-Reply-To: <7ae116b8-2750-36b2-96d7-b242630078d7@redhat.com> (Jeff Law's message of "Wed, 16 Nov 2016 11:23:06 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Hi Jeff, >> gcc/ >> * common.opt (flimit-function-alignment): New. >> * doc/invoke.texi (-flimit-function-alignment): Document. >> * emit-rtl.h (struct rtl_data): Add max_insn_address field. >> * final.c (shorten_branches): Set it. >> * varasm.c (assemble_start_function): Limit alignment if >> requested. >> >> gcc/testsuite/ >> * gcc.target/i386/align-limit.c: New test. > OK. Sorry for the long delay. unfortunately, this broke Solaris 12/SPARC bootstrap with /bin/as: /vol/gcc/src/hg/trunk/local/gcc/varasm.c: In function 'void assemble_start_function(tree, const char*)': /vol/gcc/src/hg/trunk/local/gcc/varasm.c:1794:11: error: unused variable 'align_log' [-Werror=unused-variable] int align_log = align_functions_log; ^~~~~~~~~ The following fixes it and allowed bootstrap to complete successfully. I'm going to commit it as obvious. Rainer diff --git a/gcc/varasm.c b/gcc/varasm.c --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1791,7 +1791,9 @@ assemble_start_function (tree decl, cons && align_functions_log > align && optimize_function_for_speed_p (cfun)) { +#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN int align_log = align_functions_log; +#endif int max_skip = align_functions - 1; if (flag_limit_function_alignment && crtl->max_insn_address > 0 && max_skip >= crtl->max_insn_address)