[llvm] f767a7d - [DomTreeUpdater] Remove deprecated methods
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 03:14:36 PDT 2022
Author: Nikita Popov
Date: 2022-04-20T12:14:29+02:00
New Revision: f767a7d1150d3a01b64b49373fdf00368e10d513
URL: https://github.com/llvm/llvm-project/commit/f767a7d1150d3a01b64b49373fdf00368e10d513
DIFF: https://github.com/llvm/llvm-project/commit/f767a7d1150d3a01b64b49373fdf00368e10d513.diff
LOG: [DomTreeUpdater] Remove deprecated methods
Remove the insertEdge(), insertEdgeRelaxed(), deleteEdge() and
deleteEdgeRelaxed() methods, which have been deprecated three
years ago.
Added:
Modified:
llvm/include/llvm/Analysis/DomTreeUpdater.h
llvm/lib/Analysis/DomTreeUpdater.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/DomTreeUpdater.h b/llvm/include/llvm/Analysis/DomTreeUpdater.h
index d09154d506eda..ddb958455ccd7 100644
--- a/llvm/include/llvm/Analysis/DomTreeUpdater.h
+++ b/llvm/include/llvm/Analysis/DomTreeUpdater.h
@@ -150,49 +150,6 @@ class DomTreeUpdater {
/// awaiting deletion immediately.
void recalculate(Function &F);
- /// \deprecated { Submit an edge insertion to all available trees. The Eager
- /// Strategy flushes this update immediately while the Lazy Strategy queues
- /// the update. An internal function checks if the edge exists in the CFG in
- /// DEBUG mode. CAUTION! This function has to be called *after* making the
- /// update on the actual CFG. It is illegal to submit any update that has
- /// already been applied. }
- LLVM_ATTRIBUTE_DEPRECATED(void insertEdge(BasicBlock *From, BasicBlock *To),
- "Use applyUpdates() instead.");
-
- /// \deprecated {Submit an edge insertion to all available trees.
- /// Under either Strategy, an invalid update will be discard silently.
- /// Invalid update means inserting an edge that does not exist in the CFG.
- /// The Eager Strategy flushes this update immediately while the Lazy Strategy
- /// queues the update. It is only recommended to use this method when you
- /// want to discard an invalid update.
- /// CAUTION! It is illegal to submit any update that has already been
- /// submitted. }
- LLVM_ATTRIBUTE_DEPRECATED(void insertEdgeRelaxed(BasicBlock *From,
- BasicBlock *To),
- "Use applyUpdatesPermissive() instead.");
-
- /// \deprecated { Submit an edge deletion to all available trees. The Eager
- /// Strategy flushes this update immediately while the Lazy Strategy queues
- /// the update. An internal function checks if the edge doesn't exist in the
- /// CFG in DEBUG mode.
- /// CAUTION! This function has to be called *after* making the update on the
- /// actual CFG. It is illegal to submit any update that has already been
- /// submitted. }
- LLVM_ATTRIBUTE_DEPRECATED(void deleteEdge(BasicBlock *From, BasicBlock *To),
- "Use applyUpdates() instead.");
-
- /// \deprecated { Submit an edge deletion to all available trees.
- /// Under either Strategy, an invalid update will be discard silently.
- /// Invalid update means deleting an edge that exists in the CFG.
- /// The Eager Strategy flushes this update immediately while the Lazy Strategy
- /// queues the update. It is only recommended to use this method when you
- /// want to discard an invalid update.
- /// CAUTION! It is illegal to submit any update that has already been
- /// submitted. }
- LLVM_ATTRIBUTE_DEPRECATED(void deleteEdgeRelaxed(BasicBlock *From,
- BasicBlock *To),
- "Use applyUpdatesPermissive() instead.");
-
/// Delete DelBB. DelBB will be removed from its Parent and
/// erased from available trees if it exists and finally get deleted.
/// Under Eager UpdateStrategy, DelBB will be processed immediately.
diff --git a/llvm/lib/Analysis/DomTreeUpdater.cpp b/llvm/lib/Analysis/DomTreeUpdater.cpp
index 6b9376543b1a9..888c167232089 100644
--- a/llvm/lib/Analysis/DomTreeUpdater.cpp
+++ b/llvm/lib/Analysis/DomTreeUpdater.cpp
@@ -315,98 +315,6 @@ PostDominatorTree &DomTreeUpdater::getPostDomTree() {
return *PDT;
}
-void DomTreeUpdater::insertEdge(BasicBlock *From, BasicBlock *To) {
-
-#ifndef NDEBUG
- assert(isUpdateValid({DominatorTree::Insert, From, To}) &&
- "Inserted edge does not appear in the CFG");
-#endif
-
- if (!DT && !PDT)
- return;
-
- // Won't affect DomTree and PostDomTree; discard update.
- if (From == To)
- return;
-
- if (Strategy == UpdateStrategy::Eager) {
- if (DT)
- DT->insertEdge(From, To);
- if (PDT)
- PDT->insertEdge(From, To);
- return;
- }
-
- PendUpdates.push_back({DominatorTree::Insert, From, To});
-}
-
-void DomTreeUpdater::insertEdgeRelaxed(BasicBlock *From, BasicBlock *To) {
- if (From == To)
- return;
-
- if (!DT && !PDT)
- return;
-
- if (!isUpdateValid({DominatorTree::Insert, From, To}))
- return;
-
- if (Strategy == UpdateStrategy::Eager) {
- if (DT)
- DT->insertEdge(From, To);
- if (PDT)
- PDT->insertEdge(From, To);
- return;
- }
-
- PendUpdates.push_back({DominatorTree::Insert, From, To});
-}
-
-void DomTreeUpdater::deleteEdge(BasicBlock *From, BasicBlock *To) {
-
-#ifndef NDEBUG
- assert(isUpdateValid({DominatorTree::Delete, From, To}) &&
- "Deleted edge still exists in the CFG!");
-#endif
-
- if (!DT && !PDT)
- return;
-
- // Won't affect DomTree and PostDomTree; discard update.
- if (From == To)
- return;
-
- if (Strategy == UpdateStrategy::Eager) {
- if (DT)
- DT->deleteEdge(From, To);
- if (PDT)
- PDT->deleteEdge(From, To);
- return;
- }
-
- PendUpdates.push_back({DominatorTree::Delete, From, To});
-}
-
-void DomTreeUpdater::deleteEdgeRelaxed(BasicBlock *From, BasicBlock *To) {
- if (From == To)
- return;
-
- if (!DT && !PDT)
- return;
-
- if (!isUpdateValid({DominatorTree::Delete, From, To}))
- return;
-
- if (Strategy == UpdateStrategy::Eager) {
- if (DT)
- DT->deleteEdge(From, To);
- if (PDT)
- PDT->deleteEdge(From, To);
- return;
- }
-
- PendUpdates.push_back({DominatorTree::Delete, From, To});
-}
-
void DomTreeUpdater::dropOutOfDateUpdates() {
if (Strategy == DomTreeUpdater::UpdateStrategy::Eager)
return;
More information about the llvm-commits
mailing list