diff options
| -rw-r--r-- | llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h | 13 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 15 | 
2 files changed, 8 insertions, 20 deletions
diff --git a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h index 8134483b67d..a08d2a760a2 100644 --- a/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -40,21 +40,14 @@ class TargetLibraryInfo;  class Value;  /// Delete the specified block, which must have no predecessors. -void DeleteDeadBlock( -    BasicBlock *BB, DomTreeUpdater *DTU = nullptr, -    SmallVectorImpl<DominatorTree::UpdateType> *DTUpdates = nullptr); +void DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU = nullptr);  /// Delete the specified blocks from \p BB. The set of deleted blocks must have  /// no predecessors that are not being deleted themselves. \p BBs must have no  /// duplicating blocks. If there are loops among this set of blocks, all  /// relevant loop info updates should be done before this function is called. -/// If \p DTU is specified, all updates of DomTree are done immediately using -/// this updater. -/// If \p DTUpdates is specified, all updates to DomTree  are also appended to -/// this vector, no matter if DTU is specified. -void DeleteDeadBlocks( -    ArrayRef<BasicBlock *> BBs, DomTreeUpdater *DTU = nullptr, -    SmallVectorImpl<DominatorTree::UpdateType> *DTUpdates = nullptr); +void DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs, +                      DomTreeUpdater *DTU = nullptr);  /// We know that BB has one predecessor. If there are any single-entry PHI nodes  /// in it, fold them away. This handles the case when all entries to the PHI diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index 82b9979cfc5..cb8614fcb98 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -47,15 +47,12 @@  using namespace llvm; -void llvm::DeleteDeadBlock( -    BasicBlock *BB, DomTreeUpdater *DTU, -    SmallVectorImpl<DominatorTree::UpdateType> *DTUpdates) { -  DeleteDeadBlocks({BB}, DTU, DTUpdates); +void llvm::DeleteDeadBlock(BasicBlock *BB, DomTreeUpdater *DTU) { +  DeleteDeadBlocks({BB}, DTU);  } -void llvm::DeleteDeadBlocks( -    ArrayRef<BasicBlock *> BBs, DomTreeUpdater *DTU, -    SmallVectorImpl<DominatorTree::UpdateType> *DTUpdates) { +void llvm::DeleteDeadBlocks(ArrayRef <BasicBlock *> BBs, +                            DomTreeUpdater *DTU) {  #ifndef NDEBUG    // Make sure that all predecessors of each dead block is also dead.    SmallPtrSet<BasicBlock *, 4> Dead(BBs.begin(), BBs.end()); @@ -71,7 +68,7 @@ void llvm::DeleteDeadBlocks(      // of their predecessors is going away.      for (BasicBlock *Succ : successors(BB)) {        Succ->removePredecessor(BB); -      if (DTU || DTUpdates) +      if (DTU)          Updates.push_back({DominatorTree::Delete, BB, Succ});      } @@ -95,8 +92,6 @@ void llvm::DeleteDeadBlocks(    }    if (DTU)      DTU->applyUpdates(Updates, /*ForceRemoveDuplicates*/ true); -  if (DTUpdates) -    DTUpdates->append(Updates.begin(), Updates.end());    for (BasicBlock *BB : BBs)      if (DTU)  | 

