From: Kazu Hirata Date: Fri, 18 Dec 2020 18:29:51 +0000 (-0800) Subject: [GVNHoist] Remove successorDominate (NFC) X-Git-Tag: llvmorg-13-init~2938 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ac37725df32c5d01460cbe221bd2a7481763c9d;p=platform%2Fupstream%2Fllvm.git [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. --- diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp index 769830d..8478521 100644 --- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp +++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp @@ -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());