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 MDNode *TBAAInfo=0, const MDNode *Ranges=0) | |
const MachinePointerInfo & | getPointerInfo () const |
const Value * | getValue () const |
unsigned int | getFlags () const |
getFlags - Return the raw flags of the source value, More... | |
void | setFlags (unsigned f) |
Bitwise OR the current flags with the given flags. More... | |
int64_t | getOffset () const |
uint64_t | getSize () const |
getSize - Return the size in bytes of the memory reference. More... | |
uint64_t | getAlignment () const |
uint64_t | getBaseAlignment () const |
const MDNode * | getTBAAInfo () const |
getTBAAInfo - Return the TBAA tag for the memory reference. More... | |
const MDNode * | getRanges () const |
getRanges - Return the range tag for the memory reference. More... | |
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 | 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 82 of file MachineMemOperand.h.
Flags values. These may be or'd together.
Definition at line 91 of file MachineMemOperand.h.
MachineMemOperand::MachineMemOperand | ( | MachinePointerInfo | PtrInfo, |
unsigned | flags, | ||
uint64_t | s, | ||
unsigned | base_alignment, | ||
const MDNode * | TBAAInfo = 0 , |
||
const MDNode * | Ranges = 0 |
||
) |
MachineMemOperand - Construct an MachineMemOperand object with the specified PtrInfo, flags, size, and base alignment.
Definition at line 420 of file MachineInstr.cpp.
uint64_t MachineMemOperand::getAlignment | ( | ) | const |
getAlignment - Return the minimum known alignment in bytes of the actual memory reference.
Definition at line 460 of file MachineInstr.cpp.
Referenced by llvm::MemSDNode::getAlignment(), isMemoryOp(), llvm::X86InstrInfo::loadRegFromAddr(), and llvm::X86InstrInfo::storeRegToAddr().
|
inline |
getBaseAlignment - Return the minimum known alignment in bytes of the base address, without the offset.
Definition at line 146 of file MachineMemOperand.h.
References MOMaxBits.
Referenced by llvm::MachineFunction::getMachineMemOperand(), and llvm::MemSDNode::getOriginalAlignment().
|
inline |
getFlags - Return the raw flags of the source value,
Definition at line 127 of file MachineMemOperand.h.
References MOMaxBits.
Referenced by llvm::MachineFunction::getMachineMemOperand(), and llvm::PPCTargetLowering::PerformDAGCombine().
|
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 135 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::Offset.
Referenced by llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::MachineFunction::getMachineMemOperand(), llvm::MemSDNode::getSrcValueOffset(), and MIsNeedChainEdge().
|
inline |
Definition at line 115 of file MachineMemOperand.h.
Referenced by llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getStore(), and llvm::SelectionDAG::getTruncStore().
|
inline |
getRanges - Return the range tag for the memory reference.
Definition at line 152 of file MachineMemOperand.h.
Referenced by llvm::MemSDNode::getRanges().
|
inline |
getSize - Return the size in bytes of the memory reference.
Definition at line 138 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().
|
inline |
getTBAAInfo - Return the TBAA tag for the memory reference.
Definition at line 149 of file MachineMemOperand.h.
Referenced by llvm::MemSDNode::getTBAAInfo(), and MIsNeedChainEdge().
|
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 124 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::V.
Referenced by llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::MachineFunction::getMachineMemOperand(), llvm::MemSDNode::getSrcValue(), MIsNeedChainEdge(), llvm::AMDGPUTargetLowering::SplitVectorLoad(), and llvm::AMDGPUTargetLowering::SplitVectorStore().
|
inline |
Definition at line 158 of file MachineMemOperand.h.
References MOInvariant.
Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::MemSDNode::MemSDNode().
|
inline |
Definition at line 154 of file MachineMemOperand.h.
References MOLoad.
Referenced by llvm::MemSDNode::readMem().
|
inline |
Definition at line 157 of file MachineMemOperand.h.
References MONonTemporal.
Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::MemSDNode::MemSDNode().
|
inline |
Definition at line 155 of file MachineMemOperand.h.
References MOStore.
Referenced by llvm::MemSDNode::writeMem().
|
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 167 of file MachineMemOperand.h.
References isVolatile().
|
inline |
Definition at line 156 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 435 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 442 of file MachineInstr.cpp.
Referenced by llvm::MemSDNode::refineAlignment().
|
inline |
Bitwise OR the current flags with the given flags.
Definition at line 130 of file MachineMemOperand.h.
References MOMaxBits.
|
inline |
Definition at line 178 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::Offset.
|
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 177 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::V.