[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.

Thanks,
Frank



fwinter at frank-vaio:~/svn/llvm-3.8/tools/polly$ grep -r 
INITIALIZE_PASS_BEGIN *
lib/CodeGen/CodegenCleanup.cpp:INITIALIZE_PASS_BEGIN(CodegenCleanup, 
"polly-cleanup",
lib/CodeGen/CodeGeneration.cpp:INITIALIZE_PASS_BEGIN(CodeGeneration, 
"polly-codegen",
lib/CodeGen/IslAst.cpp:INITIALIZE_PASS_BEGIN(IslAstInfo, "polly-ast",
lib/Transform/CodePreparation.cpp:INITIALIZE_PASS_BEGIN(CodePreparation, 
"polly-prepare",
lib/Transform/Canonicalization.cpp:INITIALIZE_PASS_BEGIN(PollyCanonicalize, 
"polly-canonicalize",
lib/Transform/ScheduleOptimizer.cpp:INITIALIZE_PASS_BEGIN(IslScheduleOptimizer, 
"polly-opt-isl",
lib/Transform/DeadCodeElimination.cpp:INITIALIZE_PASS_BEGIN(DeadCodeElim, "polly-dce",
lib/Analysis/DependenceInfo.cpp:INITIALIZE_PASS_BEGIN(DependenceInfo, 
"polly-dependences",
lib/Analysis/ScopDetection.cpp:INITIALIZE_PASS_BEGIN(ScopDetection, 
"polly-detect",
lib/Analysis/ScopInfo.cpp:INITIALIZE_PASS_BEGIN(ScopInfo, "polly-scops",
lib/Exchange/JSONExporter.cpp:INITIALIZE_PASS_BEGIN(JSONExporter, 
"polly-export-jscop",
lib/Exchange/JSONExporter.cpp:INITIALIZE_PASS_BEGIN(JSONImporter, 
"polly-import-jscop",


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