[PATCH] D155417: [DominanceFrontier] fix addToFrontier to use insert
Wenju He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 16 22:20:13 PDT 2023
wenju created this revision.
wenju added reviewers: arsenm, nhaehnle.
Herald added a project: All.
wenju requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
No new lits are added since addToFrontier is only used in MachineDominanceFrontier::addToFrontier.
https://reviews.llvm.org/D155417
Files:
llvm/include/llvm/Analysis/DominanceFrontierImpl.h
Index: llvm/include/llvm/Analysis/DominanceFrontierImpl.h
===================================================================
--- llvm/include/llvm/Analysis/DominanceFrontierImpl.h
+++ llvm/include/llvm/Analysis/DominanceFrontierImpl.h
@@ -57,8 +57,7 @@
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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155417.540859.patch
Type: text/x-patch
Size: 643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230717/371018e6/attachment-0001.bin>
More information about the llvm-commits
mailing list