[llvm-commits] [polly] r143958 - /polly/trunk/lib/Analysis/ScopDetection.cpp

Tobias Grosser grosser at fim.uni-passau.de
Wed Nov 16 05:22:09 PST 2011


On 11/16/2011 06:04 AM, Sebastian Pop wrote:
> On Mon, Nov 7, 2011 at 6:58 AM, Tobias Grosser
> <grosser at fim.uni-passau.de>  wrote:
>> Author: grosser
>> Date: Mon Nov  7 06:58:41 2011
>> New Revision: 143958
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=143958&view=rev
>> Log:
>> ScopDetection: Add ValidatorResult class
>> -    return SCEVType::PARAM;
>> +    if (BaseAddress)
>> +      return ValidatorResult(SCEVType::PARAM);
>> +    else
>> +      return ValidatorResult(SCEVType::PARAM);
>
> This change looks strange: why are you returning the same thing in
> both branches?

It is strange and was probablly buggy. The reason for the ugly code here 
is that we extracted the base address during the validation of the SCEV. 
This approach was problematic in several ways and had the limitation 
that we did not support parameters in access functions.

Now we extract the base address before validating the SCEV, such that 
any special handling for the base address in the SCEV validator can be 
removed. The only one left is a check that the base address is really 
removed from the SCEV.

Cheers
Tobi



More information about the llvm-commits mailing list