CodeQL library for Rust
codeql/rust-all 0.2.5-dev (changelog, source)
Search

Class Make::MakeSsa::SsaPhiDefinition

An SSA phi definition, that is, a pseudo definition for a variable at a point in the flow graph where otherwise two or more definitions for the variable would be visible.

For example, in

if b
  x = 0
else
  x = 1
end
puts x

a phi definition for x is inserted just before the call puts x.

Import path

import codeql.ssa.Ssa

Direct supertypes

Indirect supertypes

Predicates

getAnInput

Gets an input of this phi definition.

hasInputFromBlock

Holds if inp is an input to this phi definition along the edge originating in bb.

Inherited predicates

definesAt

Holds if this SSA definition defines v at index i in basic block bb. Phi nodes are considered to be at index -1, while normal variable writes are at the index of the control flow node they wrap.

from Definition
getARead

Gets a read of this SSA definition.

from SsaDefinition
getAnUltimateDefinition

Gets a definition that ultimately defines this SSA definition and is not itself a phi definition.

from SsaDefinition
getBasicBlock

Gets the basic block to which this SSA definition belongs.

from Definition
getControlFlowNode

Gets the control flow node of this SSA definition.

from SsaDefinition
getLocation

Gets the location of this SSA definition.

from Definition
getSourceVariable

Gets the source variable underlying this SSA definition.

from Definition
isLiveAtEndOfBlock

Holds if this SSA definition is live at the end of basic block bb. That is, this definition reaches the end of basic block bb, at which point it is still live, without crossing another SSA definition of the same source variable.

from SsaDefinition
toString

Gets a textual representation of this SSA definition.

from SsaDefinition