llvm::BasicTTIImplBase::isLegalAddressingMode

Return true if the described addressing mode is legal for type Ty.

Synopsis

Declared in <llvm/CodeGen/BasicTTIImpl.h>

bool
isLegalAddressingMode(
    Type* Ty,
    GlobalValue* BaseGV,
    int64_t BaseOffset,
    bool HasBaseReg,
    int64_t Scale,
    unsigned int AddrSpace,
    Instruction* I = nullptr,
    int64_t ScalableOffset = 0) const override;

Description

Ty may be VoidTy to mean any legal memory type. ScalableOffset is a byte quantity multiplied by vscale.

Return Value

True if the described addressing mode is legal for type Ty.

Parameters

NameDescription
TyType of the load/store, or void for any legal type.
BaseGVOptional global base.
BaseOffsetFixed base offset in bytes.
HasBaseRegWhether a base register is present.
ScaleScaled-index multiplier.
AddrSpaceAddress space of the pointer.
IOptional context instruction for targets that need it.
ScalableOffsetScalable (vscale-multiplied) offset in bytes.