From patchwork Fri Oct 23 02:12:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 534706 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 731B3141302 for ; Fri, 23 Oct 2015 13:13:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=bvvkUv/u; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=NKtN8yuUKtcRVa/zipnzkDg5z9uznR+04oie896ar5brLkD0WCllB FRANp88cvnrHslcz2LGssQt+0drsRf/+2R/sUuK+eKU1Bp8rWWyb69H+ywyAy6r0 AAmd8oG3jx2fbm2V5cEGTlJtn2wM0l/nYLHc2AUlbbrSR6VPYbhkaQ= 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 :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=default; bh=IbDPw4u5UKyVIH/IBP8gEsy/Kk8=; b=bvvkUv/uLvq1AsMuNmjlEPakHAR2 fLEcLTKx76K9PGV0QgZ8N2y524nMmvvPAfD5G7S8i2UWFklIvYhIh5vkWkB3HTfv 9VHc8oJZs30iFOp4Ggxfe6itTkES4oN1CdmGwfMqF/hncJLh6JhW79TPcVeFpo/D Sn6Ra6pjq+DK7HM= Received: (qmail 87221 invoked by alias); 23 Oct 2015 02:13:04 -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 87210 invoked by uid 89); 23 Oct 2015 02:13:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f172.google.com Received: from mail-qk0-f172.google.com (HELO mail-qk0-f172.google.com) (209.85.220.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 23 Oct 2015 02:13:01 +0000 Received: by qkca6 with SMTP id a6so63776935qkc.3 for ; Thu, 22 Oct 2015 19:12:59 -0700 (PDT) X-Received: by 10.140.216.87 with SMTP id m84mr23908190qhb.97.1445566379002; Thu, 22 Oct 2015 19:12:59 -0700 (PDT) Received: from [192.168.0.26] (70-59-0-242.hlrn.qwest.net. [70.59.0.242]) by smtp.gmail.com with ESMTPSA id e65sm6582867qka.32.2015.10.22.19.12.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 19:12:58 -0700 (PDT) Message-ID: <562997A9.3090203@gmail.com> Date: Thu, 22 Oct 2015 20:12:57 -0600 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: Gcc Patch List Subject: [PATCH] clarify documentation of -Q --help=optimizers References: <56299713.6040204@gmail.com> In-Reply-To: <56299713.6040204@gmail.com> X-Forwarded-Message-Id: <56299713.6040204@gmail.com> X-IsSubscribed: yes [Sending to the right list this time] The documentation of the -Q --help=optimizers options leads some to expect that when options are reported as enabled imply the corresponding optimization will take place. (See the following question on gcc-help: https://gcc.gnu.org/ml/gcc-help/2015-10/msg00133.html) The patch below tries to make it clear that that's not always the case. Martin @smallexample diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4f89fa1..337639e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1506,6 +1506,16 @@ options, an indication is given as to whether the option is enabled, disabled or set to a specific value (assuming that the compiler knows this at the point where the @option{--help=} option is used). +It's important to note that when a given optimization option is +enabled, either explicitly on the command line or implicitly, whether +or not the optimization it controls will be performed during an +invocation of the compiler may depend on other options. This is +so because many options control various finer aspects of other more +general optimizations that must be enabled in order for the former +option to have any effect. There is currently no command line +interface to determine such dependencies between optimization +options. + Here is a truncated example from the ARM port of @command{gcc}: