diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-10 00:36:06 +0000 | 
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-03-10 00:36:06 +0000 | 
| commit | 9f3e5744ab4cf255f9cbf674a93fb844c510067f (patch) | |
| tree | c324b6c1f5c88171a7b31469d24a01c5723c8a27 /llvm/lib | |
| parent | 6ea6a144583dde3f04374ea6e55e904e790088a5 (diff) | |
| download | bcm5719-llvm-9f3e5744ab4cf255f9cbf674a93fb844c510067f.tar.gz bcm5719-llvm-9f3e5744ab4cf255f9cbf674a93fb844c510067f.zip | |
Add SSA verification to MachineVerifier.
Somehow we never verified SSA dominance before.
llvm-svn: 152458
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 14 | 
1 files changed, 12 insertions, 2 deletions
| diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index f26886fd20f..91a536d0631 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -1014,8 +1014,18 @@ void MachineVerifier::visitMachineFunctionAfter() {    }    // 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) | 

