llvm::getStartAndEndForAccess

getStartAndEndForAccess overloads

Synopses

Declared in <llvm/Analysis/LoopAccessAnalysis.h>

Calculate Start and End points of memory access using exact backedge taken count BTC if computable or maximum backedge taken count MaxBTC otherwise.

std::pair<SCEV const*, SCEV const*>
getStartAndEndForAccess(
    Loop const* Lp,
    SCEV const* PtrExpr,
    Type* AccessTy,
    SCEV const* BTC,
    SCEV const* MaxBTC,
    ScalarEvolution* SE,
    DenseMap<std::pair<SCEV const*, SCEV const*>, std::pair<SCEV const*, SCEV const*>>* PointerBounds,
    DominatorTree* DT,
    AssumptionCache* AC,
    std::optional<ScalarEvolution::LoopGuards>& LoopGuards);
» more...

Overload of getStartAndEndForAccess taking the element size as a SCEV.

std::pair<SCEV const*, SCEV const*>
getStartAndEndForAccess(
    Loop const* Lp,
    SCEV const* PtrExpr,
    SCEV const* EltSizeSCEV,
    SCEV const* BTC,
    SCEV const* MaxBTC,
    ScalarEvolution* SE,
    DenseMap<std::pair<SCEV const*, SCEV const*>, std::pair<SCEV const*, SCEV const*>>* PointerBounds,
    DominatorTree* DT,
    AssumptionCache* AC,
    std::optional<ScalarEvolution::LoopGuards>& LoopGuards);
» more...

Return Value

The start and end SCEVs of the accessed memory region.

Parameters

NameDescription
LpLoop in which the access executes.
PtrExprSCEV for the pointer being accessed.
AccessTyType of the memory access.
BTCExact backedge-taken count when available.
MaxBTCMaximum backedge-taken count used as a fallback.
SEScalarEvolution used to compute start and end expressions.
PointerBoundsOptional cache of previously computed bounds.
DTDominator tree used for context-sensitive reasoning.
ACAssumption cache used to strengthen proofs.
LoopGuardsCached loop guards used while computing bounds.
EltSizeSCEVSCEV for the access size in bytes.