diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-26 22:36:07 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-10-26 22:36:07 +0000 |
commit | 501dc4224586d3cee61101ed6cd0ccc8ba74c43c (patch) | |
tree | b3fc99ead1bb6886b2e0f4d4f18ae3023cb060d2 /lib/CodeGen/MachineVerifier.cpp | |
parent | f1354ae95ac6d7a2f31452301ccce46b6c116e37 (diff) |
Verify that live intervals are connected. If there are multiple connected
components, each should get its own virtual register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineVerifier.cpp')
-rw-r--r-- | lib/CodeGen/MachineVerifier.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineVerifier.cpp b/lib/CodeGen/MachineVerifier.cpp index d6d7dd45cc..b5211ee65b 100644 --- a/lib/CodeGen/MachineVerifier.cpp +++ b/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'; + } } } |