[PATCH] D137027: [llvm] Improve performance of programUndefinedIfUndefOrPoison
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 30 01:04:18 PDT 2022
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5748
+ if (propagatesPoison(cast<Operator>(&I))) {
+ for (const Use &U : I.operands()) {
+ if (YieldsPoison.count(U.get())) {
----------------
You can use `for (const Value *Op : I.operands())` here and use `Op` in place of `U.get()`, as you don't care about the specific position of the use in this case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137027/new/
https://reviews.llvm.org/D137027
More information about the llvm-commits
mailing list