aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SimpleRegisterCoalescing.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-07-22 20:08:25 +0000
committerDavid Greene <greened@obbligato.org>2009-07-22 20:08:25 +0000
commit29ff37f39c305455752941fbf8a426b1f4d877fc (patch)
treecd379f840c5159d3e7dddbf3e157b3a572a241dd /lib/CodeGen/SimpleRegisterCoalescing.cpp
parent6930f4f9451c2f852477bdbcb640f0562b661753 (diff)
Make some changes suggested by Bill and Evan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.cpp')
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.cpp b/lib/CodeGen/SimpleRegisterCoalescing.cpp
index f5d85ab454..49f7d9a45f 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -1970,23 +1970,7 @@ bool SimpleRegisterCoalescing::SimpleJoin(LiveInterval &LHS, LiveInterval &RHS){
LHS.addKills(LHSValNo, VNI->kills);
LHS.MergeRangesInAsValue(RHS, LHSValNo);
- // If either of these intervals was spilled, the weight is the
- // weight of the non-spilled interval. This can only happen
- // with iterative coalescers.
- if (LHS.weight == HUGE_VALF && !TargetRegisterInfo::isPhysicalRegister(LHS.reg)) {
- // Remove this assert if you have an iterative coalescer
- assert(0 && "Joining to spilled interval");
- LHS.weight = RHS.weight;
- }
- else if (RHS.weight != HUGE_VALF) {
- LHS.weight += RHS.weight;
- }
- else {
- // Remove this assert if you have an iterative coalescer
- assert(0 && "Joining from spilled interval");
- }
-
- // Otherwise the LHS weight stays the same
+ LHS.ComputeJoinedWeight(RHS);
// Update regalloc hint if both are virtual registers.
if (TargetRegisterInfo::isVirtualRegister(LHS.reg) &&