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


Constructor & Destructor Documentation

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

Definition at line 932 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 996 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 1009 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 266 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 269 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 260 of file Instructions.h.

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

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

Definition at line 256 of file Instructions.h.

References llvm::User::getOperand().

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

Definition at line 257 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 244 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 227 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 239 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 207 of file Instructions.h.

References llvm::Instruction::getSubclassDataFromInstruction().

Referenced by LoadInst().


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