LLVM API Documentation

llvm::MachineMemOperand Class Reference

#include <MachineMemOperand.h>

Collaboration diagram for llvm::MachineMemOperand:

Collaboration graph
[legend]

List of all members.

Public Types

enum  MemOperandFlags { MOLoad = 1, MOStore = 2, MOVolatile = 4 }
 Flags values. These may be or'd together. More...

Public Member Functions

 MachineMemOperand (const Value *v, unsigned int f, int64_t o, uint64_t s, unsigned int a)
const ValuegetValue () const
unsigned int getFlags () const
 getFlags - Return the raw flags of the source value,
int64_t getOffset () const
uint64_t getSize () const
 getSize - Return the size in bytes of the memory reference.
unsigned int getAlignment () const
bool isLoad () const
bool isStore () const
bool isVolatile () const
void Profile (FoldingSetNodeID &ID) const


Detailed Description

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 32 of file MachineMemOperand.h.


Member Enumeration Documentation

Flags values. These may be or'd together.

Enumerator:
MOLoad  The memory access reads data.
MOStore  The memory access writes data.
MOVolatile  The memory access is volatile.

Definition at line 40 of file MachineMemOperand.h.


Constructor & Destructor Documentation

MachineMemOperand::MachineMemOperand ( const Value v,
unsigned int  f,
int64_t  o,
uint64_t  s,
unsigned int  a 
)

MachineMemOperand - Construct an MachineMemOperand object with the specified address Value, flags, offset, size, and alignment.

Definition at line 262 of file MachineInstr.cpp.

References isLoad(), llvm::isPowerOf2_32(), and isStore().


Member Function Documentation

const Value* llvm::MachineMemOperand::getValue (  )  const [inline]

getValue - Return the base address of the memory access. Special values are PseudoSourceValue::FPRel, PseudoSourceValue::SPRel, and the other PseudoSourceValue members which indicate references to frame/stack pointer relative references and other special references.

Definition at line 58 of file MachineMemOperand.h.

Referenced by llvm::SelectionDAG::getMemOperand(), and llvm::MachineInstr::print().

unsigned int llvm::MachineMemOperand::getFlags (  )  const [inline]

getFlags - Return the raw flags of the source value,

See also:
MemOperandFlags.

Definition at line 61 of file MachineMemOperand.h.

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 66 of file MachineMemOperand.h.

Referenced by llvm::MachineInstr::print().

uint64_t llvm::MachineMemOperand::getSize (  )  const [inline]

getSize - Return the size in bytes of the memory reference.

Definition at line 69 of file MachineMemOperand.h.

Referenced by llvm::MachineInstr::print().

unsigned int llvm::MachineMemOperand::getAlignment (  )  const [inline]

getAlignment - Return the minimum known alignment in bytes of the memory reference.

Definition at line 73 of file MachineMemOperand.h.

Referenced by llvm::MachineInstr::print().

bool llvm::MachineMemOperand::isLoad (  )  const [inline]

Definition at line 75 of file MachineMemOperand.h.

References MOLoad.

Referenced by MachineMemOperand(), and llvm::MachineInstr::print().

bool llvm::MachineMemOperand::isStore (  )  const [inline]

bool llvm::MachineMemOperand::isVolatile (  )  const [inline]

void MachineMemOperand::Profile ( FoldingSetNodeID ID  )  const

Profile - Gather unique data for the object.

Definition at line 272 of file MachineInstr.cpp.

References llvm::FoldingSetNodeID::AddInteger(), and llvm::FoldingSetNodeID::AddPointer().

Referenced by AddNodeIDCustom(), and llvm::SelectionDAG::getMemOperand().


The documentation for this class was generated from the following files:



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.