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);
52 Instruction *ScanFrom =
nullptr,
53 const DominatorTree *DT =
nullptr);
88 bool *IsLoadCSE =
nullptr);
AAResults AliasAnalysis
Temporary typedef for legacy code that uses a generic AliasAnalysis pointer or reference.
cl::opt< unsigned > DefMaxInstsToScan
The default number of maximum instructions to scan in the block, used by FindAvailableLoadedValue().
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)
Scan backwards to see if we have the value of the given load available locally within a small number ...
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...
InstListType::iterator iterator
Instruction iterators...