14 #ifndef LLVM_ANALYSIS_LOADS_H 15 #define LLVM_ANALYSIS_LOADS_H 30 const Instruction *CtxI =
nullptr,
31 const DominatorTree *DT =
nullptr);
39 const Instruction *CtxI =
nullptr,
40 const DominatorTree *DT =
nullptr);
47 const APInt &
Size,
const DataLayout &DL,
48 const Instruction *CtxI =
nullptr,
49 const DominatorTree *DT =
nullptr);
61 Instruction *ScanFrom =
nullptr,
62 const DominatorTree *DT =
nullptr);
95 unsigned MaxInstsToScan = DefMaxInstsToScan,
97 bool *IsLoadCSE =
nullptr,
98 unsigned *NumScanedInst =
nullptr);
127 bool *IsLoad,
unsigned *NumScanedInst);
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
This class represents lattice values for constants.
cl::opt< unsigned > DefMaxInstsToScan
The default number of maximum instructions to scan in the block, used by FindAvailableLoadedValue().
Value * FindAvailablePtrLoadStore(Value *Ptr, Type *AccessTy, bool AtLeastAtomic, BasicBlock *ScanBB, BasicBlock::iterator &ScanFrom, unsigned MaxInstsToScan, AliasAnalysis *AA, bool *IsLoad, unsigned *NumScanedInst)
Scan backwards to see if we have the value of the given pointer available locally within a small numb...
bool isSafeToLoadUnconditionally(Value *V, unsigned Align, const DataLayout &DL, Instruction *ScanFrom=nullptr, const DominatorTree *DT=nullptr)
Return true if we know that executing a load from this value cannot trap.
Value * FindAvailableLoadedValue(LoadInst *Load, BasicBlock *ScanBB, BasicBlock::iterator &ScanFrom, unsigned MaxInstsToScan=DefMaxInstsToScan, AliasAnalysis *AA=nullptr, bool *IsLoadCSE=nullptr, unsigned *NumScanedInst=nullptr)
Scan backwards to see if we have the value of the given load available locally within a small number ...
AAResults AliasAnalysis
Temporary typedef for legacy code that uses a generic AliasAnalysis pointer or reference.
InstListType::iterator iterator
Instruction iterators...
bool isDereferenceablePointer(const Value *V, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
Return true if this is always a dereferenceable pointer.
bool isDereferenceableAndAlignedPointer(const Value *V, unsigned Align, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr)
Returns true if V is always a dereferenceable pointer with alignment greater or equal than requested...