From patchwork Fri Nov 9 20:53:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 995756 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489587-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="lhj96O6s"; dkim-atps=neutral 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 42sC6y5Gf6z9sBh for ; Sat, 10 Nov 2018 07:53:44 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Lb5GS9+h9pgopPz9M5Ll/4bBo3mfbl01pSlkZtuL7MXfA42FGE 8QyJyJUHjj8h206LAfw3SfZjK/wGduPeqy6Ycubjdo1/9oKwKSvHBrRasewCKcIV wP69R++zjUH4wb16nPJn8JiJuJt6HOhbBI6CKCpPo5rjGdh5N19BKJCBM= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=wpYKlI74gRMs2m94dRjeI3dxgHA=; b=lhj96O6sOAOA7tO916wv d4xKjz6cnK7cnWNztDQsnSO2RGQsYYaP/bcmtmtc1n9NV4Ca+zmGlOG5ZAgeE6ek 2TMbF83mEB7KLHvARGa2wsrka94VN8fjFSGymtBvKzjGgoY/mkwetJIOnxdzLc+Q 0j/UoJTv+EU8YoKHaW0D4IU= Received: (qmail 34283 invoked by alias); 9 Nov 2018 20:53:37 -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 34272 invoked by uid 89); 9 Nov 2018 20:53:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.9 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=relies, H*r:0800 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; Fri, 09 Nov 2018 20:53:34 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1gLDmU-0004Ym-A6 from Sandra_Loosemore@mentor.com for gcc-patches@gcc.gnu.org; Fri, 09 Nov 2018 12:53:30 -0800 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.1320.4; Fri, 9 Nov 2018 12:53:27 -0800 To: "gcc-patches@gcc.gnu.org" From: Sandra Loosemore Subject: [doc, committed] Clarify defaults for some -fno-xxx options Message-ID: <9634e0f6-1d85-96f6-204a-19f54f079e5d@codesourcery.com> Date: Fri, 9 Nov 2018 13:53:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 This patch fixes the problems with the docs for the defaults for some -fno-xxxx options as noted in PR 41179. I double-checked the behavior against the code in opts.c and didn't just base this on trying to interpret the previous contorted wording. :-) This also addresses part of PR 65703. My next patch will address the other part of that issue, relating to not being able to find the documentation for the positive form of options like -fno-defer-pop. -Sandra Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 265990) +++ doc/invoke.texi (working copy) @@ -8062,12 +8062,11 @@ optimizations to be performed is desired @table @gcctabopt @item -fno-defer-pop @opindex fno-defer-pop -Always pop the arguments to each function call as soon as that function -returns. For machines that must pop arguments after a function call, -the compiler normally lets arguments accumulate on the stack for several -function calls and pops them all at once. - -Disabled at levels @option{-O}, @option{-O2}, @option{-O3}, @option{-Os}. +For machines that must pop arguments after a function call, always pop +the arguments as soon as each function returns. +At levels @option{-O1} and higher, @option{-fdefer-pop} is the default; +this allows the compiler to let arguments accumulate on the stack for several +function calls and pop them all at once. @item -fforward-propagate @opindex fforward-propagate @@ -8284,18 +8283,16 @@ life-range analysis. This option is eff @item -fno-branch-count-reg @opindex fno-branch-count-reg -Avoid running a pass scanning for opportunities to use ``decrement and -branch'' instructions on a count register instead of generating sequences -of instructions that decrement a register, compare it against zero, and +Disable the optimization pass that scans for opportunities to use +``decrement and branch'' instructions on a count register instead of +instruction sequences that decrement a register, compare it against zero, and then branch based upon the result. This option is only meaningful on architectures that support such instructions, which include x86, PowerPC, IA-64 and S/390. Note that the @option{-fno-branch-count-reg} option doesn't remove the decrement and branch instructions from the generated instruction stream introduced by other optimization passes. -Enabled by default at @option{-O1} and higher. - -The default is @option{-fbranch-count-reg}. +The default is @option{-fbranch-count-reg} at @option{-O1} and higher. @item -fno-function-cse @opindex fno-function-cse @@ -9684,9 +9681,10 @@ are not removed. This option is intende that relies on a particular ordering. For new code, it is better to use attributes when possible. -Enabled at level @option{-O0}. When disabled explicitly, it also implies -@option{-fno-section-anchors}, which is otherwise enabled at @option{-O0} on some -targets. +@option{-ftoplevel-reorder} is the default at @option{-O1} and higher, and +also at @option{-O0} if @option{-fsection-anchors} is explicitly requested. +Additionally @option{-fno-toplevel-reorder} implies +@option{-fno-section-anchors}. @item -fweb @opindex fweb