LLVM
8.0.1
|
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) | |
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... | |
uint8_t | StackID |
unsigned | AddrSpace = 0 |
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 39 of file MachineMemOperand.h.
|
inlineexplicit |
Definition at line 52 of file MachineMemOperand.h.
References llvm::Type::getPointerAddressSpace(), and llvm::Value::getType().
Referenced by getWithOffset().
|
inlineexplicit |
Definition at line 58 of file MachineMemOperand.h.
References llvm::PseudoSourceValue::getAddressSpace().
|
inlineexplicit |
Definition at line 64 of file MachineMemOperand.h.
|
inlineexplicit |
Definition at line 68 of file MachineMemOperand.h.
References llvm::PointerUnion< PT1, PT2 >::dyn_cast(), and llvm::PointerUnion< PT1, PT2 >::get().
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 939 of file MachineOperand.cpp.
Referenced by AddNodeIDCustom(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::MachineMemOperand::getAddrSpace(), llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getIndexedStore(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMaskedGather(), 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::getStore(), llvm::SelectionDAG::getTargetMemSDNode(), llvm::SelectionDAG::getTruncStore(), getWithOffset(), isDispSafeForFrameIndex(), llvm::ARMCallLowering::lowerReturn(), replaceShuffleOfInsert(), and ShrinkLoadReplaceStoreWithStore().
|
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 958 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getConstantPool(), and llvm::MachineFunction::getPSVManager().
Referenced by llvm::ARMTargetLowering::CCAssignFnForReturn(), computeBytesPoppedByCalleeForSRet(), llvm::createXCoreISelDag(), ExpandBVWithShuffles(), getComparePred(), getContiguousRangeOfSetBits(), getExpandedMinMaxOps(), llvm::ARMTargetLowering::getJumpTableEncoding(), getWithOffset(), haveEfficientBuildVectorPattern(), llvm::ARMTargetLowering::isReadOnly(), LowerBUILD_VECTORAsVariablePermute(), lowerBuildVectorAsBroadcast(), LowerUINT_TO_FP_i64(), lowerUINT_TO_FP_vec(), llvm::ARMTargetLowering::ReplaceNodeResults(), replaceShuffleOfInsert(), and useSinCos().
|
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 964 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getFixedStack(), and llvm::MachineFunction::getPSVManager().
Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), llvm::addFrameReference(), llvm::analyzeArguments(), AnalyzeReturnValues(), llvm::X86TargetLowering::BuildFILD(), CallingConvSupported(), CC_Lanai32_VarArg(), CC_MipsO32_FP64(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), emitBuildPairF64Pseudo(), emitClzero(), llvm::TargetLoweringBase::emitPatchPoint(), emitSplitF64Pseudo(), EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), llvm::TargetLowering::expandUnalignedLoad(), llvm::TargetLowering::expandUnalignedStore(), llvm::TargetInstrInfo::foldMemoryOperand(), getAddressForMemoryInput(), getComparePred(), getFrameIndexMMO(), llvm::MipsInstrInfo::GetMemOperand(), getMOVL(), getOffsetFromIndices(), getUnderlyingArgReg(), getVectorCompareInfo(), getWithOffset(), llvm::MipsCallLowering::MipsHandler::handle(), haveEfficientBuildVectorPattern(), InferPointerInfo(), isMulPowOf2(), isSortedByValueNo(), llvm::SITargetLowering::isTypeDesirableForOp(), llvm::MSP430InstrInfo::loadRegFromStackSlot(), llvm::Thumb1InstrInfo::loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), llvm::XCoreInstrInfo::loadRegFromStackSlot(), llvm::ARCInstrInfo::loadRegFromStackSlot(), llvm::AVRInstrInfo::loadRegFromStackSlot(), llvm::SparcInstrInfo::loadRegFromStackSlot(), llvm::AArch64InstrInfo::loadRegFromStackSlot(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), llvm::ARMBaseInstrInfo::loadRegFromStackSlot(), llvm::SIInstrInfo::loadRegFromStackSlot(), llvm::PPCInstrInfo::loadRegFromStackSlot(), LowerADJUST_TRAMPOLINE(), llvm::SITargetLowering::LowerCall(), llvm::SystemZTargetLowering::LowerCall(), lowerCallResult(), LowerCallResult(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundle(), llvm::HexagonTargetLowering::LowerFormalArguments(), llvm::SystemZTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments_64(), LowerI64IntToFP_AVX512DQ(), llvm::X86CallLowering::lowerReturn(), llvm::ARMCallLowering::lowerReturn(), lowerUINT_TO_FP_vec(), LowerVASTART(), mayTailCallThisCC(), PrepareCall(), llvm::ARMTargetLowering::ReplaceNodeResults(), llvm::AArch64FrameLowering::restoreCalleeSavedRegisters(), llvm::SIRegisterInfo::restoreSGPR(), shouldGuaranteeTCO(), llvm::AArch64FrameLowering::spillCalleeSavedRegisters(), spillIncomingStatepointValue(), llvm::SIRegisterInfo::spillSGPR(), llvm::MSP430InstrInfo::storeRegToStackSlot(), llvm::Thumb1InstrInfo::storeRegToStackSlot(), llvm::Thumb2InstrInfo::storeRegToStackSlot(), llvm::XCoreInstrInfo::storeRegToStackSlot(), llvm::ARCInstrInfo::storeRegToStackSlot(), llvm::AVRInstrInfo::storeRegToStackSlot(), llvm::SparcInstrInfo::storeRegToStackSlot(), llvm::AArch64InstrInfo::storeRegToStackSlot(), llvm::HexagonInstrInfo::storeRegToStackSlot(), llvm::ARMBaseInstrInfo::storeRegToStackSlot(), llvm::SIInstrInfo::storeRegToStackSlot(), llvm::PPCInstrInfo::storeRegToStackSlot(), StoreTailCallArgumentsToStackSlot(), unpackF64OnRV32DSoftABI(), UnpackFromArgumentSlot(), unpackFromMemLoc(), llvm::SelectionDAGBuilder::visitSPDescriptorParent(), and widenVec().
|
static |
Return a MachinePointerInfo record that refers to a GOT entry.
Definition at line 973 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getGOT(), and llvm::MachineFunction::getPSVManager().
Referenced by buildPCRelGlobalAddress(), llvm::ARMTargetLowering::CCAssignFnForReturn(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), expandLoadStackGuard(), llvm::ARMBaseInstrInfo::expandLoadStackGuardBase(), llvm::MipsTargetLowering::getAddrLocal(), llvm::ARMTargetLowering::getJumpTableEncoding(), getMOVL(), getTOCEntry(), llvm::ARMInstrInfo::getUnindexedOpcode(), getWithOffset(), llvm::ARMTargetLowering::isReadOnly(), LowerEXTRACT_SUBVECTOR(), LowerToTLSExecModel(), llvm::SparcTargetLowering::makeAddress(), and mayTailCallThisCC().
|
static |
Return a MachinePointerInfo record that refers to a jump table entry.
Definition at line 969 of file MachineOperand.cpp.
References llvm::PseudoSourceValueManager::getJumpTable(), and llvm::MachineFunction::getPSVManager().
Referenced by expandf64Toi32(), getWithOffset(), and llvm::ARMTargetLowering::ReplaceNodeResults().
|
static |
Stack pointer relative access.
Definition at line 977 of file MachineOperand.cpp.
References llvm::MachineFunction::getPSVManager(), and llvm::PseudoSourceValueManager::getStack().
Referenced by llvm::AArch64CallLowering::AArch64CallLowering(), llvm::analyzeArguments(), CC_MipsO32_FP64(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::ARMTargetLowering::CCAssignFnForReturn(), computeBytesPoppedByCalleeForSRet(), enableAllocFrameElim(), getCompareCC(), getWithOffset(), llvm::MipsCallLowering::MipsHandler::handle(), isSortedByValueNo(), isSupportedType(), llvm::AMDGPUTargetLowering::loadStackInputValue(), llvm::HexagonTargetLowering::LowerCall(), llvm::SITargetLowering::LowerCall(), mayTailCallThisCC(), PrepareCall(), llvm::AMDGPUTargetLowering::storeStackInputValue(), and llvm::X86CallLowering::X86CallLowering().
|
static |
Stack memory without other information.
Definition at line 982 of file MachineOperand.cpp.
References llvm::DataLayout::getAllocaAddrSpace(), and llvm::MachineFunction::getDataLayout().
Referenced by findUnwindDestinations(), and getWithOffset().
|
inline |
Definition at line 81 of file MachineMemOperand.h.
References C, llvm::PointerUnion< PT1, PT2 >::get(), getAddrSpace(), getConstantPool(), getFixedStack(), getGOT(), getJumpTable(), getStack(), getUnknownStack(), llvm::PointerUnion< PT1, PT2 >::is(), isDereferenceable(), llvm::PointerUnion< PT1, PT2 >::isNull(), MachinePointerInfo(), llvm::RISCVFenceField::O, Size, and StackID.
Referenced by buildMUBUFOffsetLoadStore(), combineLoad(), combineStore(), ConvertSelectToConcatVector(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::ARMSelectionDAGInfo::EmitTargetCodeForMemcpy(), llvm::SystemZSelectionDAGInfo::EmitTargetCodeForMemset(), llvm::X86SelectionDAGInfo::EmitTargetCodeForMemset(), llvm::TargetLowering::expandUnalignedLoad(), llvm::TargetLowering::expandUnalignedStore(), ExtendUsesToFormExtLoad(), llvm::LegalizerHelper::fewerElementsVector(), getExpandedMinMaxOps(), getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), getMemsetStores(), getVectorCompareInfo(), haveEfficientBuildVectorPattern(), isTruncateOf(), isWordAligned(), numVectorEltsOrZero(), llvm::PPCTargetLowering::PerformDAGCombine(), PrepareCall(), llvm::TargetLowering::scalarizeVectorLoad(), llvm::TargetLowering::scalarizeVectorStore(), ShrinkLoadReplaceStoreWithStore(), llvm::TargetLowering::SimplifySetCC(), 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 943 of file MachineOperand.cpp.
References llvm::DataLayout::getPointerSizeInBits(), llvm::isDereferenceableAndAlignedPointer(), and Size.
Referenced by getMemcpyLoadsAndStores(), getMemmoveLoadsAndStores(), and getWithOffset().
unsigned llvm::MachinePointerInfo::AddrSpace = 0 |
Definition at line 50 of file MachineMemOperand.h.
int64_t llvm::MachinePointerInfo::Offset |
Offset - This is an offset from the base Value*.
Definition at line 46 of file MachineMemOperand.h.
Referenced by llvm::MachineMemOperand::getOffset(), and llvm::MachineMemOperand::setOffset().
uint8_t llvm::MachinePointerInfo::StackID |
Definition at line 48 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.
If this is null, then the access is to a pointer in the default address space.
Definition at line 43 of file MachineMemOperand.h.
Referenced by llvm::SelectionDAG::getLoad(), llvm::MachineMemOperand::getOpaqueValue(), llvm::MachineMemOperand::getPseudoValue(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), llvm::MachineMemOperand::getValue(), isStackPtrRelative(), llvm::MachineMemOperand::MachineMemOperand(), and llvm::MachineMemOperand::setValue().