LLVM  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
llvm::LoadInst Class Reference

LoadInst - an instruction for reading from memory. More...

#include <Instructions.h>

Inheritance diagram for llvm::LoadInst:
Inheritance graph
[legend]
Collaboration diagram for llvm::LoadInst:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LoadInst (Value *Ptr, const Twine &NameStr, Instruction *InsertBefore)
 LoadInst (Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd)
 LoadInst (Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile=false, Instruction *InsertBefore=nullptr)
 LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile=false, Instruction *InsertBefore=nullptr)
 LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile, BasicBlock *InsertAtEnd)
 LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, Instruction *InsertBefore=nullptr)
 LoadInst (Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, Instruction *InsertBefore=nullptr)
 LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, BasicBlock *InsertAtEnd)
 LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope=CrossThread, Instruction *InsertBefore=nullptr)
 LoadInst (Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope=CrossThread, Instruction *InsertBefore=nullptr)
 LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope, BasicBlock *InsertAtEnd)
 LoadInst (Value *Ptr, const char *NameStr, Instruction *InsertBefore)
 LoadInst (Value *Ptr, const char *NameStr, BasicBlock *InsertAtEnd)
 LoadInst (Type *Ty, Value *Ptr, const char *NameStr=nullptr, bool isVolatile=false, Instruction *InsertBefore=nullptr)
 LoadInst (Value *Ptr, const char *NameStr=nullptr, bool isVolatile=false, Instruction *InsertBefore=nullptr)
 LoadInst (Value *Ptr, const char *NameStr, bool isVolatile, BasicBlock *InsertAtEnd)
bool isVolatile () const
 isVolatile - Return true if this is a load from a volatile memory location.
void setVolatile (bool V)
 setVolatile - Specify whether this is a volatile load or not.
unsigned getAlignment () const
 getAlignment - Return the alignment of the access that is being performed
void setAlignment (unsigned Align)
AtomicOrdering getOrdering () const
 Returns the ordering effect of this fence.
void setOrdering (AtomicOrdering Ordering)
 Set the ordering constraint on this load.
SynchronizationScope getSynchScope () const
void setSynchScope (SynchronizationScope xthread)
 Specify whether this load is ordered with respect to all concurrently executing threads, or only with respect to signal handlers executing in the same thread.
void setAtomic (AtomicOrdering Ordering, SynchronizationScope SynchScope=CrossThread)
bool isSimple () const
bool isUnordered () const
ValuegetPointerOperand ()
const ValuegetPointerOperand () const
unsigned getPointerAddressSpace () const
 Returns the address space of the pointer operand.

Static Public Member Functions

static unsigned getPointerOperandIndex ()
static bool classof (const Instruction *I)
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

LoadInstcloneImpl () const
 Create a copy of this instruction.

Friends

class Instruction

Detailed Description

LoadInst - an instruction for reading from memory.

This uses the SubclassData field in Value to store whether or not the load is volatile.

Definition at line 178 of file Instructions.h.


Constructor & Destructor Documentation

LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
Instruction InsertBefore 
)

Definition at line 1196 of file Instructions.cpp.

Referenced by cloneImpl().

LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
BasicBlock InsertAtEnd 
)

Definition at line 1199 of file Instructions.cpp.

LoadInst::LoadInst ( Type Ty,
Value Ptr,
const Twine NameStr,
bool  isVolatile = false,
Instruction InsertBefore = nullptr 
)

Definition at line 1202 of file Instructions.cpp.

llvm::LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
bool  isVolatile = false,
Instruction InsertBefore = nullptr 
) [inline]

Definition at line 191 of file Instructions.h.

LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
bool  isVolatile,
BasicBlock InsertAtEnd 
)

Definition at line 1206 of file Instructions.cpp.

llvm::LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
bool  isVolatile,
unsigned  Align,
Instruction InsertBefore = nullptr 
) [inline]

Definition at line 197 of file Instructions.h.

LoadInst::LoadInst ( Type Ty,
Value Ptr,
const Twine NameStr,
bool  isVolatile,
unsigned  Align,
Instruction InsertBefore = nullptr 
)

Definition at line 1210 of file Instructions.cpp.

LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
bool  isVolatile,
unsigned  Align,
BasicBlock InsertAtEnd 
)

Definition at line 1215 of file Instructions.cpp.

llvm::LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
bool  isVolatile,
unsigned  Align,
AtomicOrdering  Order,
SynchronizationScope  SynchScope = CrossThread,
Instruction InsertBefore = nullptr 
) [inline]

Definition at line 205 of file Instructions.h.

LoadInst::LoadInst ( Type Ty,
Value Ptr,
const Twine NameStr,
bool  isVolatile,
unsigned  Align,
AtomicOrdering  Order,
SynchronizationScope  SynchScope = CrossThread,
Instruction InsertBefore = nullptr 
)
LoadInst::LoadInst ( Value Ptr,
const Twine NameStr,
bool  isVolatile,
unsigned  Align,
AtomicOrdering  Order,
SynchronizationScope  SynchScope,
BasicBlock InsertAtEnd 
)

Definition at line 1232 of file Instructions.cpp.

References setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().

LoadInst::LoadInst ( Value Ptr,
const char *  NameStr,
Instruction InsertBefore 
)
LoadInst::LoadInst ( Value Ptr,
const char *  NameStr,
BasicBlock InsertAtEnd 
)
LoadInst::LoadInst ( Type Ty,
Value Ptr,
const char *  NameStr = nullptr,
bool  isVolatile = false,
Instruction InsertBefore = nullptr 
)
llvm::LoadInst::LoadInst ( Value Ptr,
const char *  NameStr = nullptr,
bool  isVolatile = false,
Instruction InsertBefore = nullptr 
) [inline, explicit]

Definition at line 223 of file Instructions.h.

LoadInst::LoadInst ( Value Ptr,
const char *  NameStr,
bool  isVolatile,
BasicBlock InsertAtEnd 
)

Member Function Documentation

static bool llvm::LoadInst::classof ( const Instruction I) [inline, static]

Reimplemented from llvm::UnaryInstruction.

Definition at line 296 of file Instructions.h.

References llvm::Instruction::getOpcode(), and llvm::SPII::Load.

Referenced by classof().

static bool llvm::LoadInst::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::UnaryInstruction.

Definition at line 299 of file Instructions.h.

References classof().

LoadInst * LoadInst::cloneImpl ( ) const [protected]

Create a copy of this instruction.

Reimplemented from llvm::Instruction.

Definition at line 3817 of file Instructions.cpp.

References getAlignment(), llvm::User::getOperand(), getOrdering(), getSynchScope(), isVolatile(), and LoadInst().

Definition at line 287 of file Instructions.h.

References llvm::User::getOperand().

static unsigned llvm::LoadInst::getPointerOperandIndex ( ) [inline, static]

Definition at line 288 of file Instructions.h.

bool llvm::LoadInst::isSimple ( ) const [inline]
bool llvm::LoadInst::isUnordered ( ) const [inline]
bool llvm::LoadInst::isVolatile ( ) const [inline]
void llvm::LoadInst::setAtomic ( AtomicOrdering  Ordering,
SynchronizationScope  SynchScope = CrossThread 
) [inline]

Definition at line 275 of file Instructions.h.

References setOrdering(), and setSynchScope().

Referenced by LoadInst(), and LowerLoadInst().

void llvm::LoadInst::setOrdering ( AtomicOrdering  Ordering) [inline]

Set the ordering constraint on this load.

May not be Release or AcquireRelease.

Definition at line 258 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by setAtomic().

Specify whether this load is ordered with respect to all concurrently executing threads, or only with respect to signal handlers executing in the same thread.

Definition at line 270 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by setAtomic().

void llvm::LoadInst::setVolatile ( bool  V) [inline]

setVolatile - Specify whether this is a volatile load or not.

Definition at line 238 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by LoadInst().


Friends And Related Function Documentation

friend class Instruction [friend]

Definition at line 183 of file Instructions.h.


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