llvm::Value::stripAndAccumulateConstantOffsets

stripAndAccumulateConstantOffsets overloads

Synopses

Declared in <llvm/IR/Value.h>

Accumulate constant GEP offsets from this pointer and return its base.

Value const*
stripAndAccumulateConstantOffsets(
    DataLayout const& DL,
    APInt& Offset,
    bool AllowNonInbounds,
    bool AllowInvariantGroup = false,
    function_ref<bool(Value&, APInt&)> ExternalAnalysis = nullptr,
    bool LookThroughIntToPtr = false) const;
» more...

Non-const overload of stripAndAccumulateConstantOffsets.

Value*
stripAndAccumulateConstantOffsets(
    DataLayout const& DL,
    APInt& Offset,
    bool AllowNonInbounds,
    bool AllowInvariantGroup = false,
    function_ref<bool(Value&, APInt&)> ExternalAnalysis = nullptr,
    bool LookThroughIntToPtr = false);
» more...

Return Value

The base pointer value after stripping accumulated offsets.

Parameters

NameDescription
DLData layout used to size indices and pointers.
OffsetAPInt that accumulates the constant byte offset.
AllowNonInboundsWhether to accumulate non-inbounds GEP offsets.
AllowInvariantGroupWhether to look through invariant.group intrinsics.
ExternalAnalysisOptional analysis for non-constant GEP operands.
LookThroughIntToPtrWhether to look through IntToPtr/PtrToInt.