23 OS <<
"Memory Dereferencibility of pointers in function '" <<
F.getName()
31 if (
LoadInst *LI = dyn_cast<LoadInst>(&
I)) {
32 Value *PO = LI->getPointerOperand();
37 DerefAndAligned.
insert(PO);
41 OS <<
"The following are dereferenceable:\n";
42 for (
Value *V : Deref) {
45 if (DerefAndAligned.
count(V))
48 OS <<
"\t(unaligned)";
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Expand Atomic instructions
Module.h This file contains the declarations for the Module class.
A container for analyses that lazily runs them and caches their results.
A parsed version of the target data layout string in and methods for querying it.
An instruction for reading from memory.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
This is an optimization pass for GlobalISel generic memory operations.
bool isDereferenceableAndAlignedPointer(const Value *V, Type *Ty, Align Alignment, const DataLayout &DL, const Instruction *CtxI=nullptr, AssumptionCache *AC=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.
bool isDereferenceablePointer(const Value *V, Type *Ty, const DataLayout &DL, const Instruction *CtxI=nullptr, AssumptionCache *AC=nullptr, const DominatorTree *DT=nullptr, const TargetLibraryInfo *TLI=nullptr)
Return true if this is always a dereferenceable pointer.