Return true if poison from Root would force UB on the path to OnPathTo.
Synopsis
Declared in <llvm/Analysis/ValueTracking.h>
bool
mustExecuteUBIfPoisonOnPathTo(
Instruction* Root,
Instruction* OnPathTo,
DominatorTree* DT);
Description
Note that this doesn't say anything about whether OnPathTo is actually executed or whether Root is actually poison. This can be used to assess whether a new use of Root can be added at a location which is control equivalent with OnPathTo (such as immediately before it) without introducing UB which didn't previously exist. Note that a false result conveys no information.
Return Value
True if poison from Root implies UB before OnPathTo.
Parameters
Name |
Description |
Root |
Instruction that may produce poison. |
OnPathTo |
Instruction that must be reached with UB if Root is poison. |
DT |
Dominator tree used to reason about the path. |
Created with MrDocs