[llvm] r319882 - [[Machine]Dominators] Improved printout when verifyDomTree fails [NFC]

Mikael Holmen via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 01:27:48 PST 2017


Author: uabelho
Date: Wed Dec  6 01:27:48 2017
New Revision: 319882

URL: http://llvm.org/viewvc/llvm-project?rev=319882&view=rev
Log:
[[Machine]Dominators] Improved printout when verifyDomTree fails [NFC]

Include the function name in the printout.

Modified:
    llvm/trunk/lib/CodeGen/MachineDominators.cpp
    llvm/trunk/lib/IR/Dominators.cpp

Modified: llvm/trunk/lib/CodeGen/MachineDominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineDominators.cpp?rev=319882&r1=319881&r2=319882&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineDominators.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineDominators.cpp Wed Dec  6 01:27:48 2017
@@ -148,7 +148,8 @@ void MachineDominatorTree::verifyDomTree
   OtherDT.recalculate(F);
   if (getRootNode()->getBlock() != OtherDT.getRootNode()->getBlock() ||
       DT->compare(OtherDT)) {
-    errs() << "MachineDominatorTree is not up to date!\nComputed:\n";
+    errs() << "MachineDominatorTree for function " << F.getName()
+           << " is not up to date!\nComputed:\n";
     DT->print(errs());
     errs() << "\nActual:\n";
     OtherDT.print(errs());

Modified: llvm/trunk/lib/IR/Dominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Dominators.cpp?rev=319882&r1=319881&r2=319882&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Dominators.cpp (original)
+++ llvm/trunk/lib/IR/Dominators.cpp Wed Dec  6 01:27:48 2017
@@ -315,7 +315,8 @@ void DominatorTree::verifyDomTree() cons
   DominatorTree OtherDT;
   OtherDT.recalculate(F);
   if (compare(OtherDT)) {
-    errs() << "DominatorTree is not up to date!\nComputed:\n";
+    errs() << "DominatorTree for function " << F.getName()
+           << " is not up to date!\nComputed:\n";
     print(errs());
     errs() << "\nActual:\n";
     OtherDT.print(errs());




More information about the llvm-commits mailing list