[llvm-branch-commits] [llvm] 5ac3772 - [GVNHoist] Remove successorDominate (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 18 10:34:52 PST 2020


Author: Kazu Hirata
Date: 2020-12-18T10:29:52-08:00
New Revision: 5ac37725df32c5d01460cbe221bd2a7481763c9d

URL: https://github.com/llvm/llvm-project/commit/5ac37725df32c5d01460cbe221bd2a7481763c9d
DIFF: https://github.com/llvm/llvm-project/commit/5ac37725df32c5d01460cbe221bd2a7481763c9d.diff

LOG: [GVNHoist] Remove successorDominate (NFC)

The function was introduced on Aug 25, 2016 in commit
5f0d0e60d11b8d2e48aacf31a82762280f9a8712.

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

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/GVNHoist.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
index 769830da4894..8478521952b1 100644
--- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
@@ -293,15 +293,6 @@ class GVNHoist {
   // 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());


        


More information about the llvm-branch-commits mailing list