llvm::BasicTTIImplBase::getMemoryOpCost

getMemoryOpCost overloads

Synopses

Declared in <llvm/Analysis/TargetTransformInfoImpl.h>

Estimate the cost of a load or store of the given type.

virtual
InstructionCost
getMemoryOpCost(
    unsigned int Opcode,
    Type* Src,
    Align Alignment,
    unsigned int AddressSpace,
    TTI::TargetCostKind CostKind,
    TTI::OperandValueInfo OpInfo,
    Instruction const* I) const;
» more...

Return the cost of a load or store of type Src.

InstructionCost
getMemoryOpCost(
    unsigned int Opcode,
    Type* Src,
    Align Alignment,
    unsigned int AddressSpace,
    TTI::TargetCostKind CostKind,
    TTI::OperandValueInfo OpInfo = {TTI::OK_AnyValue, TTI::OP_None},
    Instruction const* I = nullptr) const override;
» more...

Return Value

  • The cost of Load and Store instructions.
  • The cost of a load or store of type Src.

Parameters

NameDescription
OpcodeInstruction opcode.
SrcSource type of the cast or memory value.
AlignmentRequired alignment of the access.
AddressSpaceAddress space of the memory operation.
CostKindKind of cost to compute.
OpInfoOperand value info for the stored or loaded value.
IInstruction providing context for the query.