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

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 3 06:36:33 PST 2016


Hi Tobias,

the system does not have a /usr/local/bin/opt (I didn't install any 
Ubuntu clang rpm). I made sure I was using the correct 'opt'. But I also 
qualify the full pathname and it responds the same way.

If I grep -help-hidden for canonicalize I get an empty output. Below is 
the full (polly related) output.

This is odd.

Thanks,
Frank



~/toolchain/install/llvm-3.8/bin/opt -load 
~/toolchain/install/llvm-3.8/lib/libPolly.so -help-hidden|grep polly
   -polly-dce-precise-steps=<int>                                 - The 
number of precise steps between two approximating iterations. (A value 
of -1 schedules another approximation stage before the actual dead code 
elimination.
   -polly-num-threads=<int>                                       - 
Number of threads to use (0 = auto)
   -polly-view-all                                                - Also 
show functions without any scops
   -polly-view-only=<string>                                      - Only 
view functions that match this pattern
Configure the polly loop optimizer
   -disable-polly-legality                                        - 
Disable polly legality check
   -enable-polly-aligned                                          - 
Assumed aligned memory accesses.
   -polly                                                         - 
Enable the polly optimizer (only at -O3)
   -polly-2nd-level-default-tile-size=<int>                       - The 
default 2nd-level tile size (if not enough were provided by 
--polly-2nd-level-tile-sizes)
   -polly-2nd-level-tile-sizes=<int>                              - A 
tile size for each loop dimension, filled with --polly-default-tile-size
   -polly-2nd-level-tiling                                        - 
Enable a 2nd level loop of loop tiling
   -polly-allow-nonaffine                                         - 
Allow non affine access functions in arrays
   -polly-allow-nonaffine-branches                                - 
Allow non affine conditions for branches
   -polly-allow-nonaffine-loops                                   - 
Allow non affine conditions for loops
   -polly-allow-unsigned                                          - 
Allow unsigned expressions
   -polly-analyze-read-only-scalars                               - 
Model read-only scalar values in the scop description
   -polly-ast-detect-parallel                                     - 
Detect parallelism
   -polly-ast-use-context                                         - Use 
context
   -polly-code-generator                                          - 
Select the code generator
   -polly-codegen-add-debug-printing                              - Add 
printf calls that show the values loaded/stored.
   -polly-context=<isl parameter set>                             - 
Provide additional constraints on the context parameters
   -polly-default-tile-size=<int>                                 - The 
default tile size (if not enough were provided by --polly-tile-sizes)
   -polly-delinearize                                             - 
Delinearize array access functions
   -polly-dependences-analysis-type                               - The 
kind of dependence analysis to use
   -polly-dependences-computeout=<int>                            - 
Bound the dependence analysis by a maximal amount of computational steps 
(0 means no bound)
   -polly-dependences-use-reductions                              - 
Exploit reductions in dependence analysis
   -polly-detect-keep-going                                       - Do 
not fail on the first error.
   -polly-detect-profitability-min-per-loop-insts=<int>           - The 
minimal number of per-loop instructions before a single loop region is 
considered profitable
   -polly-detect-reductions                                       - 
Detect and exploit reductions
   -polly-detect-track-failures                                   - 
Track failure strings in detecting scop regions
   -polly-detect-verify                                           - 
Verify the detected SCoPs after each transformation
   -polly-disable-multiplicative-reductions                       - 
Disable multiplicative reductions
   -polly-dot                                                     - 
Enable the Polly DOT printer in -O3
   -polly-dot-only                                                - 
Enable the Polly DOT printer in -O3 (no BB content)
   -polly-export                                                  - 
Export the polyhedral description of the detected Scops
   -polly-ignore-aliasing                                         - 
Ignore possible aliasing of the array bases
   -polly-ignore-integer-wrapping                                 - Do 
not build run-time checks to proof absence of integer wrapping
   -polly-import                                                  - 
Export the polyhedral description of the detected Scops
   -polly-import-jscop-dir=<Directory path>                       - The 
directory to import the .jscop files from.
   -polly-import-jscop-postfix=<File postfix>                     - 
Postfix to append to the import .jsop files.
   -polly-max-disjuncts-assumed=<int>                             - The 
maximal number of disjuncts we allow in the assumption context (this 
bounds compile time)
   -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-opt-fusion=<string>                                     - The 
fusion strategy to choose (min/max)
   -polly-opt-max-coefficient=<int>                               - The 
maximal coefficient allowed (-1 is unlimited)
   -polly-opt-max-constant-term=<int>                             - The 
maximal constant term allowed (-1 is unlimited)
   -polly-opt-maximize-bands=<string>                             - 
Maximize the band depth (yes/no)
   -polly-opt-optimize-only=<string>                              - Only 
a certain kind of dependences (all/raw)
   -polly-opt-simplify-deps=<string>                              - 
Dependences should be simplified (yes/no)
   -polly-optimizer                                               - 
Select the scheduling optimizer
   -polly-parallel                                                - 
Generate thread parallel code (isl codegen only)
   -polly-parallel-force                                          - 
Force generation of thread parallel code ignoring any cost model
   -polly-position                                                - 
Where to run polly in the pass pipeline
   -polly-prevect-width=<int>                                     - The 
number of loop iterations to strip-mine for pre-vectorization
   -polly-process-unprofitable                                    - 
Process scops that are unlikely to benefit from Polly optimizations.
   -polly-register-tile-sizes=<int>                               - A 
tile size for each loop dimension, filled with --polly-register-tile-size
   -polly-register-tiling                                         - 
Enable register tiling
   -polly-register-tiling-default-tile-size=<int>                 - The 
default register tile size (if not enough were provided by 
--polly-register-tile-sizes)
   -polly-report                                                  - 
Print information about the activities of Polly
   -polly-rtc-max-arrays-per-group=<uint>                         - The 
maximal number of arrays to compare in each alias group.
   -polly-rtc-max-parameters=<uint>                               - The 
maximal number of parameters allowed in RTCs.
   -polly-run-dce                                                 - Run 
the dead code elimination
   -polly-run-inliner                                             - Run 
an early inliner pass before 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-tile-sizes=<int>                                        - A 
tile size for each loop dimension, filled with --polly-default-tile-size
   -polly-tiling                                                  - 
Enable loop tiling
   -polly-use-runtime-alias-checks                                - Use 
runtime alias checks to resolve possible aliasing.
   -polly-vectorizer                                              - 
Select the vectorization strategy
     =polly                                                       - 
Polly internal vectorizer
   -polly-view-cfg                                                - Show 
the Polly CFG right after code generation







On 02/03/2016 04:46 AM, Tobias Grosser wrote:
> On 02/03/2016 02:55 AM, Frank Winter via llvm-dev wrote:
>> I just checkout release_38 branches of llvm, clang and polly and built
>> it on and x86 Ubuntu with cmake:
>>
>> CMAKE_BUILD_TYPE="Debug"
>> CMAKE_INSTALL_PREFIX="$HOME/toolchain/install/llvm-3.8"
>> LLVM_TARGETS_TO_BUILD="X86"
>>
>> cmake -G "Unix Makefiles" \
>> -DBUILD_SHARED_LIBS="ON" \
>> -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
>> -DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX \
>> -DLLVM_TARGETS_TO_BUILD=$LLVM_TARGETS_TO_BUILD \
>> $SRC
>>
>> 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:
>
> Hi Frank,
>
> this is interesting and I do not yet understand what is going on here.
> Let me shoot some first guesses:
>
> Which 'opt' are you runnning. Did you run:
>
> ~/toolchain/install/llvm-3.8/bin/opt -load
> ~/toolchain/install/llvm-3.8/lib/libPolly.so
>
> or rather some
>
> /usr/local/bin/opt -load ~/toolchain/install/llvm-3.8/lib/libPolly.so
>
> Also, what does:
>
> ~/toolchain/install/llvm-3.8/bin/opt -load
> ~/toolchain/install/llvm-3.8/lib/libPolly.so -help-hidden | grep
> canonicalize give you?
>
> Best,
> Tobias




More information about the llvm-dev mailing list