[llvm-dev] opt with Polly doesn't find the passes

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 2 17:55:15 PST 2016

I just checkout release_38 branches of llvm, clang and polly and built 
it on and x86 Ubuntu with cmake:


cmake -G "Unix Makefiles" \

The build went fine, even 'make check-polly' looks okay:

Scanning dependencies of target check-polly
[100%] Running polly regression tests
Testing Time: 37.39s
   Expected Passes    : 574
   Expected Failures  : 17
[100%] Built target check-polly

Now, I like to follow the matmul example in polly. But whatever polly 
pass I am trying to run opt seem to not find it:

opt -load ~/toolchain/install/llvm-3.8/lib/libPolly.so -S 
-polly-canonicalize matmul.s > matmul.preopt.ll

opt: Unknown command line argument '-polly-canonicalize'.  Try: 'opt -help'
opt: Did you mean '-polly-delinearize'?

I am sure that loading the library works, since opt -load 
~/toolchain/install/llvm-3.8/lib/libPolly.so -help prints out:

Polly Options:
Configure the polly loop optimizer

   -polly                                                         - 
Enable the polly optimizer (only at -O3)
   -polly-2nd-level-tiling                                        - 
Enable a 2nd level loop of loop tiling
   -polly-context=<isl parameter set>                             - 
Provide additional constraints on the context parameters
   -polly-only-func=<string>                                      - Only 
run on functions that contain a certain string
   -polly-only-region=<identifier>                                - Only 
run on certain regions (The provided identifier must appear in the name 
of the region's entry block
   -polly-only-scop-detection                                     - Only 
run scop detection, but no other optimizations
   -polly-parallel                                                - 
Generate thread parallel code (isl codegen only)
   -polly-parallel-force                                          - 
Force generation of thread parallel code ignoring any cost model
   -polly-process-unprofitable                                    - 
Process scops that are unlikely to benefit from Polly optimizations.
   -polly-register-tiling                                         - 
Enable register tiling
   -polly-report                                                  - 
Print information about the activities of Polly
   -polly-show                                                    - 
Highlight the code regions that will be optimized in a (CFG BBs and 
LLVM-IR instructions)
   -polly-show-only                                               - 
Highlight the code regions that will be optimized in a (CFG only BBs)
   -polly-tiling                                                  - 
Enable loop tiling
   -polly-vectorizer                                              - 
Select the vectorization strategy
     =none                                                        -   No 
     =polly                                                       - 
Polly internal vectorizer
     =stripmine                                                   - 
Strip-mine outer loops for the loop-vectorizer to trigger

(If I grep the polly source for 'canonicalize' I see the module pass 
class PollyCanonicalize).

What am I missing?


More information about the llvm-dev mailing list