This patch
- adds canCreateUndefOrPoison
- refactors canCreatePoison so it can deal with constantexprs
canCreateUndefOrPoison will be used at D83926.
| Paths 
 |  Differential  D84007  
[ValueTracking] Add canCreateUndefOrPoison & let canCreatePoison use Operator ClosedPublic Authored by aqjune on Jul 17 2020, 1:51 AM. 
Details Summary This patch 
 canCreateUndefOrPoison will be used at D83926. 
Diff Detail 
 Event Timeline
 
 
 
 
 
 
 aqjune added inline comments. aqjune retitled this revision from [ValueTracking] Change canCreatePoison to take Operator, add canCreateUndef to [ValueTracking] Add canCreateUndefOrPoison & let canCreatePoison use Operator.Jul 19 2020, 12:06 AM aqjune marked 2 inline comments as done. aqjune added inline comments. 
 Comment Actions LG 
 This revision is now accepted and ready to land.Jul 19 2020, 6:21 AM Closed by commit rG0a6aee51608d: [ValueTracking] Add canCreateUndefOrPoison & let canCreatePoison use Operator (authored by aqjune).  ·  Explain WhyJul 19 2020, 9:43 AM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
Diff 279097 llvm/include/llvm/Analysis/ValueTracking.h
 llvm/lib/Analysis/ValueTracking.cpp
 llvm/lib/Transforms/Instrumentation/PoisonChecking.cpp
 llvm/unittests/Analysis/ValueTrackingTest.cpp
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Drive by: Now that I see this, I would prefer the public API to have two functions. I'm fine if others disagree but for the users it seems more natural to have canCreateUndef and canCreateUndefOrPoison, (and maybe canCreatePoison).