LLVM API Documentation
#include <MachineMemOperand.h>
Public Types | |
enum | MemOperandFlags { MOLoad = 1, MOStore = 2, MOVolatile = 4, MONonTemporal = 8, MOInvariant = 16, MOTargetStartBit = 5, MOTargetNumBits = 3, MOMaxBits = 8 } |
Flags values. These may be or'd together. More... | |
Public Member Functions | |
MachineMemOperand (MachinePointerInfo PtrInfo, unsigned flags, uint64_t s, unsigned base_alignment, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr) | |
const MachinePointerInfo & | getPointerInfo () const |
const Value * | getValue () const |
const PseudoSourceValue * | getPseudoValue () const |
const void * | getOpaqueValue () const |
unsigned int | getFlags () const |
getFlags - Return the raw flags of the source value, | |
void | setFlags (unsigned f) |
Bitwise OR the current flags with the given flags. | |
int64_t | getOffset () const |
unsigned | getAddrSpace () const |
uint64_t | getSize () const |
getSize - Return the size in bytes of the memory reference. | |
uint64_t | getAlignment () const |
uint64_t | getBaseAlignment () const |
AAMDNodes | getAAInfo () const |
getAAInfo - Return the AA tags for the memory reference. | |
const MDNode * | getRanges () const |
getRanges - Return the range tag for the memory reference. | |
bool | isLoad () const |
bool | isStore () const |
bool | isVolatile () const |
bool | isNonTemporal () const |
bool | isInvariant () const |
bool | isUnordered () const |
void | refineAlignment (const MachineMemOperand *MMO) |
void | setValue (const Value *NewSV) |
void | setValue (const PseudoSourceValue *NewSV) |
void | setOffset (int64_t NewOffset) |
void | Profile (FoldingSetNodeID &ID) const |
MachineMemOperand - 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.
Definition at line 91 of file MachineMemOperand.h.
Flags values. These may be or'd together.
Definition at line 100 of file MachineMemOperand.h.
MachineMemOperand::MachineMemOperand | ( | MachinePointerInfo | PtrInfo, |
unsigned | flags, | ||
uint64_t | s, | ||
unsigned | base_alignment, | ||
const AAMDNodes & | AAInfo = AAMDNodes() , |
||
const MDNode * | Ranges = nullptr |
||
) |
MachineMemOperand - Construct an MachineMemOperand object with the specified PtrInfo, flags, size, and base alignment.
Definition at line 432 of file MachineInstr.cpp.
AAMDNodes llvm::MachineMemOperand::getAAInfo | ( | ) | const [inline] |
getAAInfo - Return the AA tags for the memory reference.
Definition at line 167 of file MachineMemOperand.h.
Referenced by MIsNeedChainEdge().
unsigned llvm::MachineMemOperand::getAddrSpace | ( | ) | const [inline] |
Definition at line 153 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::getAddrSpace().
uint64_t MachineMemOperand::getAlignment | ( | ) | const |
getAlignment - Return the minimum known alignment in bytes of the actual memory reference.
Definition at line 473 of file MachineInstr.cpp.
Referenced by isMemoryOp().
uint64_t llvm::MachineMemOperand::getBaseAlignment | ( | ) | const [inline] |
getBaseAlignment - Return the minimum known alignment in bytes of the base address, without the offset.
Definition at line 164 of file MachineMemOperand.h.
References MOMaxBits.
Referenced by llvm::MachineFunction::getMachineMemOperand().
unsigned int llvm::MachineMemOperand::getFlags | ( | ) | const [inline] |
getFlags - Return the raw flags of the source value,
Definition at line 143 of file MachineMemOperand.h.
References MOMaxBits.
Referenced by llvm::MachineFunction::getMachineMemOperand().
int64_t llvm::MachineMemOperand::getOffset | ( | ) | const [inline] |
getOffset - For normal values, this is a byte offset added to the base address. For PseudoSourceValue::FPRel values, this is the FrameIndex number.
Definition at line 151 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::Offset.
Referenced by llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::MachineFunction::getMachineMemOperand(), and MIsNeedChainEdge().
const void* llvm::MachineMemOperand::getOpaqueValue | ( | ) | const [inline] |
Definition at line 140 of file MachineMemOperand.h.
References llvm::PointerUnion< PT1, PT2 >::getOpaqueValue(), and llvm::MachinePointerInfo::V.
const MachinePointerInfo& llvm::MachineMemOperand::getPointerInfo | ( | ) | const [inline] |
Definition at line 125 of file MachineMemOperand.h.
Referenced by llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::AMDGPUTargetLowering::SplitVectorLoad().
const PseudoSourceValue* llvm::MachineMemOperand::getPseudoValue | ( | ) | const [inline] |
Definition at line 136 of file MachineMemOperand.h.
References llvm::PointerUnion< PT1, PT2 >::dyn_cast(), and llvm::MachinePointerInfo::V.
Referenced by llvm::MachineFunction::getMachineMemOperand().
const MDNode* llvm::MachineMemOperand::getRanges | ( | ) | const [inline] |
getRanges - Return the range tag for the memory reference.
Definition at line 170 of file MachineMemOperand.h.
uint64_t llvm::MachineMemOperand::getSize | ( | ) | const [inline] |
getSize - Return the size in bytes of the memory reference.
Definition at line 156 of file MachineMemOperand.h.
Referenced by emitComments(), llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::MachineFunction::extractLoadMemRefs(), llvm::MachineFunction::extractStoreMemRefs(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::MemSDNode::MemSDNode(), and MIsNeedChainEdge().
const Value* llvm::MachineMemOperand::getValue | ( | ) | const [inline] |
getValue - 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.
Definition at line 134 of file MachineMemOperand.h.
References llvm::PointerUnion< PT1, PT2 >::dyn_cast(), and llvm::MachinePointerInfo::V.
Referenced by llvm::PPCHazardRecognizer970::EmitInstruction(), getCodeAddrSpace(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::MachineFunction::getMachineMemOperand(), MIsNeedChainEdge(), llvm::AMDGPUTargetLowering::ScalarizeVectorLoad(), llvm::AMDGPUTargetLowering::ScalarizeVectorStore(), llvm::AMDGPUTargetLowering::SplitVectorLoad(), and llvm::AMDGPUTargetLowering::SplitVectorStore().
bool llvm::MachineMemOperand::isInvariant | ( | ) | const [inline] |
Definition at line 176 of file MachineMemOperand.h.
References MOInvariant.
Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::MemSDNode::MemSDNode().
bool llvm::MachineMemOperand::isLoad | ( | ) | const [inline] |
Definition at line 172 of file MachineMemOperand.h.
References MOLoad.
bool llvm::MachineMemOperand::isNonTemporal | ( | ) | const [inline] |
Definition at line 175 of file MachineMemOperand.h.
References MONonTemporal.
Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::MemSDNode::MemSDNode().
bool llvm::MachineMemOperand::isStore | ( | ) | const [inline] |
Definition at line 173 of file MachineMemOperand.h.
References MOStore.
bool llvm::MachineMemOperand::isUnordered | ( | ) | const [inline] |
isUnordered - Returns true if this memory operation doesn't have any ordering constraints other than normal aliasing. Volatile and atomic memory operations can't be reordered.
Currently, we don't model the difference between volatile and atomic operations. They should retain their ordering relative to all memory operations.
Definition at line 185 of file MachineMemOperand.h.
References isVolatile().
bool llvm::MachineMemOperand::isVolatile | ( | ) | const [inline] |
Definition at line 174 of file MachineMemOperand.h.
References MOVolatile.
Referenced by llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), isMemoryOp(), isUnordered(), and llvm::MemSDNode::MemSDNode().
void MachineMemOperand::Profile | ( | FoldingSetNodeID & | ID | ) | const |
Profile - Gather unique data for the object.
Definition at line 448 of file MachineInstr.cpp.
void MachineMemOperand::refineAlignment | ( | const MachineMemOperand * | MMO | ) |
refineAlignment - 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.
Definition at line 455 of file MachineInstr.cpp.
void llvm::MachineMemOperand::setFlags | ( | unsigned | f | ) | [inline] |
Bitwise OR the current flags with the given flags.
Definition at line 146 of file MachineMemOperand.h.
References MOMaxBits.
void llvm::MachineMemOperand::setOffset | ( | int64_t | NewOffset | ) | [inline] |
Definition at line 197 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::Offset.
void llvm::MachineMemOperand::setValue | ( | const Value * | NewSV | ) | [inline] |
setValue - 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.
Definition at line 195 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::V.
void llvm::MachineMemOperand::setValue | ( | const PseudoSourceValue * | NewSV | ) | [inline] |
Definition at line 196 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::V.