diff --git a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h --- a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -350,27 +350,6 @@ MemorySSAUpdater *MSSAU = nullptr, bool PreserveLCSSA = false); -/// This method transforms the landing pad, OrigBB, by introducing two new basic -/// blocks into the function. One of those new basic blocks gets the -/// predecessors listed in Preds. The other basic block gets the remaining -/// predecessors of OrigBB. The landingpad instruction OrigBB is clone into both -/// of the new basic blocks. The new blocks are given the suffixes 'Suffix1' and -/// 'Suffix2', and are returned in the NewBBs vector. -/// -/// This currently updates the LLVM IR, DominatorTree, LoopInfo, and LCCSA but -/// no other analyses. In particular, it does not preserve LoopSimplify -/// (because it's complicated to handle the case where one of the edges being -/// split is an exit of a loop with other exits). -/// -/// FIXME: deprecated, switch to the DomTreeUpdater-based one. -void SplitLandingPadPredecessors(BasicBlock *OrigBB, - ArrayRef Preds, - const char *Suffix, const char *Suffix2, - SmallVectorImpl &NewBBs, - DominatorTree *DT, LoopInfo *LI = nullptr, - MemorySSAUpdater *MSSAU = nullptr, - bool PreserveLCSSA = false); - /// This method transforms the landing pad, OrigBB, by introducing two new basic /// blocks into the function. One of those new basic blocks gets the /// predecessors listed in Preds. The other basic block gets the remaining diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -67,6 +67,7 @@ #include "llvm/ADT/Statistic.h" #include "llvm/ADT/iterator_range.h" #include "llvm/Analysis/AssumptionCache.h" +#include "llvm/Analysis/DomTreeUpdater.h" #include "llvm/Analysis/IVUsers.h" #include "llvm/Analysis/LoopAnalysisManager.h" #include "llvm/Analysis/LoopInfo.h" @@ -5570,7 +5571,8 @@ .setKeepOneInputPHIs()); } else { SmallVector NewBBs; - SplitLandingPadPredecessors(Parent, BB, "", "", NewBBs, &DT, &LI); + DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager); + SplitLandingPadPredecessors(Parent, BB, "", "", NewBBs, &DTU, &LI); NewBB = NewBBs[0]; } // If NewBB==NULL, then SplitCriticalEdge refused to split because all diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -1390,17 +1390,6 @@ } } -void llvm::SplitLandingPadPredecessors(BasicBlock *OrigBB, - ArrayRef Preds, - const char *Suffix1, const char *Suffix2, - SmallVectorImpl &NewBBs, - DominatorTree *DT, LoopInfo *LI, - MemorySSAUpdater *MSSAU, - bool PreserveLCSSA) { - return SplitLandingPadPredecessorsImpl( - OrigBB, Preds, Suffix1, Suffix2, NewBBs, - /*DTU=*/nullptr, DT, LI, MSSAU, PreserveLCSSA); -} void llvm::SplitLandingPadPredecessors(BasicBlock *OrigBB, ArrayRef Preds, const char *Suffix1, const char *Suffix2,