LLVM 20.0.0git
|
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 |
bool | isDereferenceable (unsigned Size, LLVMContext &C, const DataLayout &DL) const |
Return true if memory region [V, V+Offset+Size) is known to be dereferenceable. | |
unsigned | getAddrSpace () const |
Return the LLVM IR address space number that this pointer points into. | |
Static Public Member Functions | |
static MachinePointerInfo | getConstantPool (MachineFunction &MF) |
Return a MachinePointerInfo record that refers to the constant pool. | |
static MachinePointerInfo | getFixedStack (MachineFunction &MF, int FI, int64_t Offset=0) |
Return a MachinePointerInfo record that refers to the specified FrameIndex. | |
static MachinePointerInfo | getJumpTable (MachineFunction &MF) |
Return a MachinePointerInfo record that refers to a jump table entry. | |
static MachinePointerInfo | getGOT (MachineFunction &MF) |
Return a MachinePointerInfo record that refers to a GOT entry. | |
static MachinePointerInfo | getStack (MachineFunction &MF, int64_t Offset, uint8_t ID=0) |
Stack pointer relative access. | |
static 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 |
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 41 of file MachineMemOperand.h.
|
inlineexplicit |
Definition at line 52 of file MachineMemOperand.h.
References AddrSpace.
|
inlineexplicit |
Definition at line 58 of file MachineMemOperand.h.
References AddrSpace.
|
inlineexplicit |
Definition at line 64 of file MachineMemOperand.h.
|
inlineexplicit |
Definition at line 68 of file MachineMemOperand.h.
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 1045 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::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::getTruncStore(), llvm::SelectionDAG::getTruncStoreVP(), llvm::SelectionDAG::getTruncStridedStoreVP(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::CombinerHelper::matchCombineExtractedVectorLoad(), and narrowExtractedVectorLoad().
|
static |
Return a MachinePointerInfo record that refers to the constant pool.
getConstantPool - Return a MachinePointerInfo record that refers to the constant pool.
Definition at line 1065 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getConstantPool(), and llvm::MachineFunction::getPSVManager().
Referenced by combineConcatVectorOps(), combineTargetShuffle(), llvm::TargetLowering::CTTZTableLookup(), emitLoadFromConstantPool(), llvm::CSKYInstrInfo::getGlobalBaseReg(), getLargeExternalSymbol(), getLargeGlobalAddress(), lowerBuildVectorAsBroadcast(), LowerUINT_TO_FP_i64(), lowerUINT_TO_FP_vXi32(), and llvm::X86TargetLowering::SimplifyDemandedVectorEltsForTargetShuffle().
|
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 1071 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getFixedStack(), llvm::MachineFunction::getPSVManager(), and Offset.
Referenced by llvm::addFrameReference(), 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::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::VEInstrInfo::loadRegFromStackSlot(), llvm::LoongArchInstrInfo::loadRegFromStackSlot(), llvm::RISCVInstrInfo::loadRegFromStackSlot(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::CSKYInstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlotNoUpd(), LowerATOMIC_STORE(), llvm::SITargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerCall(), llvm::LoongArchTargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerCall(), llvm::TargetLowering::LowerCallTo(), llvm::MipsCallLowering::lowerFormalArguments(), llvm::HexagonTargetLowering::LowerFormalArguments(), llvm::LoongArchTargetLowering::LowerFormalArguments(), llvm::RISCVTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerFormalArguments(), llvm::VETargetLowering::LowerFormalArguments(), llvm::XtensaTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_64(), llvm::ARMTargetLowering::PerformMVEExtCombine(), llvm::ARMTargetLowering::PerformMVETruncCombine(), llvm::RISCVDAGToDAGISel::PreprocessISelDAG(), llvm::X86TargetLowering::ReplaceNodeResults(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), spillIncomingStatepointValue(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::LoongArchInstrInfo::storeRegToStackSlot(), llvm::RISCVInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::VEInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::CSKYInstrInfo::storeRegToStackSlot(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlotNoUpd(), StoreTailCallArgumentsToStackSlot(), unpack64(), unpackF64OnRV32DSoftABI(), unpackFromMemLoc(), and llvm::SelectionDAGBuilder::visitSPDescriptorParent().
|
static |
Return a MachinePointerInfo record that refers to a GOT entry.
Definition at line 1080 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getGOT(), and llvm::MachineFunction::getPSVManager().
Referenced by expandLoadStackGuard(), llvm::ARMBaseInstrInfo::expandLoadStackGuardBase(), llvm::MipsTargetLowering::getAddrLocal(), getzOSCalleeAndADA(), llvm::AMDGPULegalizerInfo::legalizeGlobalValue(), LowerToTLSExecModel(), llvm::SparcTargetLowering::makeAddress(), and llvm::VETargetLowering::makeAddress().
|
static |
Return a MachinePointerInfo record that refers to a jump table entry.
Definition at line 1076 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getJumpTable(), and llvm::MachineFunction::getPSVManager().
|
static |
Stack pointer relative access.
Definition at line 1084 of file MachineOperand.cpp.
References llvm::MachineFunction::getPSVManager(), llvm::PseudoSourceValueManager::getStack(), and Offset.
Referenced by M68kOutgoingArgHandler::getStackAddress(), llvm::AMDGPUTargetLowering::loadStackInputValue(), llvm::SITargetLowering::LowerCall(), llvm::HexagonTargetLowering::LowerCall(), llvm::RISCVTargetLowering::LowerCall(), and llvm::AMDGPUTargetLowering::storeStackInputValue().
|
static |
Stack memory without other information.
Definition at line 1089 of file MachineOperand.cpp.
References llvm::DataLayout::getAllocaAddrSpace(), and llvm::MachineFunction::getDataLayout().
Referenced by llvm::TargetLowering::expandVECTOR_COMPRESS(), llvm::TargetLowering::expandVectorSplice(), llvm::CallLowering::handleAssignments(), and llvm::LegalizerHelper::lowerVECTOR_COMPRESS().
|
inline |
Definition at line 81 of file MachineMemOperand.h.
References AddrSpace, llvm::PointerUnion< PTs >::isNull(), Offset, StackID, and V.
Referenced by llvm::SIRegisterInfo::buildSpillLoadStore(), combineExtractFromVectorLoad(), combineStore(), combineTargetShuffle(), emitBuildPairF64Pseudo(), emitConstantSizeRepmov(), emitConstantSizeRepstos(), emitSplitF64Pseudo(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::SystemZSelectionDAGInfo::EmitTargetCodeForMemset(), llvm::MachineFunction::getMachineMemOperand(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), llvm::LegalizerHelper::lowerExtractInsertVectorElt(), LowerF128Load(), LowerF128Store(), llvm::CombinerHelper::matchCombineExtractedVectorLoad(), PerformSplittingMVETruncToNarrowingStores(), PerformSplittingToNarrowingStores(), PerformSTORECombine(), prepareDescriptorIndirectCall(), llvm::RISCVDAGToDAGISel::PreprocessISelDAG(), reduceMaskedStoreToScalarStore(), ShrinkLoadReplaceStoreWithStore(), splitStoreSplat(), llvm::AMDGPUTargetLowering::SplitVectorLoad(), and llvm::AMDGPUTargetLowering::SplitVectorStore().
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 1049 of file MachineOperand.cpp.
References DL, llvm::isDereferenceableAndAlignedPointer(), Offset, Size, and V.
Referenced by EltsFromConsecutiveLoads(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), and llvm::AMDGPUTargetLowering::WidenOrSplitVectorLoad().
unsigned llvm::MachinePointerInfo::AddrSpace = 0 |
Definition at line 48 of file MachineMemOperand.h.
Referenced by getAddrSpace(), getWithOffset(), and MachinePointerInfo().
int64_t llvm::MachinePointerInfo::Offset |
Offset - This is an offset from the base Value*.
Definition at line 46 of file MachineMemOperand.h.
Referenced by getFixedStack(), getStack(), getWithOffset(), llvm::inferAlignFromPtrInfo(), and isDereferenceable().
uint8_t llvm::MachinePointerInfo::StackID |
Definition at line 50 of file MachineMemOperand.h.
Referenced by getWithOffset().
PointerUnion<const Value *, const PseudoSourceValue *> llvm::MachinePointerInfo::V |
This is the IR pointer value for the access, or it is null if unknown.
Definition at line 43 of file MachineMemOperand.h.
Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getLoadVP(), llvm::MachineFunction::getMachineMemOperand(), getMemcpyLoadsAndStores(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), llvm::SelectionDAG::getTruncStoreVP(), getWithOffset(), llvm::inferAlignFromPtrInfo(), isDereferenceable(), llvm::MachineMemOperand::MachineMemOperand(), and MachinePointerInfo().