Return true if we know that executing a load from this value cannot trap.
Synopsis
Declared in <llvm/Analysis/Loads.h>
bool
isSafeToLoadUnconditionally(
Value* V,
Type* Ty,
Align Alignment,
SimplifyQuery const& SQ);
Description
If SQ.CxtI is specified this method performs context‐sensitive analysis and returns true if it is safe to load immediately before SQ.CxtI.
If it is not obviously safe to load from the specified pointer, we do a quick local scan of the basic block containing SQ.CxtI, to determine if the address is already accessed.
Return Value
True if executing a load from this value cannot trap.
Parameters
Name |
Description |
V |
Pointer value to load from. |
Ty |
Type of the prospective load, used to determine size. |
Alignment |
Alignment of the prospective load. |
SQ |
Query providing data layout and optional context instruction. |
Created with MrDocs