LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::LoadInst Class Reference

#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 (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 (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 (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 (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
void setVolatile (bool V)
unsigned getAlignment () const
void setAlignment (unsigned Align)
AtomicOrdering getOrdering () const
 Returns the ordering effect of this fence.
void setOrdering (AtomicOrdering Ordering)
SynchronizationScope getSynchScope () const
void setSynchScope (SynchronizationScope xthread)
bool isAtomic () const
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 152 of file Instructions.h.


Constructor & Destructor Documentation

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

Definition at line 934 of file Instructions.cpp.

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

Referenced by clone_impl().

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

Definition at line 998 of file Instructions.cpp.

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

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

Definition at line 1011 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 ( Value Ptr,
const char *  NameStr = nullptr,
bool  isVolatile = false,
Instruction InsertBefore = nullptr 
) [explicit]
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 251 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 254 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 245 of file Instructions.h.

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

Referenced by llvm::InstCombiner::visitLoadInst().

Definition at line 241 of file Instructions.h.

References llvm::User::getOperand().

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

Definition at line 242 of file Instructions.h.

bool llvm::LoadInst::isAtomic ( ) const [inline]

Definition at line 228 of file Instructions.h.

References getOrdering(), and llvm::NotAtomic.

Referenced by isSimple().

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

References setOrdering(), and setSynchScope().

Referenced by InstCombineLoadCast(), 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 211 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 223 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 191 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by LoadInst().


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