How to disable vectorization in opt (LLVM)

I'm struggling with understanding the internals in Polish (a multi-faceted optimizer for LLVM) and I'm stuck with a problem: I know how to disable vectorization in Clang (the -fno-vectorize command option does this), but doing the same in opt eludes me. The documentation only shows how to enable this pass, not disable it. The only way to skip this, as far as I know, is using clang, which cannot print the statistics of the passes (or I couldn't find how to do this). Can anyone help me? Thank!

I use the following commands to start programs:

clang -Xclang -load -Xclang ~/llvm_build/tools/polly/Debug+Asserts/lib/ -O3 -fno-vectorize -mllvm -polly -mllvm -polly-vectorizer=polly -S -emit-llvm in.c -o out.ll
opt -load ~/{Polly shared lib}.so -O3 -polly -polly-vectorizer=polly -stats in.ll -o out.ll


First, it omits the vectorization of the clan, but does not print statistics, the second prints the statistics, but uses the vector, which I don't want.


source to share

1 answer

A proven way is to check sources: .

You are looking for opt -disable-loop-vectorization ...




All Articles