llvm::MemoryDependenceResults

Provides a lazy, caching interface for making common memory aliasing information queries, backed by LLVM's alias analysis passes.

Synopsis

Declared in <llvm/Analysis/MemoryDependenceAnalysis.h>

class MemoryDependenceResults;

Description

The dependency information returned is somewhat unusual, but is pragmatic. If queried about a store or call that might modify memory, the analysis will return the instruction[s]that may either load from that memory or store to it. If queried with a load or call that can never modify memory, the analysis will return calls and stores that might modify the pointer, but generally does not return loads unless a) they are volatile, or b) they load from must-aliased pointers. Returning a dependence on must-alias'd pointers instead of all pointers interacts well with the internal caching mechanism.

Type Aliases

NameDescription
NonLocalDepInfo Vector of per-block non-local dependence cache entries.

Member Functions

NameDescription
MemoryDependenceResults [constructor]Construct memory dependence results using the given analyses and scan limit.
getClobberOffset Return the clobber offset to dependent instruction.
getDefaultBlockScanLimit Return the default per-block instruction scan limit.
getDependency Returns the instruction on which a memory operation depends.
getInvariantGroupPointerDependency Find a dependence among invariant.group loads/stores of the same pointer.
getNonLocalCallDependency Perform a full dependency query for the specified call, returning the set of blocks that the value is potentially live across.
getNonLocalPointerDependency Return the set of instructions that define or clobber QueryInst's memory.
getPointerDependencyFrom getPointerDependencyFrom overloads
getSimplePointerDependencyFrom Scan for a simple pointer dependence without invariant-group handling.
invalidate Handle invalidation in the new PM.
invalidateCachedPointerInfo Invalidates cached information about the specified pointer, because it may be too conservative in memdep.
invalidateCachedPredecessors Clears the PredIteratorCache info.
removeInstruction Removes an instruction from the dependence analysis, updating the dependence of instructions that previously depended on it.