[llvm] 8b9c412 - [DominanceFrontier] fix addToFrontier to use insert
Bing1 Yu via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 22:58:50 PDT 2023
Author: Wenju He
Date: 2023-08-03T13:58:37+08:00
New Revision: 8b9c412aec413fb073b960569b844e989ee32491
URL: https://github.com/llvm/llvm-project/commit/8b9c412aec413fb073b960569b844e989ee32491
DIFF: https://github.com/llvm/llvm-project/commit/8b9c412aec413fb073b960569b844e989ee32491.diff
LOG: [DominanceFrontier] fix addToFrontier to use insert
No new lits are added since addToFrontier is only used in MachineDominanceFrontier::addToFrontier.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D155417
Added:
Modified:
llvm/include/llvm/Analysis/DominanceFrontierImpl.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/DominanceFrontierImpl.h b/llvm/include/llvm/Analysis/DominanceFrontierImpl.h
index 7a5f8f31bae392..3df51d9ad90815 100644
--- a/llvm/include/llvm/Analysis/DominanceFrontierImpl.h
+++ b/llvm/include/llvm/Analysis/DominanceFrontierImpl.h
@@ -57,8 +57,7 @@ template <class BlockT, bool IsPostDom>
void DominanceFrontierBase<BlockT, IsPostDom>::addToFrontier(iterator I,
BlockT *Node) {
assert(I != end() && "BB is not in DominanceFrontier!");
- assert(I->second.count(Node) && "Node is not in DominanceFrontier of BB");
- I->second.erase(Node);
+ I->second.insert(Node);
}
template <class BlockT, bool IsPostDom>
More information about the llvm-commits
mailing list