LLVM  14.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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"

Collaboration diagram for llvm::MachinePointerInfo:
Collaboration graph
[legend]

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
 
bool isDereferenceable (unsigned Size, LLVMContext &C, const DataLayout &DL) const
 Return true if memory region [V, V+Offset+Size) is known to be dereferenceable. More...
 
unsigned getAddrSpace () const
 Return the LLVM IR address space number that this pointer points into. More...
 

Static Public Member Functions

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

Public Attributes

PointerUnion< const Value *, const PseudoSourceValue * > V
 This is the IR pointer value for the access, or it is null if unknown. More...
 
int64_t Offset
 Offset - This is an offset from the base Value*. More...
 
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 38 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 57 of file MachineMemOperand.h.

References AddrSpace, and llvm::PseudoSourceValue::getAddressSpace().

◆ MachinePointerInfo() [3/4]

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

Definition at line 63 of file MachineMemOperand.h.

◆ MachinePointerInfo() [4/4]

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

Member Function Documentation

◆ getAddrSpace()

unsigned MachinePointerInfo::getAddrSpace ( ) const

◆ getConstantPool()

MachinePointerInfo MachinePointerInfo::getConstantPool ( MachineFunction MF)
static

◆ 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 1003 of file MachineOperand.cpp.

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

Referenced by 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(), emitSplitF64Pseudo(), EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), llvm::TargetLowering::expandUnalignedLoad(), llvm::TargetLowering::expandUnalignedStore(), llvm::TargetInstrInfo::foldMemoryOperand(), getAddressForMemoryInput(), getFrameIndexMMO(), getMachineMemOperand(), llvm::MipsInstrInfo::GetMemOperand(), InferPointerInfo(), llvm::CallLowering::insertSRetLoads(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::RISCVInstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::VEInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlotNoUpd(), llvm::SITargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerCall(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::VETargetLowering::LowerFormalArguments(), llvm::HexagonTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_64(), llvm::ARMTargetLowering::PerformMVETruncCombine(), llvm::RISCVDAGToDAGISel::PreprocessISelDAG(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), spillIncomingStatepointValue(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::RISCVInstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::VEInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlotNoUpd(), StoreTailCallArgumentsToStackSlot(), unpackF64OnRV32DSoftABI(), unpackFromMemLoc(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().

◆ getGOT()

MachinePointerInfo MachinePointerInfo::getGOT ( MachineFunction MF)
static

◆ getJumpTable()

MachinePointerInfo MachinePointerInfo::getJumpTable ( MachineFunction MF)
static

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

Definition at line 1008 of file MachineOperand.cpp.

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

◆ getStack()

MachinePointerInfo MachinePointerInfo::getStack ( MachineFunction MF,
int64_t  Offset,
uint8_t  ID = 0 
)
static

◆ getUnknownStack()

MachinePointerInfo MachinePointerInfo::getUnknownStack ( MachineFunction MF)
static

Stack memory without other information.

Definition at line 1021 of file MachineOperand.cpp.

References llvm::DataLayout::getAllocaAddrSpace(), llvm::MachineFunction::getDataLayout(), and MachinePointerInfo().

◆ getWithOffset()

MachinePointerInfo llvm::MachinePointerInfo::getWithOffset ( int64_t  O) const
inline

◆ 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 982 of file MachineOperand.cpp.

References Align, DL, llvm::PointerUnion< PTs >::get(), llvm::PointerUnion< PTs >::is(), llvm::isDereferenceableAndAlignedPointer(), Offset, llvm::Check::Size, and V.

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

Member Data Documentation

◆ AddrSpace

unsigned llvm::MachinePointerInfo::AddrSpace = 0

Definition at line 47 of file MachineMemOperand.h.

Referenced by getAddrSpace(), getWithOffset(), and MachinePointerInfo().

◆ Offset

int64_t llvm::MachinePointerInfo::Offset

Offset - This is an offset from the base Value*.

Definition at line 45 of file MachineMemOperand.h.

Referenced by getFixedStack(), getStack(), getWithOffset(), llvm::inferAlignFromPtrInfo(), and isDereferenceable().

◆ StackID

uint8_t llvm::MachinePointerInfo::StackID

Definition at line 49 of file MachineMemOperand.h.

Referenced by getWithOffset().

◆ V

PointerUnion<const Value *, const PseudoSourceValue *> llvm::MachinePointerInfo::V

This is the IR pointer value for the access, or it is null if unknown.

If this is null, then the access is to a pointer in the default address space.

Definition at line 42 of file MachineMemOperand.h.

Referenced by llvm::SelectionDAG::getLoad(), llvm::MachineFunction::getMachineMemOperand(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), getWithOffset(), llvm::inferAlignFromPtrInfo(), isDereferenceable(), llvm::MachineMemOperand::MachineMemOperand(), and MachinePointerInfo().


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