LLVM  14.0.0git
Namespaces | Functions | Variables
Loads.h File Reference
#include "llvm/IR/BasicBlock.h"
#include "llvm/Support/CommandLine.h"
Include dependency graph for Loads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 llvm
 This file implements support for optimizing divisions by a constant.
 

Functions

bool llvm::isDereferenceablePointer (const Value *V, Type *Ty, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
 Return true if this is always a dereferenceable pointer. More...
 
bool llvm::isDereferenceableAndAlignedPointer (const Value *V, Type *Ty, MaybeAlign Alignment, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
 Returns true if V is always a dereferenceable pointer with alignment greater or equal than requested. More...
 
bool llvm::isDereferenceableAndAlignedPointer (const Value *V, Align Alignment, const APInt &Size, const DataLayout &DL, const Instruction *CtxI=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
 Returns true if V is always dereferenceable for Size byte with alignment greater or equal than requested. More...
 
bool llvm::isSafeToLoadUnconditionally (Value *V, Align Alignment, APInt &Size, const DataLayout &DL, Instruction *ScanFrom=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
 Return true if we know that executing a load from this value cannot trap. More...
 
bool llvm::isDereferenceableAndAlignedInLoop (LoadInst *LI, Loop *L, ScalarEvolution &SE, DominatorTree &DT)
 Return true if we can prove that the given load (which is assumed to be within the specified loop) would access only dereferenceable memory, and be properly aligned on every iteration of the specified loop regardless of its placement within the loop. More...
 
bool llvm::isSafeToLoadUnconditionally (Value *V, Type *Ty, Align Alignment, const DataLayout &DL, Instruction *ScanFrom=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
 Return true if we know that executing a load from this value cannot trap. More...
 
Valuellvm::FindAvailableLoadedValue (LoadInst *Load, BasicBlock *ScanBB, BasicBlock::iterator &ScanFrom, unsigned MaxInstsToScan=DefMaxInstsToScan, AAResults *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 of instructions. More...
 
Valuellvm::FindAvailableLoadedValue (LoadInst *Load, AAResults &AA, bool *IsLoadCSE, unsigned MaxInstsToScan=DefMaxInstsToScan)
 This overload provides a more efficient implementation of FindAvailableLoadedValue() for the case where we are not interested in finding the closest clobbering instruction if no available load is found. More...
 
Valuellvm::findAvailablePtrLoadStore (const MemoryLocation &Loc, Type *AccessTy, bool AtLeastAtomic, BasicBlock *ScanBB, BasicBlock::iterator &ScanFrom, unsigned MaxInstsToScan, AAResults *AA, bool *IsLoadCSE, unsigned *NumScanedInst)
 Scan backwards to see if we have the value of the given pointer available locally within a small number of instructions. More...
 
bool llvm::canReplacePointersIfEqual (Value *A, Value *B, const DataLayout &DL, Instruction *CtxI)
 Returns true if a pointer value A can be replace with another pointer value \B if they are deemed equal through some means (e.g. More...
 

Variables

cl::opt< unsigned > llvm::DefMaxInstsToScan
 The default number of maximum instructions to scan in the block, used by FindAvailableLoadedValue(). More...