CodeQL library for Swift
codeql/swift-all 2.0.4-dev (changelog, source)
Search

Module Make::SsaDefReaches

Import path

import codeql.ssa.Ssa

Predicates

defAdjacentRead
defAdjacentReadExt
defOccursInBlock
getAnUltimateOutput
lastSsaRef

Same as lastSsaRefExt, but ignores phi-reads.

lastSsaRefExt

Holds if the reference to def at index i in basic block bb is the last reference to v inside bb.

maxSsaRefRank
ssaDefExt
ssaDefRank

Same as ssaRefRank(), but restricted to a particular SSA definition def.

ssaDefReachesRank

Holds if the SSA definition def reaches rank index rnk in its own basic block bb.

ssaDefReachesReadWithinBlock

Holds if the SSA definition of v at def reaches index i in the same basic block bb, without crossing another SSA definition of v.

ssaDefReachesThroughBlock
ssaRef

Holds if the ith node of basic block bb is a reference to v, either a read (when k is SsaActualRead()), an SSA definition (when k is SsaDef()), or a phi-read (when k is SsaPhiRead()).

ssaRefNonPhiRead

Holds if the ith node of basic block bb is a reference to v, and this reference is not a phi-read.

ssaRefRank

Gets the (1-based) rank of the reference to v at the ith node of basic block bb, which has the given reference kind k.

varBlockReachesExit

Same as varBlockReachesExitExt, but ignores phi-reads.

varBlockReachesExitExt

Holds if def is accessed in basic block bb (either a read or a write), bb can reach a transitive successor bb2 where def is no longer live, and v is neither read nor written in any block on the path between bb and bb2.

varBlockReachesExt

Holds if def is accessed in basic block bb1 (either a read or a write), bb2 is a transitive successor of bb1, def is live at the end of some predecessor of bb2, and the underlying variable for def is neither read nor written in any block on the path between bb1 and bb2.

varBlockReachesRef

Same as varBlockReachesExt, but ignores phi-reads, and furthermore bb2 is restricted to blocks in which the underlying variable v of def is referenced (either a read or a write).

Classes

SsaRefKind

A classification of SSA variable references into reads and definitions.

Datatypes