From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38173 invoked by alias); 18 Apr 2017 18:29:53 -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 38156 invoked by uid 89); 18 Apr 2017 18:29:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HTo:U*sandra 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 ESMTP; Tue, 18 Apr 2017 18:29:51 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1E4FD31F3FA; Tue, 18 Apr 2017 18:29:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1E4FD31F3FA Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dvlasenk@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1E4FD31F3FA Received: from [10.34.1.136] (dhcp-1-136.brq.redhat.com [10.34.1.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC2F083280; Tue, 18 Apr 2017 18:29:47 +0000 (UTC) Subject: Re: [PATCH 3/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] To: Sandra Loosemore , gcc-patches@gcc.gnu.org References: <20170417155716.26171-1-dvlasenk@redhat.com> <20170417155716.26171-4-dvlasenk@redhat.com> <58F51D69.50704@codesourcery.com> Cc: Andrew Pinski , Uros Bizjak , Bernd Schmidt From: Denys Vlasenko Message-ID: <2728ac3d-a187-5bc1-5fa7-3cc94ec458ec@redhat.com> Date: Tue, 18 Apr 2017 18:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <58F51D69.50704@codesourcery.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-04/txt/msg00792.txt.bz2 On 04/17/2017 09:54 PM, Sandra Loosemore wrote: >> @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. Thanks for the review. I'm sending version 8 which has all of your changes incorporated.