LLVM  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions
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

LoadInstclone_impl () const override

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 173 of file Instructions.h.


Constructor & Destructor Documentation

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

Definition at line 887 of file Instructions.cpp.

Referenced by clone_impl().

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

Definition at line 890 of file Instructions.cpp.

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

Definition at line 893 of file Instructions.cpp.

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

Definition at line 182 of file Instructions.h.

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

Definition at line 897 of file Instructions.cpp.

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

Definition at line 188 of file Instructions.h.

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

Definition at line 901 of file Instructions.cpp.

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

Definition at line 906 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 196 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 923 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 214 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 288 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 291 of file Instructions.h.

References classof().

LoadInst * LoadInst::clone_impl ( ) const [override, protected, virtual]

Returns the address space of the pointer operand.

Definition at line 282 of file Instructions.h.

References llvm::Type::getPointerAddressSpace(), getPointerOperand(), and llvm::Value::getType().

Referenced by combineLoadToNewType(), and llvm::InstCombiner::visitLoadInst().

Definition at line 278 of file Instructions.h.

References llvm::User::getOperand().

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

Definition at line 279 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 266 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 249 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 261 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 229 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by LoadInst().


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