From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15350 invoked by alias); 17 Apr 2017 19:54:26 -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 15280 invoked by uid 89); 17 Apr 2017 19:54:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-15.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=sandra, Sandra X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Apr 2017 19:54:22 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtp id 1d0Cj6-00049e-TR from Sandra_Loosemore@mentor.com ; Mon, 17 Apr 2017 12:54:20 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 17 Apr 2017 12:54:18 -0700 Subject: Re: [PATCH 3/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] To: Denys Vlasenko , References: <20170417155716.26171-1-dvlasenk@redhat.com> <20170417155716.26171-4-dvlasenk@redhat.com> CC: Andrew Pinski , Uros Bizjak , Bernd Schmidt From: Sandra Loosemore Message-ID: <58F51D69.50704@codesourcery.com> Date: Mon, 17 Apr 2017 20:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20170417155716.26171-4-dvlasenk@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-SW-Source: 2017-04/txt/msg00732.txt.bz2 On 04/17/2017 09:57 AM, Denys Vlasenko wrote: > Index: gcc/doc/invoke.texi > =================================================================== > --- gcc/doc/invoke.texi (revision 246948) > +++ gcc/doc/invoke.texi (working copy) > @@ -351,9 +351,11 @@ Objective-C and Objective-C++ Dialects}. > > @item Optimization Options > @xref{Optimize Options,,Options that Control Optimization}. > -@gccoptlist{-faggressive-loop-optimizations -falign-functions[=@var{n}] @gol > --falign-jumps[=@var{n}] @gol > --falign-labels[=@var{n}] -falign-loops[=@var{n}] @gol > +@gccoptlist{-faggressive-loop-optimizations @gol > +-falign-functions[=@var{n}[,@var{m},[@var{n2}[,@var{m2}]]]] @gol > +-falign-jumps[=@var{n}[,@var{m},[@var{n2}[,@var{m2}]]]] @gol > +-falign-labels[=@var{n}[,@var{m},[@var{n2}[,@var{m2}]]]] @gol > +-falign-loops[=@var{n}[,@var{m},[@var{n2}[,@var{m2}]]]] @gol > -fassociative-math -fauto-profile -fauto-profile[=@var{path}] @gol > -fauto-inc-dec -fbranch-probabilities @gol > -fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol > @@ -8672,19 +8674,36 @@ The @option{-fstrict-overflow} option is enabled a > > @item -falign-functions > @itemx -falign-functions=@var{n} > +@itemx -falign-functions=@var{n},@var{m} > +@itemx -falign-functions=@var{n},@var{m},@var{n2} > +@itemx -falign-functions=@var{n},@var{m},@var{n2},@var{m2} > @opindex falign-functions > Align the start of functions to the next power-of-two greater than > -@var{n}, skipping up to @var{n} bytes. For instance, > -@option{-falign-functions=32} aligns functions to the next 32-byte > -boundary, but @option{-falign-functions=24} aligns to the next > -32-byte boundary only if this can be done by skipping 23 bytes or less. > +@var{n}, skipping up to @var{m}-1 bytes. Such alignment ensures that > +after branch, at least @var{m} bytes can be fetched by the CPU > +without crossing specified alignment boundary. This last sentence doesn't make much sense to me. How about something like This ensures that at least the first @var{m} bytes of the function can be fetched by the CPU without crossing an @var{n}-byte alignment boundary. > -@option{-fno-align-functions} and @option{-falign-functions=1} are > -equivalent and mean that functions are not aligned. > +If @var{m} is not specified, it defaults to @var{n}. > +Same for @var{m2} and @var{n2}. You haven't said what m2 and n2 are yet. The last sentence should be moved to the end of this paragraph instead. > +The second pair of @var{n2},@var{m2} values allows to have a secondary > +alignment: @option{-falign-functions=64,7,32,3} aligns to the next > +64-byte boundary if this can be done by skipping 6 bytes or less, > +otherwise aligns to the next 32-byte boundary if this can be done > +by skipping 2 bytes or less. Also please s/allows to have/allows you to specify/ > @@ -8697,12 +8716,13 @@ skip more bytes than the size of the function. > > @item -falign-labels > @itemx -falign-labels=@var{n} > +@itemx -falign-labels=@var{n},@var{m} > +@itemx -falign-labels=@var{n},@var{m},@var{n2} > +@itemx -falign-labels=@var{n},@var{m},@var{n2},@var{m2} > @opindex falign-labels > -Align all branch targets to a power-of-two boundary, skipping up to > -@var{n} bytes like @option{-falign-functions}. This option can easily > -make code slower, because it must insert dummy operations for when the > -branch target is reached in the usual flow of the code. > +Align all branch targets to a power-of-two boundary. > > +Parameters of this option are analogous to @option{-falign-functions} option. s/to @option/to the @option/ Here and for -falign-loops and -falign-jumps too. -Sandra