aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-08-16 07:24:22 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-08-16 07:24:22 +0000
commitbc165e436beb02443abea9736c1b77e2dd7828b6 (patch)
treebd72e179c6165f117c3f2e208c86be9390e2631d /lib/CodeGen/SimpleRegisterCoalescing.cpp
parentaf11dc00a0c70fde950f70bd13a43e7cbb98ef72 (diff)
Fix some kill info update bugs; add hidden option -disable-rematerialization to turn off remat for debugging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index 93fb350e84..276a5092f6 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -683,6 +683,8 @@ bool SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, LiveInterval &RH
RHSValNoAssignments[0] = RHSValID;
if (RHSVal0DefinedFromLHS != -1) {
int LHSValId = LHSValNoAssignments[RHSVal0DefinedFromLHS];
+ unsigned DefIdx = RHS.getDefForValNum(0);
+ LiveInterval::removeKill(ValueNumberInfo[LHSValId], DefIdx);
LHS.addKills(ValueNumberInfo[LHSValId], RHS.getKillsForValNum(0));
}
} else {
@@ -797,6 +799,8 @@ bool SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, LiveInterval &RH
if (LHSValId == -1)
continue;
unsigned RHSValId = RHSValNoAssignments[i];
+ unsigned DefIdx = RHS.getDefForValNum(i);
+ LiveInterval::removeKill(ValueNumberInfo[RHSValId], DefIdx);
LHS.addKills(ValueNumberInfo[RHSValId], RHS.getKillsForValNum(i));
}
for (unsigned i = 0, e = LHSValsDefinedFromRHS.size(); i != e; ++i) {
@@ -804,6 +808,8 @@ bool SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, LiveInterval &RH
if (RHSValId == -1)
continue;
unsigned LHSValId = LHSValNoAssignments[i];
+ unsigned DefIdx = LHS.getDefForValNum(i);
+ LiveInterval::removeKill(ValueNumberInfo[LHSValId], DefIdx);
RHS.addKills(ValueNumberInfo[LHSValId], LHS.getKillsForValNum(i));
}