Skip to content

Commit

Permalink
[DominanceFrontier] fix addToFrontier to use insert
Browse files Browse the repository at this point in the history
No new lits are added since addToFrontier is only used in MachineDominanceFrontier::addToFrontier.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D155417
  • Loading branch information
wenju-he authored and yubingex007-a11y committed Aug 3, 2023
1 parent 6ee497a commit 8b9c412
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/include/llvm/Analysis/DominanceFrontierImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 8b9c412

Please sign in to comment.