[llvm] 2948316 - [ValueTracking] Use SmallPtrSetImpl (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 03:37:24 PDT 2023


Author: Nikita Popov
Date: 2023-04-18T12:37:15+02:00
New Revision: 294831688ff9b45b115e00dabd3119d6803414ab

URL: https://github.com/llvm/llvm-project/commit/294831688ff9b45b115e00dabd3119d6803414ab
DIFF: https://github.com/llvm/llvm-project/commit/294831688ff9b45b115e00dabd3119d6803414ab.diff

LOG: [ValueTracking] Use SmallPtrSetImpl (NFC)

Don't hardcode set size in function signature.

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/ValueTracking.h
    llvm/lib/Analysis/ValueTracking.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h
index b0fbd87ef7484..1891dcb301155 100644
--- a/llvm/include/llvm/Analysis/ValueTracking.h
+++ b/llvm/include/llvm/Analysis/ValueTracking.h
@@ -790,7 +790,7 @@ void getGuaranteedWellDefinedOps(const Instruction *I,
 /// when I is executed with any operands which appear in KnownPoison holding
 /// a poison value at the point of execution.
 bool mustTriggerUB(const Instruction *I,
-                   const SmallSet<const Value *, 16> &KnownPoison);
+                   const SmallPtrSetImpl<const Value *> &KnownPoison);
 
 /// Return true if this function can prove that if Inst is executed
 /// and yields a poison value or undef bits, then that will trigger

diff  --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 2578957277155..9fbd9955e25c3 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -6514,7 +6514,7 @@ void llvm::getGuaranteedNonPoisonOps(const Instruction *I,
 }
 
 bool llvm::mustTriggerUB(const Instruction *I,
-                         const SmallSet<const Value *, 16>& KnownPoison) {
+                         const SmallPtrSetImpl<const Value *> &KnownPoison) {
   SmallVector<const Value *, 4> NonPoisonOps;
   getGuaranteedNonPoisonOps(I, NonPoisonOps);
 


        


More information about the llvm-commits mailing list