From patchwork Sat Feb 18 20:37:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 142051 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]) by ozlabs.org (Postfix) with SMTP id 93865B6F9D for ; Sun, 19 Feb 2012 07:40:58 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1330202459; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC: Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=GwIjL40dEryzj6I6dIo6LFixjWM=; b=gzkkfunkOwDFjUi sYSLl/wUGZppJ914HonxjdSBfLpV07Gzd/LiqPUGnWjhc7CWm20Yd5MZt31a+g/X 7iFTeWU8Lyq5mPrhX5OISt1qUtCmEcgFNd+9tJhdint2BRfAb/cJM8/Mmpj/ueAo KaKvQm4J3u302c/ycv1NVeKj9tzg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=YCLQfonrlOndlymygdnZRjBer6bU1549TRN2kbNCLGvblyBHL2v/QE0WLZgJCd lzF5XIi+GXk1kstEFKnIjbtDSrMHDhnw4Xda8aCoP/DoHa41n5AZnI6HwoYDcaAu HKBWmBbI/6LdvNNksI++DjuQwlUQqTvXI6YakB03DmxDk=; Received: (qmail 10525 invoked by alias); 18 Feb 2012 20:40:55 -0000 Received: (qmail 10517 invoked by uid 22791); 18 Feb 2012 20:40:53 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 18 Feb 2012 20:40:22 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Ryr4u-0003f2-4s from Sandra_Loosemore@mentor.com ; Sat, 18 Feb 2012 12:40:20 -0800 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 18 Feb 2012 12:40:20 -0800 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Sat, 18 Feb 2012 12:40:16 -0800 Message-ID: <4F400C1E.2040900@codesourcery.com> Date: Sat, 18 Feb 2012 13:37:50 -0700 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: CC: Vladimir Makarov Subject: [patch, committed] invoke.texi: copy-edit docs for IRA options and parameters 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 I noted that the documentation for the IRA-related command-line options and parameters needed fairly extensive copy-editing. In addition to correcting some English grammar problems, I have reorganized some of the discussion as well to make it easier to follow. I've checked this in -- maybe it's not strictly "obvious", but it's intended to be a content-free change in terms of meaning, and it's at least an incremental improvement in readability compared to what's there now. -Sandra 2012-02-18 Sandra Loosemore gcc/ * doc/invoke.texi (-fira-* options): Copy-edit. (ira-* parameters): Copy-edit. Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 184367) +++ gcc/doc/invoke.texi (working copy) @@ -6759,56 +6759,65 @@ optimization. Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. @item -fira-algorithm=@var{algorithm} -Use specified coloring algorithm for the integrated register -allocator. The @var{algorithm} argument should be @code{priority} or -@code{CB}. The first algorithm specifies Chow's priority coloring, -the second one specifies Chaitin-Briggs coloring. The second -algorithm can be unimplemented for some architectures. If it is -implemented, it is the default because Chaitin-Briggs coloring as a -rule generates a better code. +Use the specified coloring algorithm for the integrated register +allocator. The @var{algorithm} argument can be @samp{priority}, which +specifies Chow's priority coloring, or @samp{CB}, which specifies +Chaitin-Briggs coloring. Chaitin-Briggs coloring is not implemented +for all architectures, but for those targets that do support it, it is +the default because it generates better code. @item -fira-region=@var{region} Use specified regions for the integrated register allocator. The -@var{region} argument should be one of @code{all}, @code{mixed}, or -@code{one}. The first value means using all loops as register -allocation regions, the second value which is enabled by default when -compiling with optimization for speed (@option{-O}, @option{-O2}, -@dots{}) means using all loops except for loops with small register -pressure as the regions, and third one which is enabled by default for -@option{-Os} or @option{-O0} means using all function as a single -region. The first value can give best result for machines with small -size and irregular register set, the third one results in faster and -generates decent code and the smallest size code, and the second value -usually give the best results in most cases and for most -architectures. +@var{region} argument should be one of the following: + +@table @samp + +@item all +Use all loops as register allocation regions. +This can give the best results for machines with a small and/or +irregular register set. + +@item mixed +Use all loops except for loops with small register pressure +as the regions. This value usually gives +the best results in most cases and for most architectures, +and is enabled by default when compiling with optimization for speed +(@option{-O}, @option{-O2}, @dots{}). + +@item one +Use all functions as a single region. +This typically results in the smallest code size, and is enabled by default for +@option{-Os} or @option{-O0}. + +@end table @item -fira-loop-pressure @opindex fira-loop-pressure -Use IRA to evaluate register pressure in loops for decision to move -loop invariants. Usage of this option usually results in generation -of faster and smaller code on machines with big register files (>= 32 -registers) but it can slow compiler down. +Use IRA to evaluate register pressure in loops for decisions to move +loop invariants. This option usually results in generation +of faster and smaller code on machines with large register files (>= 32 +registers), but it can slow the compiler down. This option is enabled at level @option{-O3} for some targets. @item -fno-ira-share-save-slots @opindex fno-ira-share-save-slots -Switch off sharing stack slots used for saving call used hard -registers living through a call. Each hard register will get a -separate stack slot and as a result function stack frame will be -bigger. +Disable sharing of stack slots used for saving call-used hard +registers living through a call. Each hard register gets a +separate stack slot, and as a result function stack frames are +larger. @item -fno-ira-share-spill-slots @opindex fno-ira-share-spill-slots -Switch off sharing stack slots allocated for pseudo-registers. Each -pseudo-register that did not get a hard register will get a separate -stack slot and as a result function stack frame will be bigger. +Disable sharing of stack slots allocated for pseudo-registers. Each +pseudo-register that does not get a hard register gets a separate +stack slot, and as a result function stack frames are larger. @item -fira-verbose=@var{n} @opindex fira-verbose -Set up how verbose dump file for the integrated register allocator -will be. Default value is 5. If the value is greater or equal to 10, -the dump file will be stderr as if the value were @var{n} minus 10. +Control the verbosity of the dump file for the integrated register allocator. +The default value is 5. If the value @var{n} is greater or equal to 10, +the dump output is sent to stderr using the same format as @var{n} minus 10. @item -fdelayed-branch @opindex fdelayed-branch @@ -9103,28 +9112,28 @@ function will not be done and optimizati be disabled. The default maximum SCC size is 10000. @item ira-max-loops-num -IRA uses a regional register allocation by default. If a function -contains loops more than number given by the parameter, only at most -given number of the most frequently executed loops will form regions -for the regional register allocation. The default value of the +IRA uses regional register allocation by default. If a function +contains more loops than the number given by this parameter, only at most +the given number of the most frequently-executed loops form regions +for regional register allocation. The default value of the parameter is 100. -@item ira-max-conflict-table-size -Although IRA uses a sophisticated algorithm of compression conflict -table, the table can be still big for huge functions. If the conflict -table for a function could be more than size in MB given by the -parameter, the conflict table is not built and faster, simpler, and -lower quality register allocation algorithm will be used. The -algorithm do not use pseudo-register conflicts. The default value of -the parameter is 2000. +@item ira-max-conflict-table-size +Although IRA uses a sophisticated algorithm to compress the conflict +table, the table can still require excessive amounts of memory for +huge functions. If the conflict table for a function could be more +than the size in MB given by this parameter, the register allocator +instead uses a faster, simpler, and lower-quality +algorithm that does not require building a pseudo-register conflict table. +The default value of the parameter is 2000. @item ira-loop-reserved-regs IRA can be used to evaluate more accurate register pressure in loops -for decision to move loop invariants (see @option{-O3}). The number -of available registers reserved for some other purposes is described -by this parameter. The default value of the parameter is 2 which is -minimal number of registers needed for execution of typical -instruction. This value is the best found from numerous experiments. +for decisions to move loop invariants (see @option{-O3}). The number +of available registers reserved for some other purposes is given +by this parameter. The default value of the parameter is 2, which is +the minimal number of registers needed by typical instructions. +This value is the best found from numerous experiments. @item loop-invariant-max-bbs-in-loop Loop invariant motion can be very expensive, both in compilation time and