[LLVMdev] Polly test and example

Tobias Grosser grosser at fim.uni-passau.de
Thu Jun 9 22:01:33 PDT 2011


On 06/10/2011 01:52 AM, MORIYAMA Tomohiro wrote:
> (2011/06/10 13:25), Tobias Grosser wrote:
>> On 06/10/2011 12:00 AM, MORIYAMA Tomohiro wrote:
>>> H, Tobias
>>> Thank you for your reply.
>>>
>>>
>>> Tobias Grosser wrote:
>>>> Interesting. On what kind of Platform are you running this? Is it still
>>>> Ubuntu 11.04? I assume it's an intel platform, but is it a 32-bit or
>>>> 64bit?
>>>
>>> It is a little bit complicated.
>>>
>>> Intel Core i5 M520.
>>> Ubuntu 11.04-i386 using VMWare Player on Windows 7 Professional(64bit).
>>
>> So it's 32bit.
>
> Certainly.
>
>>>>
>>>> The test cases that are failing are the ones that use 'lli' to execute
>>>> the generated program. There seems to be something wrong in respect to
>>>> lli. Can you run e.g. single_loop.ll with llvm-lit (-v) and show the
>>>> error message.
>>>
>>> OK. This is the message.
>>>
>>> --------
>>> tomohiro at ubuntu:~/llvm/tools/polly/test/CodeGen$ llvm-lit -v
>>> single_loop.ll
>>> llvm-lit: lit.cfg:94: note: using out-of-tree build at
>>> '/home/tomohiro/build/
>>> tools/polly'
>>> -- Testing: 1 tests, 2 threads --
>>> FAIL: Polly :: CodeGen/single_loop.ll (1 of 1)
>>> ******************** TEST 'Polly :: CodeGen/single_loop.ll' FAILED
>>> *************
>>> *******
>>> Script:
>>> --
>>> opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
>>> -polly-prepare -polly
>>> -region-simplify -scev-aa -polly-cloog -analyze<
>>> /home/tomohiro/llvm/tools/
>>> polly/test/CodeGen/single_loop.ll | FileCheck
>>> /home/tomohiro/llvm/tools/polly/
>>> test/CodeGen/single_loop.ll
>>> opt -load /home/tomohiro/build/lib/LLVMPolly.so -basicaa
>>> -polly-prepare -polly
>>> -region-simplify -scev-aa -polly-codegen<
>>> /home/tomohiro/llvm/tools/polly/test
>>> /CodeGen/single_loop.ll | lli -
>>> --
>>> Exit Code: 139
>>> Command Output (stderr):
>>> --
>>> Stack dump:
>>> 0. Program arguments: lli -
>>> /home/tomohiro/build/tools/polly/test/CodeGen/Output/single_loop.ll.script:
>>>
>>> line
>>> 2: 3250 Done opt -load /home/tomohiro/build/lib/LLVMPolly.so
>>> -basicaa -polly-prepare -polly-region-simplify -scev-aa
>>> -polly-codegen< /home/
>>> tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll
>>> 3251 Segmentation fault | lli -
>>
>>
>> Interesting. It seems lli is segfaulting. Can you try to use the
>> following command?
>>
>> opt -load /home/tomohiro/build/lib/LLVMPolly.so \
>> -basicaa -polly-prepare -polly-region-simplify -scev-aa \
>> -polly-codegen \
>> /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
>> | llc - out.s && gcc out.s && ./a.out
>>
>> This means we do not run the created LLVM-IR file with the lli JIT
>> compiler, but use the llc compiler and than gcc to statically compile
>> the binary.
>
> OK. This result is as follows.
>
> tomohiro at ubuntu:~/llvm/tools/polly/test/CodeGen$ opt -load
> /home/tomohiro/build/lib/LLVMPolly.so \
>  > -basicaa -polly-prepare -polly-region-simplify -scev-aa \
>  > -polly-codegen \
>  > /home/tomohiro/llvm/tools/polly/test/CodeGen/single_loop.ll \
>  > | llc - out.s && gcc out.s && ./a.out
> llc: Too many positional arguments specified!
> Can specify at most 1 positional arguments: See: llc -help

Sorry, the last line should be:
| llc -o out.s && gcc out.s && ./a.out

>> In case this does not work, I will investigate this on an i386 machine.
>> All our development machines are amd64 machines and I must admit we did
>> not test too much on i386. So issues on those machines are not too
>> unexpected. Though Raghesh runs i386. He may have seen such a problem
>> before.
>
> I see. I will try it amd64 version but now on VMWare.
> I'm glad if you tell me your environment in detail.

Basically I have an Ubuntu amd64. So if you just want to go ahead with 
some experiments I would us an 64bit operating system. Running Polly on 
64bit is possible (as raghesh did some work on this), but most probably 
our implementation is not yet 100% bug free on 64bit.

I just looked again at the lli test cases and they specifically contain 
amd64 bit target triples. So most probably executing them on a 32bit 
system will never work. If you want to stay with 32bit,  I would try the 
example on the webpage (from scratch) without using the pregenerated 
LLVM-IR files. Let me know if/how this works.

Cheers and thanks for your testing
Tobi



More information about the llvm-dev mailing list