From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130334 invoked by alias); 5 Nov 2015 17:47:01 -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 130323 invoked by uid 89); 5 Nov 2015 17:47:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f41.google.com Received: from mail-qg0-f41.google.com (HELO mail-qg0-f41.google.com) (209.85.192.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 05 Nov 2015 17:46:59 +0000 Received: by qgad10 with SMTP id d10so72362244qga.3 for ; Thu, 05 Nov 2015 09:46:57 -0800 (PST) X-Received: by 10.140.153.17 with SMTP id 17mr9169504qhz.91.1446745616865; Thu, 05 Nov 2015 09:46:56 -0800 (PST) Received: from [192.168.0.26] (97-124-162-152.hlrn.qwest.net. [97.124.162.152]) by smtp.gmail.com with ESMTPSA id x82sm1896523qkx.29.2015.11.05.09.46.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Nov 2015 09:46:56 -0800 (PST) Message-ID: <563B960E.20508@gmail.com> Date: Thu, 05 Nov 2015 17:47:00 -0000 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Joseph Myers CC: Alexander Monakov , Gcc Patch List Subject: Re: [PATCH] clarify documentation of -Q --help=optimizers References: <56299713.6040204@gmail.com> <562997A9.3090203@gmail.com> <563A9A31.5060306@gmail.com> <563B7CA1.6080801@gmail.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00506.txt.bz2 On 11/05/2015 10:10 AM, Joseph Myers wrote: > On Thu, 5 Nov 2015, Martin Sebor wrote: > >> optimiziation. We seem to have consensus that even though there >> might be exceptions (do we know what some of them are?) the vast >> majority optimizations that have -fxxx options are in fact not >> performed at -O0. I think reflecting that in the output is more >> helpful than implying otherwise. > > There are several options marked Optimization that are actually matters of > language semantics that I don't think have anything to do with -O options, > e.g. -fexceptions and -fcx-limited-range. The Optimization tag really > just means that it's saved and restored under certain circumstances. Both -fexceptions and -fcx-limited-range are reported as disabled at -O0, so they're not the examples I'm looking for. The set of options that are reported as disabled by -O0 with the patched GCC and that, IIUC, are of concern (i.e., that may not need -O to take effect) are a subset of those below. Quickly scanning the list, I would guess -frtti, -fshort-enums, -fsigned-zeros, and -frtapping-math should be in that category, but there could very well be others. If it's relatively straightforward to enumerate all such options then maybe the way to go is to add a bit to struct cl_option to make it possible to distinguish them from the others in the -O0 -Q --help=optimizers output. Thanks Martin -faggressive-loop-optimizations [disabled by -O0] -fasynchronous-unwind-tables [disabled by -O0] -fauto-inc-dec [disabled by -O0] -fdce [disabled by -O0] -fdelete-null-pointer-checks [disabled by -O0] -fdse [disabled by -O0] -fearly-inlining [disabled by -O0] -ffunction-cse [disabled by -O0] -fgcse-lm [disabled by -O0] -finline [disabled by -O0] -finline-atomics [disabled by -O0] -fira-hoist-pressure [disabled by -O0] -fira-share-save-slots [disabled by -O0] -fira-share-spill-slots [disabled by -O0] -fivopts [disabled by -O0] -fjump-tables [disabled by -O0] -flifetime-dse [disabled by -O0] -fmath-errno [disabled by -O0] -fpeephole [disabled by -O0] -fplt [disabled by -O0] -fprefetch-loop-arrays [disabled by -O0] -frename-registers [disabled by -O0] -frtti [disabled by -O0] -fsched-critical-path-heuristic [disabled by -O0] -fsched-dep-count-heuristic [disabled by -O0] -fsched-group-heuristic [disabled by -O0] -fsched-interblock [disabled by -O0] -fsched-last-insn-heuristic [disabled by -O0] -fsched-rank-heuristic [disabled by -O0] -fsched-spec [disabled by -O0] -fsched-spec-insn-heuristic [disabled by -O0] -fsched-stalled-insns-dep [disabled by -O0] -fschedule-fusion [disabled by -O0] -fshort-enums [disabled by -O0] -fsigned-zeros [disabled by -O0] -fsplit-ivs-in-unroller [disabled by -O0] -fssa-backprop [disabled by -O0] -fstdarg-opt [disabled by -O0] -fstrict-volatile-bitfields [disabled by -O0] -fno-threadsafe-statics [disabled by -O0] -ftrapping-math [disabled by -O0] -ftree-cselim [disabled by -O0] -ftree-forwprop [disabled by -O0] -ftree-loop-if-convert [disabled by -O0] -ftree-loop-im [disabled by -O0] -ftree-loop-ivcanon [disabled by -O0] -ftree-loop-optimize [disabled by -O0] -ftree-phiprop [disabled by -O0] -ftree-reassoc [disabled by -O0] -ftree-scev-cprop [disabled by -O0] -fvar-tracking [disabled by -O0] -fvar-tracking-assignments [disabled by -O0] -fweb [disabled by -O0]