This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about -fopt-info output (-fopt-info vs. -fopt-info-all)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: sellcey at cavium dot com
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Wed, 3 May 2017 11:51:27 +0200
- Subject: Re: Question about -fopt-info output (-fopt-info vs. -fopt-info-all)
- Authentication-results: sourceware.org; auth=none
- References: <201705022140.v42LePNH012760@sellcey-dt.caveonetworks.com>
On Tue, May 2, 2017 at 11:40 PM, Steve Ellcey <sellcey@cavium.com> 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