class MachineMemOperand
Declaration
class MachineMemOperand { /* full declaration omitted */ };Description
A description of a memory reference used in the backend. Instead of holding a StoreInst or LoadInst, this class holds the address Value of the reference along with a byte size and offset. This allows it to describe lowered loads and stores. Also, the special PseudoSourceValue objects can be used to represent loads and stores to memory locations that aren't explicit in the regular LLVM IR.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:127
Member Variables
- private llvm::MachinePointerInfo PtrInfo
- private llvm::LLT MemoryType
- Track the memory type of the access. An access size which is unknown or too large to be represented by LLT should use the invalid LLT.
- private llvm::MachineMemOperand::Flags FlagVals
- private llvm::Align BaseAlign
- private llvm::MachineMemOperand::MachineAtomicInfo AtomicInfo
- private llvm::AAMDNodes AAInfo
- private const llvm::MDNode* Ranges
Method Overview
- public MachineMemOperand(llvm::MachinePointerInfo PtrInfo, llvm::MachineMemOperand::Flags flags, llvm::LLT type, llvm::Align a, const llvm::AAMDNodes & AAInfo = llvm::AAMDNodes(), const llvm::MDNode * Ranges = nullptr, SyncScope::ID SSID = SyncScope::System, llvm::AtomicOrdering Ordering = AtomicOrdering::NotAtomic, llvm::AtomicOrdering FailureOrdering = AtomicOrdering::NotAtomic)
- public MachineMemOperand(llvm::MachinePointerInfo PtrInfo, llvm::MachineMemOperand::Flags flags, uint64_t s, llvm::Align a, const llvm::AAMDNodes & AAInfo = llvm::AAMDNodes(), const llvm::MDNode * Ranges = nullptr, SyncScope::ID SSID = SyncScope::System, llvm::AtomicOrdering Ordering = AtomicOrdering::NotAtomic, llvm::AtomicOrdering FailureOrdering = AtomicOrdering::NotAtomic)
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public llvm::AAMDNodes getAAInfo() const
- public unsigned int getAddrSpace() const
- public llvm::Align getAlign() const
- public llvm::Align getBaseAlign() const
- public llvm::AtomicOrdering getFailureOrdering() const
- public llvm::MachineMemOperand::Flags getFlags() const
- public llvm::LLT getMemoryType() const
- public llvm::AtomicOrdering getMergedOrdering() const
- public int64_t getOffset() const
- public const void * getOpaqueValue() const
- public const llvm::MachinePointerInfo & getPointerInfo() const
- public const llvm::PseudoSourceValue * getPseudoValue() const
- public const llvm::MDNode * getRanges() const
- public uint64_t getSize() const
- public uint64_t getSizeInBits() const
- public llvm::AtomicOrdering getSuccessOrdering() const
- public SyncScope::ID getSyncScopeID() const
- public llvm::LLT getType() const
- public const llvm::Value * getValue() const
- public bool isAtomic() const
- public bool isDereferenceable() const
- public bool isInvariant() const
- public bool isLoad() const
- public bool isNonTemporal() const
- public bool isStore() const
- public bool isUnordered() const
- public bool isVolatile() const
- public void print(llvm::raw_ostream & OS, llvm::ModuleSlotTracker & MST, SmallVectorImpl<llvm::StringRef> & SSNs, const llvm::LLVMContext & Context, const llvm::MachineFrameInfo * MFI, const llvm::TargetInstrInfo * TII) const
- public void refineAlignment(const llvm::MachineMemOperand * MMO)
- public void setFlags(llvm::MachineMemOperand::Flags f)
- public void setOffset(int64_t NewOffset)
- public void setType(llvm::LLT NewTy)
- public void setValue(const llvm::Value * NewSV)
- public void setValue(const llvm::PseudoSourceValue * NewSV)
Methods
¶MachineMemOperand(
llvm::MachinePointerInfo PtrInfo,
llvm::MachineMemOperand::Flags flags,
llvm::LLT type,
llvm::Align a,
const llvm::AAMDNodes& AAInfo =
llvm::AAMDNodes(),
const llvm::MDNode* Ranges = nullptr,
SyncScope::ID SSID = SyncScope::System,
llvm::AtomicOrdering Ordering =
AtomicOrdering::NotAtomic,
llvm::AtomicOrdering FailureOrdering =
AtomicOrdering::NotAtomic)
MachineMemOperand(
llvm::MachinePointerInfo PtrInfo,
llvm::MachineMemOperand::Flags flags,
llvm::LLT type,
llvm::Align a,
const llvm::AAMDNodes& AAInfo =
llvm::AAMDNodes(),
const llvm::MDNode* Ranges = nullptr,
SyncScope::ID SSID = SyncScope::System,
llvm::AtomicOrdering Ordering =
AtomicOrdering::NotAtomic,
llvm::AtomicOrdering FailureOrdering =
AtomicOrdering::NotAtomic)Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:194
Parameters
- llvm::MachinePointerInfo PtrInfo
- llvm::MachineMemOperand::Flags flags
- llvm::LLT type
- llvm::Align a
- const llvm::AAMDNodes& AAInfo = llvm::AAMDNodes()
- const llvm::MDNode* Ranges = nullptr
- SyncScope::ID SSID = SyncScope::System
- llvm::AtomicOrdering Ordering = AtomicOrdering::NotAtomic
- llvm::AtomicOrdering FailureOrdering = AtomicOrdering::NotAtomic
¶MachineMemOperand(
llvm::MachinePointerInfo PtrInfo,
llvm::MachineMemOperand::Flags flags,
uint64_t s,
llvm::Align a,
const llvm::AAMDNodes& AAInfo =
llvm::AAMDNodes(),
const llvm::MDNode* Ranges = nullptr,
SyncScope::ID SSID = SyncScope::System,
llvm::AtomicOrdering Ordering =
AtomicOrdering::NotAtomic,
llvm::AtomicOrdering FailureOrdering =
AtomicOrdering::NotAtomic)
MachineMemOperand(
llvm::MachinePointerInfo PtrInfo,
llvm::MachineMemOperand::Flags flags,
uint64_t s,
llvm::Align a,
const llvm::AAMDNodes& AAInfo =
llvm::AAMDNodes(),
const llvm::MDNode* Ranges = nullptr,
SyncScope::ID SSID = SyncScope::System,
llvm::AtomicOrdering Ordering =
AtomicOrdering::NotAtomic,
llvm::AtomicOrdering FailureOrdering =
AtomicOrdering::NotAtomic)Description
Construct a MachineMemOperand object with the specified PtrInfo, flags, size, and base alignment. For atomic operations the synchronization scope and atomic ordering requirements must also be specified. For cmpxchg atomic operations the atomic ordering requirements when store does not occur must also be specified.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:188
Parameters
- llvm::MachinePointerInfo PtrInfo
- llvm::MachineMemOperand::Flags flags
- uint64_t s
- llvm::Align a
- const llvm::AAMDNodes& AAInfo = llvm::AAMDNodes()
- const llvm::MDNode* Ranges = nullptr
- SyncScope::ID SSID = SyncScope::System
- llvm::AtomicOrdering Ordering = AtomicOrdering::NotAtomic
- llvm::AtomicOrdering FailureOrdering = AtomicOrdering::NotAtomic
¶void Profile(llvm::FoldingSetNodeID& ID) const
void Profile(llvm::FoldingSetNodeID& ID) constDescription
Profile - Gather unique data for the object.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:328
Parameters
¶llvm::AAMDNodes getAAInfo() const
llvm::AAMDNodes getAAInfo() constDescription
Return the AA tags for the memory reference.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:257
¶unsigned int getAddrSpace() const
unsigned int getAddrSpace() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:228
¶llvm::Align getAlign() const
llvm::Align getAlign() constDescription
Return the minimum known alignment in bytes of the actual memory reference.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:250
¶llvm::Align getBaseAlign() const
llvm::Align getBaseAlign() constDescription
Return the minimum known alignment in bytes of the base address, without the offset.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:254
¶llvm::AtomicOrdering getFailureOrdering() const
llvm::AtomicOrdering getFailureOrdering() constDescription
For cmpxchg atomic operations, return the atomic ordering requirements when store does not occur.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:276
¶llvm::MachineMemOperand::Flags getFlags() const
llvm::MachineMemOperand::Flags getFlags() constDescription
Return the raw flags of the source value,
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:219
¶llvm::LLT getMemoryType() const
llvm::LLT getMemoryType() constDescription
Return the memory type of the memory reference. This should only be relied on for GlobalISel G_* operation legalization.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:232
¶llvm::AtomicOrdering getMergedOrdering() const
llvm::AtomicOrdering getMergedOrdering() constDescription
Return a single atomic ordering that is at least as strong as both the success and failure orderings for an atomic operation. (For operations other than cmpxchg, this is equivalent to getSuccessOrdering().)
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:283
¶int64_t getOffset() const
int64_t getOffset() constDescription
For normal values, this is a byte offset added to the base address. For PseudoSourceValue::FPRel values, this is the FrameIndex number.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:226
¶const void* getOpaqueValue() const
const void* getOpaqueValue() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:216
¶const llvm::MachinePointerInfo& getPointerInfo()
const
const llvm::MachinePointerInfo& getPointerInfo()
constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:201
¶const llvm::PseudoSourceValue* getPseudoValue()
const
const llvm::PseudoSourceValue* getPseudoValue()
constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:212
¶const llvm::MDNode* getRanges() const
const llvm::MDNode* getRanges() constDescription
Return the range tag for the memory reference.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:260
¶uint64_t getSize() const
uint64_t getSize() constDescription
Return the size in bytes of the memory reference.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:235
¶uint64_t getSizeInBits() const
uint64_t getSizeInBits() constDescription
Return the size in bits of the memory reference.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:240
¶llvm::AtomicOrdering getSuccessOrdering() const
llvm::AtomicOrdering getSuccessOrdering() constDescription
Return the atomic ordering requirements for this memory operation. For cmpxchg atomic operations, return the atomic ordering requirements when store occurs.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:270
¶SyncScope::ID getSyncScopeID() const
SyncScope::ID getSyncScopeID() constDescription
Returns the synchronization scope ID for this memory operation.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:263
¶llvm::LLT getType() const
llvm::LLT getType() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:244
¶const llvm::Value* getValue() const
const llvm::Value* getValue() constDescription
Return the base address of the memory access. This may either be a normal LLVM IR Value, or one of the special values used in CodeGen. Special values are those obtained via PseudoSourceValue::getFixedStack(int), PseudoSourceValue::getStack, and other PseudoSourceValue member functions which return objects which stand for frame/stack pointer relative references and other special references which are not representable in the high-level IR.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:210
¶bool isAtomic() const
bool isAtomic() constDescription
Returns true if this operation has an atomic ordering requirement of unordered or higher, false otherwise.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:296
¶bool isDereferenceable() const
bool isDereferenceable() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:291
¶bool isInvariant() const
bool isInvariant() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:292
¶bool isLoad() const
bool isLoad() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:287
¶bool isNonTemporal() const
bool isNonTemporal() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:290
¶bool isStore() const
bool isStore() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:288
¶bool isUnordered() const
bool isUnordered() constDescription
Returns true if this memory operation doesn't have any ordering constraints other than normal aliasing. Volatile and (ordered) atomic memory operations can't be reordered.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:303
¶bool isVolatile() const
bool isVolatile() constDeclared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:289
¶void print(llvm::raw_ostream& OS,
llvm::ModuleSlotTracker& MST,
SmallVectorImpl<llvm::StringRef>& SSNs,
const llvm::LLVMContext& Context,
const llvm::MachineFrameInfo* MFI,
const llvm::TargetInstrInfo* TII) const
void print(llvm::raw_ostream& OS,
llvm::ModuleSlotTracker& MST,
SmallVectorImpl<llvm::StringRef>& SSNs,
const llvm::LLVMContext& Context,
const llvm::MachineFrameInfo* MFI,
const llvm::TargetInstrInfo* TII) constDescription
Support for operator < < . @ {
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:332
Parameters
- llvm::raw_ostream& OS
- llvm::ModuleSlotTracker& MST
- SmallVectorImpl<llvm::StringRef>& SSNs
- const llvm::LLVMContext& Context
- const llvm::MachineFrameInfo* MFI
- const llvm::TargetInstrInfo* TII
¶void refineAlignment(
const llvm::MachineMemOperand* MMO)
void refineAlignment(
const llvm::MachineMemOperand* MMO)Description
Update this MachineMemOperand to reflect the alignment of MMO, if it has a greater alignment. This must only be used when the new alignment applies to all users of this MachineMemOperand.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:312
Parameters
- const llvm::MachineMemOperand* MMO
¶void setFlags(llvm::MachineMemOperand::Flags f)
void setFlags(llvm::MachineMemOperand::Flags f)Description
Bitwise OR the current flags with the given flags.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:222
Parameters
- llvm::MachineMemOperand::Flags f
¶void setOffset(int64_t NewOffset)
void setOffset(int64_t NewOffset)Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:319
Parameters
- int64_t NewOffset
¶void setType(llvm::LLT NewTy)
void setType(llvm::LLT NewTy)Description
Reset the tracked memory type.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:322
Parameters
- llvm::LLT NewTy
¶void setValue(const llvm::Value* NewSV)
void setValue(const llvm::Value* NewSV)Description
Change the SourceValue for this MachineMemOperand. This should only be used when an object is being relocated and all references to it are being updated.
Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:317
Parameters
- const llvm::Value* NewSV
¶void setValue(
const llvm::PseudoSourceValue* NewSV)
void setValue(
const llvm::PseudoSourceValue* NewSV)Declared at: llvm/include/llvm/CodeGen/MachineMemOperand.h:318
Parameters
- const llvm::PseudoSourceValue* NewSV