LLVM API Documentation
#include <Instructions.h>
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.
LoadInst::LoadInst | ( | Value * | Ptr, |
const Twine & | NameStr, | ||
Instruction * | InsertBefore | ||
) |
Definition at line 935 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 945 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 = nullptr |
||
) |
Definition at line 955 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 966 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 = nullptr |
||
) |
Definition at line 977 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 988 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 = nullptr |
||
) |
Definition at line 999 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 1012 of file Instructions.cpp.
References setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const char * | NameStr, | ||
Instruction * | InsertBefore | ||
) |
Definition at line 1025 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 1035 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
LoadInst::LoadInst | ( | Value * | Ptr, |
const char * | NameStr = nullptr , |
||
bool | isVolatile = false , |
||
Instruction * | InsertBefore = nullptr |
||
) | [explicit] |
Definition at line 1045 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 1056 of file Instructions.cpp.
References llvm::NotAtomic, setAlignment(), setAtomic(), llvm::Value::setName(), and setVolatile().
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] |
Implements llvm::Instruction.
Definition at line 3644 of file Instructions.cpp.
References getAlignment(), llvm::User::getOperand(), getOrdering(), getSynchScope(), isVolatile(), and LoadInst().
unsigned llvm::LoadInst::getAlignment | ( | ) | const [inline] |
getAlignment - Return the alignment of the access that is being performed
Definition at line 214 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().
AtomicOrdering llvm::LoadInst::getOrdering | ( | ) | const [inline] |
Returns the ordering effect of this fence.
Definition at line 221 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by llvm::AliasSetTracker::add(), clone_impl(), InstCombineLoadCast(), isUnordered(), OptimizeGlobalAddressOfMalloc(), and TryToShrinkGlobalToBoolean().
unsigned llvm::LoadInst::getPointerAddressSpace | ( | ) | const [inline] |
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 llvm::InstCombiner::visitLoadInst().
Value* llvm::LoadInst::getPointerOperand | ( | ) | [inline] |
Definition at line 255 of file Instructions.h.
References llvm::User::getOperand().
Referenced by AnalyzeLoadFromClobberingLoad(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), llvm::AliasAnalysis::getLocation(), getPointerAddressSpace(), isReportingError(), llvm::isSafeToSpeculativelyExecute(), and llvm::Interpreter::visitLoadInst().
const Value* llvm::LoadInst::getPointerOperand | ( | ) | const [inline] |
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.
SynchronizationScope llvm::LoadInst::getSynchScope | ( | ) | const [inline] |
Definition at line 232 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl(), InstCombineLoadCast(), OptimizeGlobalAddressOfMalloc(), and TryToShrinkGlobalToBoolean().
bool llvm::LoadInst::isSimple | ( | ) | const [inline] |
Definition at line 250 of file Instructions.h.
References llvm::Instruction::isAtomic(), and isVolatile().
Referenced by llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), speculateSelectInstLoads(), and llvm::InstCombiner::visitLoadInst().
bool llvm::LoadInst::isUnordered | ( | ) | const [inline] |
Definition at line 251 of file Instructions.h.
References getOrdering(), isVolatile(), and llvm::Unordered.
Referenced by llvm::AliasAnalysis::getModRefInfo(), llvm::isSafeToSpeculativelyExecute(), and OptimizeGlobalAddressOfMalloc().
bool llvm::LoadInst::isVolatile | ( | ) | const [inline] |
isVolatile - Return true if this is a load from a volatile memory location.
Definition at line 203 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 1067 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().
void llvm::LoadInst::setAtomic | ( | AtomicOrdering | Ordering, |
SynchronizationScope | SynchScope = CrossThread |
||
) | [inline] |
Definition at line 244 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 227 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by setAtomic().
void llvm::LoadInst::setSynchScope | ( | SynchronizationScope | xthread | ) | [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 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().