[llvm-commits] [llvm] r152458 - /llvm/trunk/lib/CodeGen/MachineVerifier.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Mar 9 16:36:06 PST 2012
Author: stoklund
Date: Fri Mar 9 18:36:06 2012
New Revision: 152458
URL: http://llvm.org/viewvc/llvm-project?rev=152458&view=rev
Log:
Add SSA verification to MachineVerifier.
Somehow we never verified SSA dominance before.
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=152458&r1=152457&r2=152458&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineVerifier.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineVerifier.cpp Fri Mar 9 18:36:06 2012
@@ -1014,8 +1014,18 @@
}
// Now check liveness info if available
- if (LiveVars || LiveInts)
- calcRegsRequired();
+ calcRegsRequired();
+
+ if (MRI->isSSA() && !MF->empty()) {
+ BBInfo &MInfo = MBBInfoMap[&MF->front()];
+ for (RegSet::iterator
+ I = MInfo.vregsRequired.begin(), E = MInfo.vregsRequired.end(); I != E;
+ ++I) {
+ report("Virtual register def doesn't dominate all uses.", MF);
+ *OS << "- register:\t" << PrintReg(*I) << '\n';
+ }
+ }
+
if (LiveVars)
verifyLiveVariables();
if (LiveInts)
More information about the llvm-commits
mailing list