CodeQL library for C/C++
codeql/cpp-all 5.1.0 (changelog, source)
Search

Predicate DefUse::locationLiveOnEntryToBlock

Holds if the specified useLocation is live on entry to block. This holds if there is a use of useLocation that is reachable from the start of block without passing through a definition that overlaps useLocation. Note that even a partially-overlapping definition blocks liveness, because such a definition will insert a Chi instruction whose result totally overlaps the location.

Import path

import semmle.code.cpp.ir.implementation.aliased_ssa.internal.SSAConstruction
predicate locationLiveOnEntryToBlock(MemoryLocation useLocation, OldBlock block)