Add runtime checks that compare pointer differences against a distance.

Synopsis

Declared in <llvm/Transforms/Utils/LoopUtils.h>

Value*
addDiffRuntimeChecks(
    Instruction* Loc,
    ArrayRef<PointerDiffInfo> Checks,
    SCEVExpander& Expander,
    ElementCount VF,
    unsigned int IC);

Return Value

The final comparator value, or nullptr if no check is needed.

Parameters

Name

Description

Loc

Insertion point for the runtime checks.

Checks

Pointer‐difference descriptors to validate.

Expander

SCEV expander used to materialize addresses.

VF

Vectorization factor used when scaling the distance.

IC

Interleave count used when scaling the distance.

Created with MrDocs