[llvm-commits] [llvm] r47057 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Evan Cheng
evan.cheng at apple.com
Wed Feb 13 01:06:19 PST 2008
Author: evancheng
Date: Wed Feb 13 03:06:18 2008
New Revision: 47057
URL: http://llvm.org/viewvc/llvm-project?rev=47057&view=rev
Log:
Fix a potential serious problem where kills belonging to the val# defined by a two-address instruction is also on the val# that defines the input.
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=47057&r1=47056&r2=47057&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Feb 13 03:06:18 2008
@@ -315,7 +315,6 @@
const LiveRange *OldLR = interval.getLiveRangeContaining(RedefIndex-1);
VNInfo *OldValNo = OldLR->valno;
- unsigned OldEnd = OldLR->end;
// Delete the initial value, which should be short and continuous,
// because the 2-addr copy must be in the same MBB as the redef.
@@ -328,7 +327,8 @@
// The new value number (#1) is defined by the instruction we claimed
// defined value #0.
VNInfo *ValNo = interval.getNextValue(0, 0, VNInfoAllocator);
- interval.copyValNumInfo(ValNo, OldValNo);
+ ValNo->def = OldValNo->def;
+ ValNo->reg = OldValNo->reg;
// Value#0 is now defined by the 2-addr instruction.
OldValNo->def = RedefIndex;
@@ -339,7 +339,6 @@
DOUT << " replace range with " << LR;
interval.addRange(LR);
interval.addKill(ValNo, RedefIndex);
- interval.removeKills(ValNo, RedefIndex, OldEnd);
// If this redefinition is dead, we need to add a dummy unit live
// range covering the def slot.
More information about the llvm-commits
mailing list