LLVM API Documentation
#include <Instructions.h>
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=0) | |
LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile, BasicBlock *InsertAtEnd) | |
LoadInst (Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, Instruction *InsertBefore=0) | |
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=0) | |
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=0, bool isVolatile=false, Instruction *InsertBefore=0) | |
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. More... | |
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 |
Value * | getPointerOperand () |
const Value * | getPointerOperand () const |
unsigned | getPointerAddressSpace () const |
Returns the address space of the pointer operand. More... | |
![]() | |
void * | operator new (size_t s) |
~UnaryInstruction () | |
DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
Transparently provide more efficient getOperand methods. More... | |
![]() | |
~Instruction () | |
Instruction * | use_back () |
const Instruction * | use_back () const |
const BasicBlock * | getParent () const |
BasicBlock * | getParent () |
void | removeFromParent () |
void | eraseFromParent () |
void | insertBefore (Instruction *InsertPos) |
void | insertAfter (Instruction *InsertPos) |
void | moveBefore (Instruction *MovePos) |
unsigned | getOpcode () const |
getOpcode() returns a member of one of the enums like Instruction::Add. More... | |
const char * | getOpcodeName () const |
bool | isTerminator () const |
bool | isBinaryOp () const |
bool | isShift () |
bool | isCast () const |
bool | isLogicalShift () const |
bool | isArithmeticShift () const |
isArithmeticShift - Return true if this is an arithmetic shift right. More... | |
bool | hasMetadata () const |
bool | hasMetadataOtherThanDebugLoc () const |
MDNode * | getMetadata (unsigned KindID) const |
MDNode * | getMetadata (StringRef Kind) const |
void | getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const |
void | getAllMetadataOtherThanDebugLoc (SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const |
void | setMetadata (unsigned KindID, MDNode *Node) |
void | setMetadata (StringRef Kind, MDNode *Node) |
void | setDebugLoc (const DebugLoc &Loc) |
setDebugLoc - Set the debug location information for this instruction. More... | |
const DebugLoc & | getDebugLoc () const |
getDebugLoc - Return the debug location for this node as a DebugLoc. More... | |
void | setHasUnsafeAlgebra (bool B) |
void | setHasNoNaNs (bool B) |
void | setHasNoInfs (bool B) |
void | setHasNoSignedZeros (bool B) |
void | setHasAllowReciprocal (bool B) |
void | setFastMathFlags (FastMathFlags FMF) |
bool | hasUnsafeAlgebra () const |
Determine whether the unsafe-algebra flag is set. More... | |
bool | hasNoNaNs () const |
Determine whether the no-NaNs flag is set. More... | |
bool | hasNoInfs () const |
Determine whether the no-infs flag is set. More... | |
bool | hasNoSignedZeros () const |
Determine whether the no-signed-zeros flag is set. More... | |
bool | hasAllowReciprocal () const |
Determine whether the allow-reciprocal flag is set. More... | |
FastMathFlags | getFastMathFlags () const |
void | copyFastMathFlags (const Instruction *I) |
Copy I's fast-math flags. More... | |
bool | isAssociative () const |
bool | isCommutative () const |
bool | isIdempotent () const |
bool | isNilpotent () const |
bool | mayWriteToMemory () const |
bool | mayReadFromMemory () const |
bool | mayReadOrWriteMemory () const |
bool | mayThrow () const |
bool | mayReturn () const |
bool | mayHaveSideEffects () const |
Instruction * | clone () const |
bool | isIdenticalTo (const Instruction *I) const |
bool | isIdenticalToWhenDefined (const Instruction *I) const |
bool | isSameOperationAs (const Instruction *I, unsigned flags=0) const |
Determine if one instruction is the same operation as another. More... | |
bool | isUsedOutsideOfBlock (const BasicBlock *BB) const |
![]() | |
~User () | |
void | operator delete (void *Usr) |
operator delete - free memory allocated for User and Use objects More... | |
void | operator delete (void *, unsigned) |
placement delete - required by std, but never called. More... | |
void | operator delete (void *, unsigned, bool) |
placement delete - required by std, but never called. More... | |
Value * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Value *Val) |
const Use & | getOperandUse (unsigned i) const |
Use & | getOperandUse (unsigned i) |
unsigned | getNumOperands () const |
op_iterator | op_begin () |
const_op_iterator | op_begin () const |
op_iterator | op_end () |
const_op_iterator | op_end () const |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
void | dropAllReferences () |
void | replaceUsesOfWith (Value *From, Value *To) |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
![]() | |
Instruction * | getPrevNode () |
Get the previous node, or 0 for the list head. More... | |
const Instruction * | getPrevNode () const |
Get the previous node, or 0 for the list head. More... | |
Instruction * | getNextNode () |
Get the next node, or 0 for the list tail. More... | |
const Instruction * | getNextNode () const |
Get the next node, or 0 for the list tail. More... | |
Static Public Member Functions | |
static unsigned | getPointerOperandIndex () |
static bool | classof (const Instruction *I) |
static bool | classof (const Value *V) |
![]() | |
static bool | classof (const Instruction *I) |
static bool | classof (const Value *V) |
![]() | |
static const char * | getOpcodeName (unsigned OpCode) |
static bool | isTerminator (unsigned OpCode) |
static bool | isBinaryOp (unsigned Opcode) |
static bool | isShift (unsigned Opcode) |
Determine if the Opcode is one of the shift instructions. More... | |
static bool | isCast (unsigned OpCode) |
Determine if the OpCode is one of the CastInst instructions. More... | |
static bool | isAssociative (unsigned op) |
static bool | isCommutative (unsigned op) |
static bool | isIdempotent (unsigned op) |
static bool | isNilpotent (unsigned op) |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
![]() | |
static bool | classof (const Value *V) |
Protected Member Functions | |
virtual LoadInst * | clone_impl () const |
![]() | |
UnaryInstruction (Type *Ty, unsigned iType, Value *V, Instruction *IB=0) | |
UnaryInstruction (Type *Ty, unsigned iType, Value *V, BasicBlock *IAE) | |
![]() | |
void | setInstructionSubclassData (unsigned short D) |
unsigned | getSubclassDataFromInstruction () const |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=0) | |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) | |
![]() | |
void * | operator new (size_t s, unsigned Us) |
User (Type *ty, unsigned vty, Use *OpList, unsigned NumOps) | |
Use * | allocHungoffUses (unsigned) const |
void | dropHungoffUses () |
template<int Idx> | |
Use & | Op () |
template<int Idx> | |
const Use & | Op () const |
![]() | |
virtual void | printCustom (raw_ostream &O) const |
Value (Type *Ty, unsigned scid) | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
![]() | |
ilist_node () | |
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 136 of file Instructions.h.
LoadInst::LoadInst | ( | Value * | Ptr, |
const Twine & | NameStr, | ||
Instruction * | InsertBefore | ||
) |
Definition at line 933 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 | ||
) |
Definition at line 943 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const Twine & | NameStr, | ||
bool | isVolatile = false , |
||
Instruction * | InsertBefore = 0 |
||
) |
Definition at line 953 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const Twine & | NameStr, | ||
bool | isVolatile, | ||
BasicBlock * | InsertAtEnd | ||
) |
Definition at line 964 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const Twine & | NameStr, | ||
bool | isVolatile, | ||
unsigned | Align, | ||
Instruction * | InsertBefore = 0 |
||
) |
Definition at line 975 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const Twine & | NameStr, | ||
bool | isVolatile, | ||
unsigned | Align, | ||
BasicBlock * | InsertAtEnd | ||
) |
Definition at line 986 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const Twine & | NameStr, | ||
bool | isVolatile, | ||
unsigned | Align, | ||
AtomicOrdering | Order, | ||
SynchronizationScope | SynchScope = CrossThread , |
||
Instruction * | InsertBefore = 0 |
||
) |
Definition at line 997 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 1010 of file Instructions.cpp.
References setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const char * | NameStr, | ||
Instruction * | InsertBefore | ||
) |
Definition at line 1023 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const char * | NameStr, | ||
BasicBlock * | InsertAtEnd | ||
) |
Definition at line 1033 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
|
explicit |
Definition at line 1043 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const char * | NameStr, | ||
bool | isVolatile, | ||
BasicBlock * | InsertAtEnd | ||
) |
Definition at line 1054 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
|
inlinestatic |
Definition at line 234 of file Instructions.h.
References llvm::Instruction::getOpcode(), and llvm::SPII::Load.
Referenced by classof().
Definition at line 237 of file Instructions.h.
References classof().
|
protectedvirtual |
Implements llvm::Instruction.
Definition at line 3541 of file Instructions.cpp.
References getAlignment(), llvm::User::getOperand(), getOrdering(), getSynchScope(), isVolatile(), and LoadInst().
|
inline |
getAlignment - Return the alignment of the access that is being performed
Definition at line 181 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), InstCombineLoadCast(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), setAlignment(), speculatePHINodeLoads(), speculateSelectInstLoads(), tryToMakeAllocaBePromotable(), and llvm::InstCombiner::visitLoadInst().
|
inline |
Returns the ordering effect of this fence.
Definition at line 188 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by llvm::AliasSetTracker::add(), clone_impl(), InstCombineLoadCast(), isAtomic(), isUnordered(), OptimizeGlobalAddressOfMalloc(), and TryToShrinkGlobalToBoolean().
|
inline |
Returns the address space of the pointer operand.
Definition at line 228 of file Instructions.h.
References llvm::Type::getPointerAddressSpace(), getPointerOperand(), and llvm::Value::getType().
Referenced by llvm::InstCombiner::visitLoadInst().
|
inline |
Definition at line 223 of file Instructions.h.
References llvm::User::getOperand().
Referenced by AnalyzeLoadFromClobberingLoad(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), llvm::AliasAnalysis::getLocation(), getPointerAddressSpace(), llvm::isSafeToSpeculativelyExecute(), and llvm::Interpreter::visitLoadInst().
|
inline |
Definition at line 224 of file Instructions.h.
References llvm::User::getOperand().
|
inlinestatic |
Definition at line 225 of file Instructions.h.
|
inline |
Definition at line 199 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl(), InstCombineLoadCast(), OptimizeGlobalAddressOfMalloc(), and TryToShrinkGlobalToBoolean().
|
inline |
Definition at line 211 of file Instructions.h.
References getOrdering(), and llvm::NotAtomic.
Referenced by isSimple().
|
inline |
Definition at line 218 of file Instructions.h.
References isAtomic(), and isVolatile().
Referenced by llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), speculateSelectInstLoads(), and llvm::InstCombiner::visitLoadInst().
|
inline |
Definition at line 219 of file Instructions.h.
References getOrdering(), isVolatile(), and llvm::Unordered.
Referenced by llvm::AliasAnalysis::getModRefInfo(), llvm::isSafeToSpeculativelyExecute(), and OptimizeGlobalAddressOfMalloc().
|
inline |
isVolatile - Return true if this is a load from a volatile memory location.
Definition at line 170 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by llvm::AliasSetTracker::add(), clone_impl(), ConstantFoldLoadInst(), EvaluateExpression(), InstCombineLoadCast(), isIntegerWideningViableForSlice(), isSimple(), isUnordered(), isVectorPromotionViableForSlice(), llvm::NVPTXLowerAggrCopies::runOnFunction(), llvm::FastISel::tryToFoldLoad(), and llvm::Interpreter::visitLoadInst().
void LoadInst::setAlignment | ( | unsigned | Align | ) |
Definition at line 1065 of file Instructions.cpp.
References getAlignment(), llvm::Instruction::getSubclassDataFromInstruction(), and llvm::Log2_32().
Referenced by llvm::IRBuilder< true, TargetFolder >::CreateAlignedLoad(), GetLoadValueForLoad(), InstCombineLoadCast(), LoadInst(), speculatePHINodeLoads(), speculateSelectInstLoads(), tryToMakeAllocaBePromotable(), and llvm::InstCombiner::visitLoadInst().
|
inline |
Definition at line 212 of file Instructions.h.
References setOrdering(), and setSynchScope().
Referenced by InstCombineLoadCast(), LoadInst(), and LowerLoadInst().
|
inline |
Set the ordering constraint on this load. May not be Release or AcquireRelease.
Definition at line 194 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by setAtomic().
|
inline |
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 206 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by setAtomic().
|
inline |
setVolatile - Specify whether this is a volatile load or not.
Definition at line 174 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by LoadInst().