53 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
54 return AA->alias(LocA, LocB);
59 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
64 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
69 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
74 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
82 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
93 bool doesAlias =
false;
98 const Value *Arg = *AI;
118 if (!AA)
return Mask;
127 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
191 if (!AA)
return Mask;
200 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
219 assert(AA &&
"AA didn't call InitializeAliasAnalysis in its run method!");
263 Size =
C->getValue().getZExtValue();
276 Size =
C->getValue().getZExtValue();
371 : BeforeHere(I), DT(DT), Captured(
false) {}
373 void tooManyUses() { Captured =
true; }
375 bool shouldExplore(
Use *U) {
380 if (BeforeHere != I && !DT->isReachableFromEntry(BB))
385 if (BeforeHere != I && DT->dominates(BeforeHere, I) &&
391 bool captured(
Use *U) {
395 if (BeforeHere != I && !DT->isReachableFromEntry(BB))
397 if (BeforeHere != I && DT->dominates(BeforeHere, I) &&
423 isa<Constant>(Object))
430 CapturesBefore CB(I, DT);
438 CI != CE; ++CI, ++ArgNo) {
442 if (!(*CI)->getType()->isPointerTy() ||
510 "Instructions not in same basic block!");
524 if (isa<CallInst>(V) || isa<InvokeInst>(V))
534 if (
const Argument *
A = dyn_cast<Argument>(V))
535 return A->hasNoAliasAttr();
547 if (isa<AllocaInst>(V))
549 if (isa<GlobalValue>(V) && !isa<GlobalAlias>(V))
553 if (
const Argument *
A = dyn_cast<Argument>(V))
554 return A->hasNoAliasAttr() ||
A->hasByValAttr();
Value * getValueOperand()
AtomicOrdering getOrdering() const
Returns the ordering constraint on this cmpxchg.
virtual bool pointsToConstantMemory(const Location &Loc, bool OrLocal=false)
LLVM Argument representation.
const Instruction & back() const
ModRefResult getModRefInfo(const Instruction *I, const Location &Loc)
static Location getLocationForSource(const MemTransferInst *MTI)
bool canBasicBlockModify(const BasicBlock &BB, const Location &Loc)
const Instruction & front() const
MDNode - a tuple of other values.
bool isNoAliasCall(const Value *V)
LoopInfoBase< BlockT, LoopT > * LI
Value * GetUnderlyingObject(Value *V, const DataLayout *TD=0, unsigned MaxLookup=6)
AnalysisUsage & addRequired()
bool isNoAlias(const Location &LocA, const Location &LocB)
AnalysisType * getAnalysisIfAvailable() const
ID
LLVM Calling Convention Representation.
Value * getPointerOperand()
bool isIdentifiedObject(const Value *V)
virtual void copyValue(Value *From, Value *To)
Value * getPointerOperand()
AtomicOrdering getOrdering() const
Returns the ordering constraint on this RMW.
#define INITIALIZE_ANALYSIS_GROUP(agName, name, defaultPass)
virtual void addEscapingUse(Use &U)
uint64_t getTypeStoreSize(Type *Ty)
Considered to not alias after call.
bool onlyReadsMemory(ImmutableCallSite CS)
LLVM Basic Block Representation.
InstrTy * getInstruction() const
virtual AliasResult alias(const Location &LocA, const Location &LocB)
Value * getCompareOperand()
Value * getRawDest() const
const TargetLibraryInfo * TLI
static Location getLocationForDest(const MemIntrinsic *MI)
Value * getPointerOperand()
Location - A description of a memory location.
static bool doesAccessArgPointees(ModRefBehavior MRB)
virtual void deleteValue(Value *V)
bool PointerMayBeCaptured(const Value *V, bool ReturnCaptures, bool StoreCaptures)
bool onlyReadsMemory() const
Determine if the call does not access or only reads memory.
virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS)
getModRefBehavior - Return the behavior when calling the given call site.
AnalysisType & getAnalysis() const
Class for constant integers.
bool doesNotAccessMemory() const
Determine if the call does not access memory.
bool isByValArgument(unsigned ArgNo) const
Determine whether this argument is passed by value.
MDNode * getMetadata(unsigned KindID) const
Value * getLength() const
void InitializeAliasAnalysis(Pass *P)
bool doesNotCapture(unsigned ArgNo) const
Determine whether this argument is not captured.
Location getLocation(const LoadInst *LI)
static bool onlyAccessesArgPointees(ModRefBehavior MRB)
Value * getPointerOperand()
ImmutableCallSite - establish a view to a call site for examination.
const Value * Ptr
Ptr - The address of the start of the location.
bool paramHasAttr(unsigned i, Attribute::AttrKind A) const
Return true if the call or the callee has the given attribute.
uint64_t getTypeStoreSize(Type *Ty) const
static uint64_t const UnknownSize
Value * getRawSource() const
LLVM Value Representation.
bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2, const Location &Loc)
bool isPotentiallyReachable(const Instruction *From, const Instruction *To, const DominatorTree *DT=0, const LoopInfo *LI=0)
Determine whether instruction 'To' is reachable from 'From', returning true if uncertain.
virtual void getAnalysisUsage(AnalysisUsage &AU) const
bool isNoAliasArgument(const Value *V)
ModRefResult callCapturesBefore(const Instruction *I, const AliasAnalysis::Location &MemLoc, DominatorTree *DT)
Value * getPointerOperand()
const BasicBlock * getParent() const
FunTy * getCalledFunction() const