summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2009-12-22 23:54:54 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2009-12-22 23:54:54 +0000
commitb10c69edd075b2e1d9a20cb7b86568edb0145c81 (patch)
treef63a3e80cc60a1da8ce79b3074b7cf10b5d15cf2 /llvm/lib
parentb05fbe14860a588a80e00cbe2f05fbe829579b8b (diff)
downloadbcm5719-llvm-b10c69edd075b2e1d9a20cb7b86568edb0145c81.tar.gz
bcm5719-llvm-b10c69edd075b2e1d9a20cb7b86568edb0145c81.zip
Add coalescer asserts.
llvm-svn: 91945
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index e22887085d7..6314331482d 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -2246,8 +2246,9 @@ SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, LiveInterval &RHS,
continue;
// Figure out the value # from the RHS.
- LHSValsDefinedFromRHS[VNI]=
- RHS.getLiveRangeContaining(VNI->def.getPrevSlot())->valno;
+ LiveRange *lr = RHS.getLiveRangeContaining(VNI->def.getPrevSlot());
+ assert(lr && "Cannot find live range");
+ LHSValsDefinedFromRHS[VNI] = lr->valno;
}
// Loop over the value numbers of the RHS, seeing if any are defined from
@@ -2264,8 +2265,9 @@ SimpleRegisterCoalescing::JoinIntervals(LiveInterval &LHS, LiveInterval &RHS,
continue;
// Figure out the value # from the LHS.
- RHSValsDefinedFromLHS[VNI]=
- LHS.getLiveRangeContaining(VNI->def.getPrevSlot())->valno;
+ LiveRange *lr = LHS.getLiveRangeContaining(VNI->def.getPrevSlot());
+ assert(lr && "Cannot find live range");
+ RHSValsDefinedFromLHS[VNI] = lr->valno;
}
LHSValNoAssignments.resize(LHS.getNumValNums(), -1);
OpenPOWER on IntegriCloud