summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-26 22:36:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-10-26 22:36:07 +0000
commit260fa289df07bed3b8531f20919596248b66d45f (patch)
tree61746e757937cfac013c5fcba41113fe79ab652d /llvm/lib/CodeGen/MachineVerifier.cpp
parent022e7795cff09bb6adbd6b73e43fa9a23d84ae94 (diff)
downloadbcm5719-llvm-260fa289df07bed3b8531f20919596248b66d45f.tar.gz
bcm5719-llvm-260fa289df07bed3b8531f20919596248b66d45f.zip
Verify that live intervals are connected. If there are multiple connected
components, each should get its own virtual register. llvm-svn: 117407
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index d6d7dd45cc2..b5211ee65b3 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -167,7 +167,7 @@ namespace {
// Analysis information if available
LiveVariables *LiveVars;
- const LiveIntervals *LiveInts;
+ LiveIntervals *LiveInts;
SlotIndexes *Indexes;
void visitMachineFunctionBefore();
@@ -1067,6 +1067,14 @@ void MachineVerifier::verifyLiveIntervals() {
++MFI;
}
}
+
+ // Check the LI only has one connected component.
+ ConnectedVNInfoEqClasses ConEQ(*LiveInts);
+ unsigned NumComp = ConEQ.Classify(&LI);
+ if (NumComp > 1) {
+ report("Multiple connected components in live interval", MF);
+ *OS << NumComp << " components in " << LI << '\n';
+ }
}
}
OpenPOWER on IntegriCloud