|
LLVM
3.7.0
|
MachineMemOperand - A description of a memory reference used in the backend. More...
#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) | |
| MachineMemOperand - Construct an MachineMemOperand object with the specified PtrInfo, flags, size, and base alignment. More... | |
| const MachinePointerInfo & | getPointerInfo () const |
| const Value * | getValue () const |
| getValue - Return the base address of the memory access. More... | |
| const PseudoSourceValue * | getPseudoValue () const |
| const void * | getOpaqueValue () 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 |
| getOffset - For normal values, this is a byte offset added to the base address. More... | |
| unsigned | getAddrSpace () const |
| uint64_t | getSize () const |
| getSize - Return the size in bytes of the memory reference. More... | |
| uint64_t | getAlignment () const |
| getAlignment - Return the minimum known alignment in bytes of the actual memory reference. More... | |
| uint64_t | getBaseAlignment () const |
| getBaseAlignment - Return the minimum known alignment in bytes of the base address, without the offset. More... | |
| AAMDNodes | getAAInfo () const |
| getAAInfo - Return the AA tags 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 |
| isUnordered - Returns true if this memory operation doesn't have any ordering constraints other than normal aliasing. More... | |
| void | refineAlignment (const MachineMemOperand *MMO) |
| refineAlignment - Update this MachineMemOperand to reflect the alignment of MMO, if it has a greater alignment. More... | |
| void | setValue (const Value *NewSV) |
| setValue - Change the SourceValue for this MachineMemOperand. More... | |
| void | setValue (const PseudoSourceValue *NewSV) |
| void | setOffset (int64_t NewOffset) |
| void | Profile (FoldingSetNodeID &ID) const |
| Profile - Gather unique data for the object. More... | |
| void | print (raw_ostream &OS) const |
| Support for operator<<. More... | |
| void | print (raw_ostream &OS, ModuleSlotTracker &MST) const |
Friends | |
| bool | operator== (const MachineMemOperand &LHS, const MachineMemOperand &RHS) |
| bool | operator!= (const MachineMemOperand &LHS, const MachineMemOperand &RHS) |
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 92 of file MachineMemOperand.h.
Flags values. These may be or'd together.
Definition at line 101 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 468 of file MachineInstr.cpp.
|
inline |
getAAInfo - Return the AA tags for the memory reference.
Definition at line 168 of file MachineMemOperand.h.
Referenced by llvm::MemSDNode::getAAInfo(), and MIsNeedChainEdge().
|
inline |
Definition at line 154 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 509 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 165 of file MachineMemOperand.h.
References MOMaxBits.
Referenced by llvm::MachineFunction::getMachineMemOperand(), and llvm::MemSDNode::getOriginalAlignment().
getFlags - Return the raw flags of the source value,
Definition at line 144 of file MachineMemOperand.h.
References MOMaxBits.
Referenced by llvm::MachineFunction::getMachineMemOperand().
|
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 152 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 141 of file MachineMemOperand.h.
References llvm::PointerUnion< PT1, PT2 >::getOpaqueValue(), and llvm::MachinePointerInfo::V.
|
inline |
Definition at line 126 of file MachineMemOperand.h.
Referenced by llvm::SelectionDAG::getAtomic(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::SelectionDAG::getMemIntrinsicNode(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::AMDGPUTargetLowering::SplitVectorLoad().
|
inline |
Definition at line 137 of file MachineMemOperand.h.
References llvm::PointerUnion< PT1, PT2 >::dyn_cast(), and llvm::MachinePointerInfo::V.
Referenced by llvm::MachineFunction::getMachineMemOperand().
getRanges - Return the range tag for the memory reference.
Definition at line 171 of file MachineMemOperand.h.
Referenced by llvm::MemSDNode::getRanges().
|
inline |
getSize - Return the size in bytes of the memory reference.
Definition at line 157 of file MachineMemOperand.h.
Referenced by emitComments(), llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::PPCTargetLowering::expandVSXLoadForLE(), llvm::PPCTargetLowering::expandVSXStoreForLE(), llvm::MachineFunction::extractLoadMemRefs(), llvm::MachineFunction::extractStoreMemRefs(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::MemSDNode::MemSDNode(), and MIsNeedChainEdge().
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 135 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().
|
inline |
Definition at line 177 of file MachineMemOperand.h.
References MOInvariant.
Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::MemSDNode::MemSDNode().
|
inline |
Definition at line 173 of file MachineMemOperand.h.
References MOLoad.
Referenced by llvm::MemSDNode::readMem().
|
inline |
Definition at line 176 of file MachineMemOperand.h.
References MONonTemporal.
Referenced by llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), and llvm::MemSDNode::MemSDNode().
|
inline |
Definition at line 174 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 186 of file MachineMemOperand.h.
References isVolatile().
|
inline |
Definition at line 175 of file MachineMemOperand.h.
References MOVolatile.
Referenced by llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMaskedGather(), llvm::SelectionDAG::getMaskedLoad(), llvm::SelectionDAG::getMaskedScatter(), llvm::SelectionDAG::getMaskedStore(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTruncStore(), isMemoryOp(), isUnordered(), and llvm::MemSDNode::MemSDNode().
| void MachineMemOperand::print | ( | raw_ostream & | OS | ) | const |
Support for operator<<.
Definition at line 513 of file MachineInstr.cpp.
Referenced by llvm::operator<<().
| void MachineMemOperand::print | ( | raw_ostream & | OS, |
| ModuleSlotTracker & | MST | ||
| ) | const |
Definition at line 517 of file MachineInstr.cpp.
| void MachineMemOperand::Profile | ( | FoldingSetNodeID & | ID | ) | const |
Profile - Gather unique data for the object.
Definition at line 484 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 491 of file MachineInstr.cpp.
Referenced by llvm::MemSDNode::refineAlignment().
|
inline |
Bitwise OR the current flags with the given flags.
Definition at line 147 of file MachineMemOperand.h.
References MOMaxBits.
|
inline |
Definition at line 198 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::Offset.
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 196 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::V.
|
inline |
Definition at line 197 of file MachineMemOperand.h.
References llvm::MachinePointerInfo::V.
|
friend |
Definition at line 223 of file MachineMemOperand.h.
|
friend |
Definition at line 210 of file MachineMemOperand.h.
1.8.6