llvm::isConsecutiveAccess

Returns true if the memory operations A and B are consecutive. This is a simple API that does not depend on the analysis pass.

Synopsis

Declared in <llvm/Analysis/LoopAccessAnalysis.h>

bool
isConsecutiveAccess(
    Value* A,
    Value* B,
    DataLayout const& DL,
    ScalarEvolution& SE,
    bool CheckType = true);

Return Value

True if the memory operations are consecutive.

Parameters

NameDescription
AFirst memory operation or pointer value.
BSecond memory operation or pointer value.
DLData layout used to compute type sizes and offsets.
SEScalarEvolution used to compare the addresses.
CheckTypeWhen true, require the accessed types to match.