Holds if def
reaches the certain read at index i
in basic block bb
without going through any other certain read. The boolean samevar
indicates whether the read is a use of def
or whether some number of phi
nodes and/or uncertain reads occur between def
and the read.
Note that since this relation skips over phi nodes and phi reads, it may be quadratic in the number of variable references for certain access patterns.
Import path
import codeql.ssa.Ssa
predicate firstUse(Definition def, BasicBlock bb, int i, boolean samevar)