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

Frank Winter via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 3 07:37:52 PST 2016

Hi Tobias,

I tried to invoke other passes and none of them are available, e.g.:

~/toolchain/install/llvm-3.8/bin/opt -load 
~/toolchain/install/llvm-3.8/lib/libPolly.so -polly-cleanup

opt: Unknown command line argument '-polly-cleanup'.  Try: 
'/home/fwinter/toolchain/install/llvm-3.8/bin/opt -help'
opt: Did you mean '-polly-tiling'?

I am just shooting around hoping to get a clue what's going on...

On thing.. I recall reading the polly documentation that there was the 
option to link opt statically with the polly library which I did not 
select. But that's likely not the problem since a lot of polly options 
are apparently there.

Out of ideas for now.


fwinter at frank-vaio:~/svn/llvm-3.8/tools/polly$ grep -r 
lib/CodeGen/IslAst.cpp:INITIALIZE_PASS_BEGIN(IslAstInfo, "polly-ast",
lib/Transform/DeadCodeElimination.cpp:INITIALIZE_PASS_BEGIN(DeadCodeElim, "polly-dce",
lib/Analysis/ScopInfo.cpp:INITIALIZE_PASS_BEGIN(ScopInfo, "polly-scops",

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_INSTALL_PREFIX="$HOME/toolchain/install/llvm-3.8"
>> cmake -G "Unix Makefiles" \
>> $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