[LLVMdev] Opt pass 'Canonicalize Induction Variables' not working

Tobias Grosser tobias at grosser.es
Mon Jan 16 06:56:16 PST 2012


On 01/16/2012 03:37 PM, Pieter Custers wrote:
> Hello Tobi,
>
> Thank you for the quick reply.
>
> I updated my complete build suite with your script (http://polly.grosser.es/polly.sh). The make-test fails with some errors, the rest went smoothly;
>
> --
> Exit Code: 1
> Command Output (stderr):
> --
> LLVM ERROR: Could not resolve external global address: stdout
> --
>
> ********************
> Testing Time: 10.01s
> ********************
> Failing Tests (3):
>      Polly :: CodeGen/do_pluto_matmult.ll
>      Polly :: CodeGen/single_do_loop_int_max_iterations.ll
>      Polly :: CodeGen/single_do_loop_scev_replace.ll

That is interesting. Can you send me the individual error messages? Are 
you using a 32bit platform?

>
>    Expected Passes    : 104
>    Expected Failures  : 29
>    Unexpected Failures: 3
> make: *** [polly-test] Error 1
>
> When I try your command 'clang -Xclang -load ${POLLY_DLIB} ${FILE}.c -o ${FILE}.ll -S -emit-llvm -mllvm -polly -O0' if fails with the following errors:

The command to prepare the code for Polly was incorrect. I missed a 
'-Xclang' option. The correct one is:

clang -Xclang -load -Xclang ${POLLY_DLIB} ${FILE}.c -o ${FILE}.ll -S 
-emit-llvm -mllvm -polly -O0

to also enable -enable-iv-rewrite you need:

clang -Xclang -load -Xclang ${POLLY_DLIB} ${FILE}.c -o ${FILE}.ll -S 
-emit-llvm -mllvm -polly -O0 -mllvm -enable-iv-rewrite.

I just tried to detect the scops myself. I used for this the following 
command:

alias pollycc='~/Projekte/polly/build_clang/bin/clang -Xclang -load \
                -Xclang ~/Projekte/polly/build_clang/lib/LLVMPolly.so'

pollycc -mllvm -polly-show test.c -c -mllvm -enable-iv-rewrite -mllvm 
-polly -O3

It detects all three loops. Can you reproduce this?

Cheers
Tobi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120116/d7773926/attachment.c>


More information about the llvm-dev mailing list