[PATCH] D158064: [IR] Add PHINode::removeIncomingValueIf() (NFC)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 10:31:22 PDT 2023
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/IR/Instructions.cpp:150
+ bool DeletePHIIfEmpty) {
+ SmallDenseSet<unsigned> RemoveIndices;
+ for (unsigned Idx = 0; Idx < getNumIncomingValues(); ++Idx)
----------------
This isn't the most efficient implementation... instead of using a set, you could iterate over the value operands and the blocks at the same time. But I guess we can improve it later if it matters.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158064/new/
https://reviews.llvm.org/D158064
More information about the llvm-commits
mailing list