Class Sem::SsaPhiNode
A phi node in the SSA form. A phi node is a kind of node in the SSA form that represents a merge point where multiple control flow paths converge and the value of a variable needs to be selected according to which control flow path was taken. For example, in the following Ruby code:
if b
x = 0
else
x = 1
end
puts x
A phi node for x
is inserted just before the call puts x
, since the
value of x
may come from either x = 0
or x = 1
.
Import path
import semmle.code.java.dataflow.RangeAnalysis
Direct supertypes
Indirect supertypes
Predicates
hasInputFromBlock | Holds if |
Inherited predicates
definesAt | Holds if this SSA definition defines | from Definition |
getAFirstUse | Gets an access of the SSA source variable underlying this SSA variable that can be reached from this SSA variable without passing through any other uses, but potentially through phi nodes and uncertain implicit updates. | from SsaVariable |
getAPhiInputOrPriorDef | Gets an SSA variable whose value can flow to this one in one step. This includes inputs to phi nodes, the prior definition of uncertain updates, and the captured ssa variable for a closure variable. | from SsaVariable |
getAUse | Gets an access of this SSA variable. | from SsaVariable |
getAnUltimateDefinition | Gets a definition that ultimately defines this variable and is not itself a phi node. | from SsaVariable |
getBasicBlock | Gets the | from SsaVariable |
getCfgNode | Gets the | from SsaVariable |
getLocation | Gets the source location for this element. | from SsaVariable |
getSourceVariable | Gets the SSA source variable underlying this SSA variable. | from SsaVariable |
isLiveAtEndOfBlock | Holds if this SSA variable is live at the end of | from SsaVariable |
toString | Gets a textual representation of this SSA variable. | from SsaVariable |