[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 14:25:51 PST 2013
On Feb 20, 2013, at 9:03 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> 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 fixed this (and the SlotIndexes case) in r175673. I should probably still add comments explaining their meaning.
Cameron
More information about the llvm-commits
mailing list