On Tue, May 2, 2017 at 11:40 PM, Steve Ellcey <sell...@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
> sell...@cavium.com

Reply via email to