Why doesn't GCC show vectorization information?

后端 未结 2 1034
感情败类
感情败类 2021-02-04 08:05

I\'m using Codeblocks for a C program on Windows 7. The program is using the OMP library. GCC version is 4.9.2. Mingw x86_64-w64-mingw32-gcc-4.9.2.exe.

Flags used are: <

相关标签:
2条回答
  • 2021-02-04 08:31

    In GCC-9.0.0,Messages are now prefixed with optimizaed,missed,or note,rather than the old behavior of all being preixed with note. If want to get exhaustive log of all decisions made by the vectorizer via new -internals suboption of -fopt-info.

    0 讨论(0)
  • 2021-02-04 08:43

    CodeBlocks is an IDE. It doesn't compile anything. GCC does. The -ftree-vectorizer-verbose used to work in previous versions. Now there's -fopt-info, which allows to retrieve information about optimizations (vectorization too); you can find the relevant documentation here.

    It is even shown how to actually retrieve the vectorizer output to stderr: and this one:

    gcc -O2 -ftree-vectorize -fopt-info-vec-missed 
    

    prints information about missed optimization opportunities from vectorization passes on stderr. Note that -fopt-info-vec-missed is equivalent to -fopt-info-missed-vec.

    You can change missed to e.g. optimized, all and so on as listed.

    0 讨论(0)
提交回复
热议问题