aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-09 21:20:44 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-09 21:20:44 +0000
commita0382c629093a2edd175dc256750667c296d3a43 (patch)
tree86042c7fc01f8462f3b35f672ad3f0f2fe26005b /lib/CodeGen
parente7e4b51afc12b248927896fb76b4361e18468079 (diff)
Add a forgotten initializer for CheckedFirstInterference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/LiveIntervalUnion.cpp2
-rw-r--r--lib/CodeGen/LiveIntervalUnion.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalUnion.cpp b/lib/CodeGen/LiveIntervalUnion.cpp
index d5c7bf08eb..59d48a4b64 100644
--- a/lib/CodeGen/LiveIntervalUnion.cpp
+++ b/lib/CodeGen/LiveIntervalUnion.cpp
@@ -168,6 +168,8 @@ LiveIntervalUnion::Query::firstInterference() {
IR.VirtRegI = VirtReg->end();
}
findIntersection(FirstInterference);
+ assert((IR.VirtRegI == VirtReg->end() || IR.LiveUnionI.valid())
+ && "Uninitialized iterator");
return FirstInterference;
}
diff --git a/lib/CodeGen/LiveIntervalUnion.h b/lib/CodeGen/LiveIntervalUnion.h
index 54761c715f..5bf86d8c02 100644
--- a/lib/CodeGen/LiveIntervalUnion.h
+++ b/lib/CodeGen/LiveIntervalUnion.h
@@ -145,8 +145,8 @@ public:
Query(): LiveUnion(), VirtReg() {}
Query(LiveInterval *VReg, LiveIntervalUnion *LIU):
- LiveUnion(LIU), VirtReg(VReg), SeenAllInterferences(false),
- SeenUnspillableVReg(false)
+ LiveUnion(LIU), VirtReg(VReg), CheckedFirstInterference(false),
+ SeenAllInterferences(false), SeenUnspillableVReg(false)
{}
void clear() {
@@ -159,6 +159,7 @@ public:
}
void init(LiveInterval *VReg, LiveIntervalUnion *LIU) {
+ assert(VReg && LIU && "Invalid arguments");
if (VirtReg == VReg && LiveUnion == LIU) {
// Retain cached results, e.g. firstInterference.
return;