From 498db6ab4382e93ee4239c3aa3be04dfab1b9dc9 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 25 Aug 2021 08:59:12 -0700 Subject: [PATCH] [Transforms] Remove SplitCriticalEdge (NFC) These functions have not been in use for at least one year. --- .../llvm/Transforms/Utils/BasicBlockUtils.h | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h index b45c182..4bea4c2 100644 --- a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -214,29 +214,6 @@ BasicBlock *SplitKnownCriticalEdge(Instruction *TI, unsigned SuccNum, CriticalEdgeSplittingOptions(), const Twine &BBName = ""); -inline BasicBlock * -SplitCriticalEdge(BasicBlock *BB, succ_iterator SI, - const CriticalEdgeSplittingOptions &Options = - CriticalEdgeSplittingOptions()) { - return SplitCriticalEdge(BB->getTerminator(), SI.getSuccessorIndex(), - Options); -} - -/// If the edge from *PI to BB is not critical, return false. Otherwise, split -/// all edges between the two blocks and return true. This updates all of the -/// same analyses as the other SplitCriticalEdge function. If P is specified, it -/// updates the analyses described above. -inline bool SplitCriticalEdge(BasicBlock *Succ, pred_iterator PI, - const CriticalEdgeSplittingOptions &Options = - CriticalEdgeSplittingOptions()) { - bool MadeChange = false; - Instruction *TI = (*PI)->getTerminator(); - for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) - if (TI->getSuccessor(i) == Succ) - MadeChange |= !!SplitCriticalEdge(TI, i, Options); - return MadeChange; -} - /// If an edge from Src to Dst is critical, split the edge and return true, /// otherwise return false. This method requires that there be an edge between /// the two blocks. It updates the analyses passed in the options struct -- 2.7.4