[GVNHoist] Remove successorDominate (NFC)
authorKazu Hirata <kazu@google.com>
Fri, 18 Dec 2020 18:29:51 +0000 (10:29 -0800)
committerKazu Hirata <kazu@google.com>
Fri, 18 Dec 2020 18:29:52 +0000 (10:29 -0800)
The function was introduced on Aug 25, 2016 in commit
5f0d0e60d11b8d2e48aacf31a82762280f9a8712.

Its last use was removed on Sep 13, 2017 in commit
dfa8741c9693c344477c842a25ee0cb6a6f59fcd.

llvm/lib/Transforms/Scalar/GVNHoist.cpp

index 769830d..8478521 100644 (file)
@@ -293,15 +293,6 @@ private:
   // Return true when there are exception handling in BB.
   bool hasEH(const BasicBlock *BB);
 
-  // Return true when a successor of BB dominates A.
-  bool successorDominate(const BasicBlock *BB, const BasicBlock *A) {
-    for (const BasicBlock *Succ : successors(BB))
-      if (DT->dominates(Succ, A))
-        return true;
-
-    return false;
-  }
-
   // Return true when I1 appears before I2 in the instructions of BB.
   bool firstInBB(const Instruction *I1, const Instruction *I2) {
     assert(I1->getParent() == I2->getParent());