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?

Steve Ellcey
sell...@cavium.com

Reply via email to