[llvm-commits] [llvm] r73401 - /llvm/trunk/lib/Analysis/IVUsers.cpp

Dan Gohman gohman at apple.com
Fri Jun 19 12:02:43 PDT 2009


On Jun 18, 2009, at 8:49 PM, Sanjiv Gupta wrote:


>
>
>>>>
>>>>
>>>>
>>>>
>>>> +  AddRecStart = SE->getSCEVAtScope(AddRecStart, UseLoop);
>>>>
>>>>
>>>>
>>>> +  SCEVHandle AddRecStride = AddRec->getStepRecurrence(*SE);
>>>>
>>>>
>>>>
>>>> +  AddRecStride = SE->getSCEVAtScope(AddRecStride, UseLoop);
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> Dan,
>>>
>>>
>>>
>>> Since you meant only code cleanup, the last line I think is left  
>>> there by mistake as in the original code we had only one call to
>>>
>>>
>>>
>>> SE->getSCEVAtScope(AddRecStart, UseLoop); which is already there  
>>> two lines above.
>>>
>>
>>
>> Hmm, you're right that this wasn't pure cleanup. This commit is a
>>
>> change I had split out from a larger patch, and I missed that detail.
>>
>> The call isn't redundant though; the first call is doing  
>> getSCEVAtScope
>>
>> for the Start expression, and the second is doing it for the Stride
>>
>> expression. This probably isn't especially valuable at the moment,
>>
>> but it shouldn't cause trouble.
>>
>>
>>
>> Dan
>>
>>
>>
> It is causing trouble. Few of our test cases broke. They run fine if  
> I remove the last call though.

I looked at this, and indeed found a problem. I fixed it
with r73774.

Thanks,

Dan




More information about the llvm-commits mailing list