From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90684 invoked by alias); 3 May 2017 09:51:29 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 90657 invoked by uid 89); 3 May 2017 09:51:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=sk:dumpex, sk:fopt-in, sk:dump-ex, dumpexampleshtml X-HELO: mail-oi0-f43.google.com Received: from mail-oi0-f43.google.com (HELO mail-oi0-f43.google.com) (209.85.218.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 May 2017 09:51:27 +0000 Received: by mail-oi0-f43.google.com with SMTP id h4so20285662oib.3 for ; Wed, 03 May 2017 02:51:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rJaMN4TrO7U34Lz2Yhi38w9SYr/sq1Fal2qnMfCGlT0=; b=tGFpGDJyb2pZ1CwJPd0GOilglo7RRd9u8iyqc/TaxcPN29JiumeC3ONxUbILHC1TY8 a2ZqA6mdLib/77C2HP7ti0oWlIhfIbgdafcmNt9uhf2SitfJWpBuXhYwZX2/F5V3RZE+ W5O/ZiyUp0HjNkoOE9jGz55PKdL1FaYkCjV8fjLadeDoKPHD+S4oPY/o3y4mArIB73hB sO+Udu/q9XlWgMn+l/mCEYeE4Zn3gWYvzcFEdsUeO5YPowaMbfWM5bWduibbktN2CC6v CtDeNqV9pPjdwzCw35twT1hDU5RKMilUwCcwvcobqF919PmqquaIm53nFs71nVA2GWIe yO4w== X-Gm-Message-State: AN3rC/7ulUx10wAbfZxMBAfvtsVPBHbw8nU8xs+Iw9RWl8DIcCVI5K5z 41jmjPDqKQ96XYXYM3AKs+F816/HeuCb X-Received: by 10.157.63.143 with SMTP id r15mr12747733otc.89.1493805088590; Wed, 03 May 2017 02:51:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.51.83 with HTTP; Wed, 3 May 2017 02:51:27 -0700 (PDT) In-Reply-To: <201705022140.v42LePNH012760@sellcey-dt.caveonetworks.com> References: <201705022140.v42LePNH012760@sellcey-dt.caveonetworks.com> From: Richard Biener Date: Wed, 03 May 2017 09:51:00 -0000 Message-ID: Subject: Re: Question about -fopt-info output (-fopt-info vs. -fopt-info-all) To: sellcey@cavium.com Cc: GCC Development Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00032.txt.bz2 On Tue, May 2, 2017 at 11:40 PM, Steve Ellcey wrote: > I have a question about -fopt-info. According to the GCC documentation at: > > https://gcc.gnu.org/onlinedocs/gccint/Dump-examples.html > > > | If options is omitted, it defaults to all-all, which means dump all > | available optimization info from all the passes. In the following example, > | all optimization info is output on to stderr. > | > | gcc -O3 -fopt-info > > But when I use the '-fopt-info' flag, I get less output about vectorization > than when I use '-fopt-info-all' or '-fopt-info-all-all'. > > For example if I compile: > > int foo(int *a, int *b, int *c, int n) { > int i; > for (i = 0; i < n; i++) > a[i] = b[i] + c[i]; > } > > with '-O3 -fopt-info' I get 6 lines of output. '-O3 -fopt-info-all' > or '-O3 -fopt-info-all-all' gives me 453 lines of output. > > Is the documentation wrong, the implementation wrong, or my understanding > of what the documentation is saying wrong? I think this was discussed elsewhere and the documentation does not match the implementation. I think the behavior is to print optimized locations only but for all passes (which I believe is ok) Richard. > Steve Ellcey > sellcey@cavium.com