[llvm-commits] [llvm] r117407 - /llvm/trunk/lib/CodeGen/MachineVerifier.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Oct 26 15:36:07 PDT 2010
Author: stoklund
Date: Tue Oct 26 17:36:07 2010
New Revision: 117407
URL: http://llvm.org/viewvc/llvm-project?rev=117407&view=rev
Log:
Verify that live intervals are connected. If there are multiple connected
components, each should get its own virtual register.
Modified:
llvm/trunk/lib/CodeGen/MachineVerifier.cpp
Modified: llvm/trunk/lib/CodeGen/MachineVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineVerifier.cpp?rev=117407&r1=117406&r2=117407&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Tue Oct 26 17:36:07 2010
@@ -167,7 +167,7 @@
// Analysis information if available
LiveVariables *LiveVars;
- const LiveIntervals *LiveInts;
+ LiveIntervals *LiveInts;
SlotIndexes *Indexes;
void visitMachineFunctionBefore();
@@ -1067,6 +1067,14 @@
++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';
+ }
}
}
More information about the llvm-commits
mailing list