[PATCH] D86477: [ValueTracking] Let getGuaranteedNonPoisonOp find multiple non-poison operands
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 17:59:39 PDT 2020
aqjune added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:5121
const SmallSet<const Value *, 16>& KnownPoison) {
- auto *NotPoison = getGuaranteedNonPoisonOp(I);
- return (NotPoison && KnownPoison.count(NotPoison));
+ SmallSet<const Value *, 4> NonPoisonOps;
+ getGuaranteedNonPoisonOps(I, NonPoisonOps);
----------------
nikic wrote:
> We don't really care about duplicates in this context, so I'd suggest a more efficient SmallVector.
I think set is beneficial for its use at PoisonChecking - it allows introducing one check for one value.
Instead I changed its type to SmallPtrSet as it seems to be more efficient.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86477/new/
https://reviews.llvm.org/D86477
More information about the llvm-commits
mailing list