[llvm] r293075 - Revert "Do not verify dominator tree if it has no roots"

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 09:15:48 PST 2017


Author: mcrosier
Date: Wed Jan 25 11:15:48 2017
New Revision: 293075

URL: http://llvm.org/viewvc/llvm-project?rev=293075&view=rev
Log:
Revert "Do not verify dominator tree if it has no roots"

This reverts commit r293033, per Danny's comment.  In short, we require
domtrees to have roots at all times.

Modified:
    llvm/trunk/lib/CodeGen/MachineDominators.cpp
    llvm/trunk/lib/IR/Dominators.cpp
    llvm/trunk/test/CodeGen/Generic/externally_available.ll

Modified: llvm/trunk/lib/CodeGen/MachineDominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineDominators.cpp?rev=293075&r1=293074&r2=293075&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineDominators.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineDominators.cpp Wed Jan 25 11:15:48 2017
@@ -143,10 +143,6 @@ void MachineDominatorTree::applySplitCri
 }
 
 void MachineDominatorTree::verifyDomTree() const {
-  if (getRoots().empty())
-    // If dominator tree is unavailable, skip verification.
-    return;
-
   MachineFunction &F = *getRoot()->getParent();
 
   MachineDominatorTree OtherDT;

Modified: llvm/trunk/lib/IR/Dominators.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Dominators.cpp?rev=293075&r1=293074&r2=293075&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Dominators.cpp (original)
+++ llvm/trunk/lib/IR/Dominators.cpp Wed Jan 25 11:15:48 2017
@@ -291,10 +291,6 @@ bool DominatorTree::isReachableFromEntry
 }
 
 void DominatorTree::verifyDomTree() const {
-  if (getRoots().empty())
-    // If dominator tree is unavailable, skip verification.
-    return;
-
   Function &F = *getRoot()->getParent();
 
   DominatorTree OtherDT;

Modified: llvm/trunk/test/CodeGen/Generic/externally_available.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/externally_available.ll?rev=293075&r1=293074&r2=293075&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/externally_available.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/externally_available.ll Wed Jan 25 11:15:48 2017
@@ -1,4 +1,4 @@
-; RUN: llc -verify-machine-dom-info < %s | not grep test_
+; RUN: llc < %s | not grep test_
 
 ; test_function should not be emitted to the .s file.
 define available_externally i32 @test_function() {




More information about the llvm-commits mailing list