[llvm-commits] [llvm] r41064 - in /llvm/trunk/lib/CodeGen: LiveInterval.cpp SimpleRegisterCoalescing.cpp
Evan Cheng
evan.cheng at apple.com
Mon Aug 13 18:56:58 PDT 2007
Author: evancheng
Date: Mon Aug 13 20:56:58 2007
New Revision: 41064
URL: http://llvm.org/viewvc/llvm-project?rev=41064&view=rev
Log:
Kill info update bugs.
Modified:
llvm/trunk/lib/CodeGen/LiveInterval.cpp
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=41064&r1=41063&r2=41064&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Mon Aug 13 20:56:58 2007
@@ -109,6 +109,7 @@
void LiveInterval::extendIntervalEndTo(Ranges::iterator I, unsigned NewEnd) {
assert(I != ranges.end() && "Not a valid interval!");
unsigned ValId = I->ValId;
+ unsigned OldEnd = I->end;
// Search for the first interval that we can't merge with.
Ranges::iterator MergeTo = next(I);
@@ -123,7 +124,7 @@
ranges.erase(next(I), MergeTo);
// Update kill info.
- removeKillForValNum(ValId, I->start, I->end-1);
+ removeKillForValNum(ValId, OldEnd, I->end-1);
// If the newly formed range now touches the range after it and if they have
// the same value number, merge the two ranges into one range.
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=41064&r1=41063&r2=41064&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Aug 13 20:56:58 2007
@@ -559,8 +559,8 @@
// Okay, the final step is to loop over the RHS live intervals, adding them to
// the LHS.
- LHS.MergeRangesInAsValue(RHS, LHSValNo);
LHS.addKillsForValNum(LHSValNo, VNI.kills);
+ LHS.MergeRangesInAsValue(RHS, LHSValNo);
LHS.weight += RHS.weight;
if (RHS.preference && !LHS.preference)
LHS.preference = RHS.preference;
More information about the llvm-commits
mailing list