user45664
user45664

Reputation: 111

How do I enable and get the loop vectorization report from GCC run under Code Blocks?

MY QUESTION IS: Re. loop vectorizer report generated by GCC. i get no report (optrpt.txt) also although i want a printed report what is stderr?. What compiler flags should i be using to generate the report and have it printed to optrpt.txt??

See similar question: Getting an optimization report from GCC But this has not solved my problem, it is mainly the same info that is in the following.

See for instructions and examples: https://gcc.gnu.org/projects/tree-ssa/vectorization.html

An example output of the report from the above website follows:

For the example using the flag: -ftree-vectorizer-verbose=2:

produces for the example:

vect-1.c:82: note: not vectorized, possible dependence between data-refs a[i_124] and a[i_83] vect-1.c:72: note: LOOP VECTORIZED. vect-1.c:64: note: LOOP VECTORIZED. vect-1.c:56: note: LOOP VECTORIZED. vect-1.c:49: note: LOOP VECTORIZED. vect-1.c:41: note: not vectorized: unsupported use in stmt. vect-1.c:31: note: not vectorized: unsupported use in stmt. vect-1.c:13: note: vectorized 4 loops in function.

In my case I am using Win 11 on an AMD Ryzen with code in C. and Code Blocks with the recent GCC version 20.03 running at -O3. I am using the following flags:

-fopenmp

-march=native

-msse2

-ftree-vectorize

-ffast-math

-fopt-info-vec-all=optrpt.txt

i followed instructions from the above website to setup the flags.

Upvotes: 0

Views: 284

Answers (1)

user45664
user45664

Reputation: 111

i added -C to the end of my flags and that solved my problem. i do not know why. i was trying to get an assembly code listing.

Upvotes: -1

Related Questions