LLVM 22.0.0git
llvm::MachinePointerInfo Struct Reference

This class contains a discriminated union of information about pointers in memory operands, relating them back to LLVM IR or to virtual locations (such as frame indices) that are exposed during codegen. More...

#include "llvm/CodeGen/MachineMemOperand.h"

Public Member Functions

 MachinePointerInfo (const Value *v, int64_t offset=0, uint8_t ID=0)
 MachinePointerInfo (const PseudoSourceValue *v, int64_t offset=0, uint8_t ID=0)
 MachinePointerInfo (unsigned AddressSpace=0, int64_t offset=0)
 MachinePointerInfo (PointerUnion< const Value *, const PseudoSourceValue * > v, int64_t offset=0, uint8_t ID=0)
MachinePointerInfo getWithOffset (int64_t O) const
LLVM_ABI bool isDereferenceable (unsigned Size, LLVMContext &C, const DataLayout &DL) const
 Return true if memory region [V, V+Offset+Size) is known to be dereferenceable.
LLVM_ABI unsigned getAddrSpace () const
 Return the LLVM IR address space number that this pointer points into.

Static Public Member Functions

static LLVM_ABI MachinePointerInfo getConstantPool (MachineFunction &MF)
 Return a MachinePointerInfo record that refers to the constant pool.
static LLVM_ABI MachinePointerInfo getFixedStack (MachineFunction &MF, int FI, int64_t Offset=0)
 Return a MachinePointerInfo record that refers to the specified FrameIndex.
static LLVM_ABI MachinePointerInfo getJumpTable (MachineFunction &MF)
 Return a MachinePointerInfo record that refers to a jump table entry.
static LLVM_ABI MachinePointerInfo getGOT (MachineFunction &MF)
 Return a MachinePointerInfo record that refers to a GOT entry.
static LLVM_ABI MachinePointerInfo getStack (MachineFunction &MF, int64_t Offset, uint8_t ID=0)
 Stack pointer relative access.
static LLVM_ABI MachinePointerInfo getUnknownStack (MachineFunction &MF)
 Stack memory without other information.

Public Attributes

PointerUnion< const Value *, const PseudoSourceValue * > V
 This is the IR pointer value for the access, or it is null if unknown.
int64_t Offset
 Offset - This is an offset from the base Value*.
unsigned AddrSpace = 0
uint8_t StackID

Detailed Description

This class contains a discriminated union of information about pointers in memory operands, relating them back to LLVM IR or to virtual locations (such as frame indices) that are exposed during codegen.

Definition at line 42 of file MachineMemOperand.h.

Constructor & Destructor Documentation

◆ MachinePointerInfo() [1/4]

llvm::MachinePointerInfo::MachinePointerInfo ( const Value * v,
int64_t offset = 0,
uint8_t ID = 0 )
inlineexplicit

◆ MachinePointerInfo() [2/4]

llvm::MachinePointerInfo::MachinePointerInfo ( const PseudoSourceValue * v,
int64_t offset = 0,
uint8_t ID = 0 )
inlineexplicit

Definition at line 59 of file MachineMemOperand.h.

References AddrSpace, Offset, StackID, and V.

◆ MachinePointerInfo() [3/4]

llvm::MachinePointerInfo::MachinePointerInfo ( unsigned AddressSpace = 0,
int64_t offset = 0 )
inlineexplicit

Definition at line 65 of file MachineMemOperand.h.

References AddrSpace, const, Offset, StackID, and V.

◆ MachinePointerInfo() [4/4]

llvm::MachinePointerInfo::MachinePointerInfo ( PointerUnion< const Value *, const PseudoSourceValue * > v,
int64_t offset = 0,
uint8_t ID = 0 )
inlineexplicit

Definition at line 69 of file MachineMemOperand.h.

References AddrSpace, llvm::cast(), llvm::dyn_cast_if_present(), Offset, StackID, and V.

Member Function Documentation

◆ getAddrSpace()

unsigned MachinePointerInfo::getAddrSpace ( ) const

Return the LLVM IR address space number that this pointer points into.

getAddrSpace - Return the LLVM IR address space number that this pointer points into.

Definition at line 1038 of file MachineOperand.cpp.

References AddrSpace.

Referenced by AddNodeIDCustom(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::MemSDNode::getAddressSpace(), llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getGatherVP(), llvm::SelectionDAG::getGetFPEnv(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getLoadFFVP(), llvm::SelectionDAG::getLoadVP(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedHistogram(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::SelectionDAG::getMemcpy(), getMemcpyLoadsAndStores(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getMemmove(), getMemmoveLoadsAndStores(), llvm::SelectionDAG::getMemset(), getMemsetStores(), llvm::SelectionDAG::getScatterVP(), llvm::SelectionDAG::getSetFPEnv(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getStoreVP(), llvm::SelectionDAG::getStridedLoadVP(), llvm::SelectionDAG::getStridedStoreVP(), llvm::SelectionDAG::getTruncStoreVP(), llvm::SelectionDAG::getTruncStridedStoreVP(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::CombinerHelper::matchCombineExtractedVectorLoad(), narrowExtractedVectorLoad(), and llvm::TargetLowering::scalarizeExtractedVectorLoad().

◆ getConstantPool()

◆ getFixedStack()

MachinePointerInfo MachinePointerInfo::getFixedStack ( MachineFunction & MF,
int FI,
int64_t Offset = 0 )
static

Return a MachinePointerInfo record that refers to the specified FrameIndex.

getFixedStack - Return a MachinePointerInfo record that refers to the the specified FrameIndex.

Definition at line 1064 of file MachineOperand.cpp.

References llvm::PseudoSourceValueManager::getFixedStack(), llvm::MachineFunction::getPSVManager(), MachinePointerInfo(), and Offset.

Referenced by addFrameReference(), llvm::addFrameReference(), llvm::addFrameReference(), llvm::M68k::addFrameReference(), llvm::M68k::addMemOperand(), buildEpilogRestore(), llvm::X86TargetLowering::BuildFILD(), buildPrologSpill(), llvm::SIRegisterInfo::buildVGPRSpillLoadStore(), llvm::LegalizerHelper::createStackTemporary(), emitBuildPairF64Pseudo(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::X86FrameLowering::emitPrologue(), emitSplitF64Pseudo(), EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), llvm::SelectionDAG::expandMultipleResultFPLibCall(), llvm::TargetLowering::expandUnalignedLoad(), llvm::TargetLowering::expandUnalignedStore(), llvm::TargetLowering::expandVECTOR_COMPRESS(), llvm::TargetLowering::expandVectorSplice(), foldInlineAsmMemOperand(), llvm::TargetInstrInfo::foldMemoryOperand(), getAddressForMemoryInput(), getFrameIndexMMO(), getMachineMemOperand(), llvm::MipsInstrInfo::GetMemOperand(), getStackAlignedMMO(), llvm::CallLowering::handleAssignments(), InferPointerInfo(), llvm::CallLowering::insertSRetLoads(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::CSKYInstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::LoongArchInstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::RISCVInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::VEInstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlotNoUpd(), LowerATOMIC_STORE(), llvm::LoongArchTargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerCall(), llvm::SITargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::HexagonTargetLowering::LowerFormalArguments(), llvm::LoongArchTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerFormalArguments(), llvm::VETargetLowering::LowerFormalArguments(), llvm::XtensaTargetLowering::LowerFormalArguments(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_64(), llvm::ARMTargetLowering::PerformMVEExtCombine(), llvm::ARMTargetLowering::PerformMVETruncCombine(), llvm::RISCVDAGToDAGISel::PreprocessISelDAG(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::SIFrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), llvm::SIFrameLowering::spillCalleeSavedRegisters(), spillIncomingStatepointValue(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::CSKYInstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::LoongArchInstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::RISCVInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::VEInstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlotNoUpd(), StoreTailCallArgumentsToStackSlot(), unpack64(), unpackF64OnLA32DSoftABI(), unpackF64OnRV32DSoftABI(), unpackFromMemLoc(), unpackFromMemLoc(), unpackFromMemLoc(), llvm::SelectionDAGBuilder::visitSPDescriptorFailure(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().

◆ getGOT()

◆ getJumpTable()

MachinePointerInfo MachinePointerInfo::getJumpTable ( MachineFunction & MF)
static

Return a MachinePointerInfo record that refers to a jump table entry.

Definition at line 1069 of file MachineOperand.cpp.

References llvm::PseudoSourceValueManager::getJumpTable(), llvm::MachineFunction::getPSVManager(), and MachinePointerInfo().

◆ getStack()

◆ getUnknownStack()

◆ getWithOffset()

◆ isDereferenceable()

bool MachinePointerInfo::isDereferenceable ( unsigned Size,
LLVMContext & C,
const DataLayout & DL ) const

Return true if memory region [V, V+Offset+Size) is known to be dereferenceable.

isDereferenceable - Return true if V is always dereferenceable for Offset + Size byte.

Definition at line 1042 of file MachineOperand.cpp.

References llvm::CallingConv::C, llvm::cast(), DL, llvm::dyn_cast(), llvm::isa(), llvm::isDereferenceableAndAlignedPointer(), Offset, Size, and V.

Referenced by EltsFromConsecutiveLoads(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), and llvm::AMDGPUTargetLowering::WidenOrSplitVectorLoad().

Member Data Documentation

◆ AddrSpace

unsigned llvm::MachinePointerInfo::AddrSpace = 0

◆ Offset

int64_t llvm::MachinePointerInfo::Offset

◆ StackID

uint8_t llvm::MachinePointerInfo::StackID

◆ V


The documentation for this struct was generated from the following files: