[polly] r261474 - [FIX] Compare SCEVs not values during SCEV expansion

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 21 11:14:26 PST 2016


On 02/21/2016 07:42 PM, Johannes Doerfert wrote:
> On 02/21, Tobias Grosser wrote:
>> On 02/21/2016 07:16 PM, Johannes Doerfert wrote:
>>>> On 02/21/2016 05:36 PM, Johannes Doerfert via llvm-commits wrote:
>>>>> Author: jdoerfert
>>>>> Date: Sun Feb 21 10:36:00 2016
>>>>> New Revision: 261474
>>>>>
>>>>> URL: http://llvm.org/viewvc/llvm-project?rev=261474&view=rev
>>>>> Log:
>>>>> [FIX] Compare SCEVs not values during SCEV expansion
>>>>>
>>>>>    This fixes a compile time bug in SPEC2006 403.gcc, namely an endless
>>>>>    recursion in the ScopExpander::visitUnknown function.
>>>>
>>>> A test case would be good. Was there  a specific reason you could not add a
>>>> test case?
>>> I tried but could not generate one. Only when I run it with clang I
>>> triggered the problem. Tried to extract the module as Polly sees it but
>>> it didn't help.
>>
>> How did you extract the code from clang?
> I dumped the Module in ScopInfo for the original command line. But I
> still could not reproduce the behaviour afterwards (opt -O3 -polly on
> the module).

This may also result in different IR reaching Polly. Could you try the 
approach I describe below? I am almost certain it will allow you to 
reproduce the failure just with opt.

If it does not work, can you provide me with the command line options 
you used to trigger the failure on SPEC?

>> The following commands should be equivalent to 'clang -O3 -mllvm -polly':
>>
>> 	clang -O3 -mllvm -disable-llvm-optzns -S -emit-llvm -o out.ll
>> 	opt -O3 -polly
>>
>> Not that extracting test cases with 'clang -O0 -S -emit-llvm' does not give
>> the same results. When -O0 is specified clang e.g. does not emit
>> type based alias analysis metadata which could prevent Polly from optimizing
>> code that it would have optimized otherwise.

Best,
Tobias


More information about the llvm-commits mailing list