[llvm] r175604 - Add support to the two-address pass for updating LiveIntervals in many of the

Cameron Zwarich zwarich at apple.com
Wed Feb 20 11:34:20 PST 2013


On Feb 20, 2013, at 9:03 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:

> On Feb 19, 2013, at 10:46 PM, Cameron Zwarich <zwarich at apple.com> wrote:
> 
>> +  // Udpate LiveIntervals.
>> +  if (LIS) {
>> +    if (MBBI != MBB->begin())
>> +      --MBBI;
>> +    LIS->repairIntervalsInRange(MBB, MBBI, EndMBBI, OrigRegs);
>> +  }
> 
> This looks odd to me.
> 
> If it is correct to not decrement MBBI at begin(), shouldn't it be safe to always always skip the decrement?
> 
> Also, wouldn't it be easier if repairIntervalsInRange() did it's own reversing, instead of making all the callers do it?
> 
> What exactly is the meaning of the range passed to repairIntervalsInRange()? Could you describe that in the function declaration's comment, please?
> 
> It would be natural to me if you passed it just the range of new or changed instructions. If the algorithm needs to find anchor points, that should be a hidden implementation detail.

I plan to make it find the anchor points automatically, I just didn't do it yet in this commit.

Cameron



More information about the llvm-commits mailing list