37 #ifndef LLVM_ANALYSIS_ALIASANALYSIS_H
38 #define LLVM_ANALYSIS_ALIASANALYSIS_H
49 class TargetLibraryInfo;
52 class MemTransferInst;
176 const Value *
V2, uint64_t V2Size) {
193 const Value *
V2, uint64_t V2Size) {
217 bool OrLocal =
false);
360 case Instruction::AtomicCmpXchg:
362 case Instruction::AtomicRMW:
372 const Value *
P, uint64_t Size) {
379 const Location &Loc);
383 const Value *
P, uint64_t Size) {
407 const Value *
P, uint64_t Size) {
448 const Value *
P,
unsigned Size) {
458 const Value *
P,
unsigned Size) {
508 const Location &Loc);
512 const Value *Ptr, uint64_t Size) {
577 return LHS.
Ptr == RHS.
Ptr &&
void replaceWithNewValue(Value *Old, Value *New)
const DataLayout * getDataLayout() const
ModRefResult getModRefInfo(ImmutableCallSite CS, const Value *P, uint64_t Size)
getModRefInfo (for call sites) - A convenience wrapper.
Pointers differ, but pointees overlap.
virtual bool pointsToConstantMemory(const Location &Loc, bool OrLocal=false)
bool onlyReadsMemory(const Function *F)
ModRefResult getModRefInfo(const Instruction *I, const Location &Loc)
static Location getLocationForSource(const MemTransferInst *MTI)
Location(const Value *P=0, uint64_t S=UnknownSize, const MDNode *N=0)
AliasResult alias(const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size)
alias - A convenience wrapper.
bool canBasicBlockModify(const BasicBlock &BB, const Location &Loc)
ModRefResult getModRefInfo(const AtomicCmpXchgInst *CX, const Value *P, unsigned Size)
getModRefInfo (for cmpxchges) - A convenience wrapper.
MDNode - a tuple of other values.
bool isNoAliasCall(const Value *V)
ModRefResult callCapturesBefore(const Instruction *I, const Value *P, uint64_t Size, DominatorTree *DT)
callCapturesBefore - A convenience wrapper.
LoopInfoBase< BlockT, LoopT > * LI
ModRefResult getModRefInfo(const FenceInst *S, const Location &Loc)
bool isNoAlias(const Location &LocA, const Location &LocB)
ModRefResult getModRefInfo(const LoadInst *L, const Value *P, uint64_t Size)
getModRefInfo (for loads) - A convenience wrapper.
bool isIdentifiedObject(const Value *V)
virtual void copyValue(Value *From, Value *To)
bool doesNotAccessMemory(const Function *F)
bool isNoAlias(const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size)
isNoAlias - A convenience wrapper.
static bool isEqual(const AliasAnalysis::Location &LHS, const AliasAnalysis::Location &RHS)
virtual void addEscapingUse(Use &U)
uint64_t getTypeStoreSize(Type *Ty)
ModRefResult getModRefInfo(const AtomicRMWInst *RMW, const Value *P, unsigned Size)
getModRefInfo (for atomicrmws) - A convenience wrapper.
bool onlyReadsMemory(ImmutableCallSite CS)
Location getWithNewSize(uint64_t NewSize) const
static AliasAnalysis::Location getEmptyKey()
LLVM Basic Block Representation.
bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2, const Value *Ptr, uint64_t Size)
canInstructionRangeModify - A convenience wrapper.
virtual AliasResult alias(const Location &LocA, const Location &LocB)
static AliasAnalysis::Location getTombstoneKey()
const TargetLibraryInfo * TLI
bool doesNotAccessMemory(ImmutableCallSite CS)
static Location getLocationForDest(const MemIntrinsic *MI)
ModRefResult getModRefInfo(const FenceInst *S, const Value *P, uint64_t Size)
getModRefInfo (for fences) - A convenience wrapper.
Location - A description of a memory location.
static bool doesAccessArgPointees(ModRefBehavior MRB)
virtual void deleteValue(Value *V)
virtual ModRefBehavior getModRefBehavior(ImmutableCallSite CS)
getModRefBehavior - Return the behavior when calling the given call site.
ModRefResult getModRefInfo(const CallInst *C, const Value *P, uint64_t Size)
getModRefInfo (for calls) - A convenience wrapper.
bool isMustAlias(const Location &LocA, const Location &LocB)
isMustAlias - A convenience wrapper.
bool canBasicBlockModify(const BasicBlock &BB, const Value *P, uint64_t Size)
canBasicBlockModify - A convenience wrapper.
bool isMustAlias(const Value *V1, const Value *V2)
isMustAlias - A convenience wrapper.
ModRefResult getModRefInfo(const InvokeInst *I, const Value *P, uint64_t Size)
getModRefInfo (for invokes) - A convenience wrapper.
ModRefResult getModRefInfo(const InvokeInst *I, const Location &Loc)
void InitializeAliasAnalysis(Pass *P)
bool isNoAlias(const Value *V1, const Value *V2)
isNoAlias - A convenience wrapper.
Location getLocation(const LoadInst *LI)
ModRefResult getModRefInfo(const StoreInst *S, const Value *P, uint64_t Size)
getModRefInfo (for stores) - A convenience wrapper.
static bool onlyAccessesArgPointees(ModRefBehavior MRB)
ImmutableCallSite - establish a view to a call site for examination.
const Value * Ptr
Ptr - The address of the start of the location.
static uint64_t const UnknownSize
Location getWithNewPtr(const Value *NewPtr) const
LLVM Value Representation.
unsigned getOpcode() const
getOpcode() returns a member of one of the enums like Instruction::Add.
bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2, const Location &Loc)
ModRefResult getModRefInfo(const Instruction *I, const Value *P, uint64_t Size)
getModRefInfo - A convenience wrapper.
virtual void getAnalysisUsage(AnalysisUsage &AU) const
Location getWithoutTBAATag() const
const TargetLibraryInfo * getTargetLibraryInfo() const
bool isNoAliasArgument(const Value *V)
bool pointsToConstantMemory(const Value *P, bool OrLocal=false)
pointsToConstantMemory - A convenient wrapper.
ModRefResult callCapturesBefore(const Instruction *I, const AliasAnalysis::Location &MemLoc, DominatorTree *DT)
AliasResult alias(const Value *V1, const Value *V2)
alias - A convenience wrapper.
ModRefResult getModRefInfo(const CallInst *C, const Location &Loc)
static bool onlyReadsMemory(ModRefBehavior MRB)
static unsigned getHashValue(const AliasAnalysis::Location &Val)
ModRefResult getModRefInfo(const VAArgInst *I, const Value *P, uint64_t Size)
getModRefInfo (for va_args) - A convenience wrapper.