LLVM API Documentation
#include <AliasAnalysis.h>


Classes | |
| struct | Location |
| Location - A description of a memory location. More... | |
Public Types | |
| enum | AliasResult { NoAlias = 0, MayAlias, PartialAlias, MustAlias } |
| enum | ModRefResult { NoModRef = 0, Ref = 1, Mod = 2, ModRef = 3 } |
| enum | { Nowhere = 0, ArgumentPointees = 4, Anywhere = 8 | ArgumentPointees } |
| enum | ModRefBehavior { DoesNotAccessMemory = Nowhere | NoModRef, OnlyReadsArgumentPointees = ArgumentPointees | Ref, OnlyAccessesArgumentPointees = ArgumentPointees | ModRef, OnlyReadsMemory = Anywhere | Ref, UnknownModRefBehavior = Anywhere | ModRef } |
Public Member Functions | |
| AliasAnalysis () | |
| virtual | ~AliasAnalysis () |
| const DataLayout * | getDataLayout () const |
| const TargetLibraryInfo * | getTargetLibraryInfo () const |
| uint64_t | getTypeStoreSize (Type *Ty) |
| Location | getLocation (const LoadInst *LI) |
| Location | getLocation (const StoreInst *SI) |
| Location | getLocation (const VAArgInst *VI) |
| Location | getLocation (const AtomicCmpXchgInst *CXI) |
| Location | getLocation (const AtomicRMWInst *RMWI) |
| virtual AliasResult | alias (const Location &LocA, const Location &LocB) |
| AliasResult | alias (const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size) |
| alias - A convenience wrapper. | |
| AliasResult | alias (const Value *V1, const Value *V2) |
| alias - A convenience wrapper. | |
| bool | isNoAlias (const Location &LocA, const Location &LocB) |
| bool | isNoAlias (const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size) |
| isNoAlias - A convenience wrapper. | |
| bool | isNoAlias (const Value *V1, const Value *V2) |
| isNoAlias - A convenience wrapper. | |
| bool | isMustAlias (const Location &LocA, const Location &LocB) |
| isMustAlias - A convenience wrapper. | |
| bool | isMustAlias (const Value *V1, const Value *V2) |
| isMustAlias - A convenience wrapper. | |
| virtual bool | pointsToConstantMemory (const Location &Loc, bool OrLocal=false) |
| bool | pointsToConstantMemory (const Value *P, bool OrLocal=false) |
| pointsToConstantMemory - A convenient wrapper. | |
| virtual ModRefBehavior | getModRefBehavior (ImmutableCallSite CS) |
| getModRefBehavior - Return the behavior when calling the given call site. | |
| virtual ModRefBehavior | getModRefBehavior (const Function *F) |
| bool | doesNotAccessMemory (ImmutableCallSite CS) |
| bool | doesNotAccessMemory (const Function *F) |
| bool | onlyReadsMemory (ImmutableCallSite CS) |
| bool | onlyReadsMemory (const Function *F) |
| ModRefResult | getModRefInfo (const Instruction *I, const Location &Loc) |
| ModRefResult | getModRefInfo (const Instruction *I, const Value *P, uint64_t Size) |
| getModRefInfo - A convenience wrapper. | |
| virtual ModRefResult | getModRefInfo (ImmutableCallSite CS, const Location &Loc) |
| ModRefResult | getModRefInfo (ImmutableCallSite CS, const Value *P, uint64_t Size) |
| getModRefInfo (for call sites) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const CallInst *C, const Location &Loc) |
| ModRefResult | getModRefInfo (const CallInst *C, const Value *P, uint64_t Size) |
| getModRefInfo (for calls) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const InvokeInst *I, const Location &Loc) |
| ModRefResult | getModRefInfo (const InvokeInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for invokes) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const LoadInst *L, const Location &Loc) |
| ModRefResult | getModRefInfo (const LoadInst *L, const Value *P, uint64_t Size) |
| getModRefInfo (for loads) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const StoreInst *S, const Location &Loc) |
| ModRefResult | getModRefInfo (const StoreInst *S, const Value *P, uint64_t Size) |
| getModRefInfo (for stores) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const FenceInst *S, const Location &Loc) |
| ModRefResult | getModRefInfo (const FenceInst *S, const Value *P, uint64_t Size) |
| getModRefInfo (for fences) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const AtomicCmpXchgInst *CX, const Location &Loc) |
| ModRefResult | getModRefInfo (const AtomicCmpXchgInst *CX, const Value *P, unsigned Size) |
| getModRefInfo (for cmpxchges) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const AtomicRMWInst *RMW, const Location &Loc) |
| ModRefResult | getModRefInfo (const AtomicRMWInst *RMW, const Value *P, unsigned Size) |
| getModRefInfo (for atomicrmws) - A convenience wrapper. | |
| ModRefResult | getModRefInfo (const VAArgInst *I, const Location &Loc) |
| ModRefResult | getModRefInfo (const VAArgInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for va_args) - A convenience wrapper. | |
| virtual ModRefResult | getModRefInfo (ImmutableCallSite CS1, ImmutableCallSite CS2) |
| ModRefResult | callCapturesBefore (const Instruction *I, const AliasAnalysis::Location &MemLoc, DominatorTree *DT) |
| ModRefResult | callCapturesBefore (const Instruction *I, const Value *P, uint64_t Size, DominatorTree *DT) |
| callCapturesBefore - A convenience wrapper. | |
| bool | canBasicBlockModify (const BasicBlock &BB, const Location &Loc) |
| bool | canBasicBlockModify (const BasicBlock &BB, const Value *P, uint64_t Size) |
| canBasicBlockModify - A convenience wrapper. | |
| bool | canInstructionRangeModify (const Instruction &I1, const Instruction &I2, const Location &Loc) |
| bool | canInstructionRangeModify (const Instruction &I1, const Instruction &I2, const Value *Ptr, uint64_t Size) |
| canInstructionRangeModify - A convenience wrapper. | |
| virtual void | deleteValue (Value *V) |
| virtual void | copyValue (Value *From, Value *To) |
| virtual void | addEscapingUse (Use &U) |
| void | replaceWithNewValue (Value *Old, Value *New) |
Static Public Member Functions | |
| static Location | getLocationForSource (const MemTransferInst *MTI) |
| static Location | getLocationForDest (const MemIntrinsic *MI) |
| static bool | onlyReadsMemory (ModRefBehavior MRB) |
| static bool | onlyAccessesArgPointees (ModRefBehavior MRB) |
| static bool | doesAccessArgPointees (ModRefBehavior MRB) |
Static Public Attributes | |
| static char | ID = 0 |
| static uint64_t const | UnknownSize = ~UINT64_C(0) |
Protected Member Functions | |
| void | InitializeAliasAnalysis (Pass *P) |
| virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
Protected Attributes | |
| const DataLayout * | TD |
| const TargetLibraryInfo * | TLI |
Definition at line 56 of file AliasAnalysis.h.
| anonymous enum |
These values define additional bits used to define the ModRefBehavior values.
Definition at line 235 of file AliasAnalysis.h.
Alias analysis result - Either we know for sure that it does not alias, we know for sure it must alias, or we don't know anything: The two pointers _might_ alias. This enum is designed so you can do things like: if (AA.alias(P1, P2)) { ... } to check to see if two pointers might alias.
See docs/AliasAnalysis.html for more information on the specific meanings of these values.
| NoAlias |
No dependencies. |
| MayAlias |
Anything goes. |
| PartialAlias |
Pointers differ, but pointees overlap. |
| MustAlias |
Pointers are equal. |
Definition at line 161 of file AliasAnalysis.h.
ModRefBehavior - Summary of how a function affects memory in the program. Loads from constant globals are not considered memory accesses for this interface. Also, functions may freely modify stack space local to their invocation without having to report it through these interfaces.
Definition at line 241 of file AliasAnalysis.h.
Simple mod/ref information... ModRefResult - Represent the result of a mod/ref query. Mod and Ref are bits which may be or'd together.
Definition at line 231 of file AliasAnalysis.h.
| llvm::AliasAnalysis::AliasAnalysis | ( | ) | [inline] |
Definition at line 78 of file AliasAnalysis.h.
| AliasAnalysis::~AliasAnalysis | ( | ) | [virtual] |
Definition at line 479 of file AliasAnalysis.cpp.
| void AliasAnalysis::addEscapingUse | ( | Use & | U | ) | [virtual] |
addEscapingUse - This method should be used whenever an escaping use is added to a pointer value. Analysis implementations may either return conservative responses for that value in the future, or may recompute some or all internal state to continue providing precise responses.
Escaping uses are considered by anything _except_ the following:
Definition at line 72 of file AliasAnalysis.cpp.
References addEscapingUse().
Referenced by addEscapingUse(), and ConstructSSAForLoadSet().
| AliasAnalysis::AliasResult AliasAnalysis::alias | ( | const Location & | LocA, |
| const Location & | LocB | ||
| ) | [virtual] |
alias - The main low level interface to the alias analysis implementation. Returns an AliasResult indicating whether the two pointers are aliased to each other. This is the interface that must be implemented by specific alias analysis implementations.
Definition at line 51 of file AliasAnalysis.cpp.
Referenced by alias(), llvm::AliasSet::aliasesPointer(), getModRefInfo(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), isMustAlias(), isNoAlias(), llvm::AliasSet::mergeSetIn(), MIsNeedChainEdge(), and underlyingObjectsAlias().
| AliasResult llvm::AliasAnalysis::alias | ( | const Value * | V1, |
| uint64_t | V1Size, | ||
| const Value * | V2, | ||
| uint64_t | V2Size | ||
| ) | [inline] |
| AliasResult llvm::AliasAnalysis::alias | ( | const Value * | V1, |
| const Value * | V2 | ||
| ) | [inline] |
alias - A convenience wrapper.
Definition at line 181 of file AliasAnalysis.h.
References alias(), and UnknownSize.
| AliasAnalysis::ModRefResult AliasAnalysis::callCapturesBefore | ( | const Instruction * | I, |
| const AliasAnalysis::Location & | MemLoc, | ||
| DominatorTree * | DT | ||
| ) |
callCapturesBefore - Return information about whether a particular call site modifies or reads the specified memory location.
Definition at line 433 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotCapture(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::GetUnderlyingObject(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::isByValArgument(), llvm::isIdentifiedObject(), isNoAlias(), ModRef, NoModRef, llvm::PointerMayBeCaptured(), llvm::AliasAnalysis::Location::Ptr, and TD.
Referenced by callCapturesBefore(), and llvm::MemoryDependenceAnalysis::getPointerDependencyFrom().
| ModRefResult llvm::AliasAnalysis::callCapturesBefore | ( | const Instruction * | I, |
| const Value * | P, | ||
| uint64_t | Size, | ||
| DominatorTree * | DT | ||
| ) | [inline] |
callCapturesBefore - A convenience wrapper.
Definition at line 485 of file AliasAnalysis.h.
References callCapturesBefore().
| bool AliasAnalysis::canBasicBlockModify | ( | const BasicBlock & | BB, |
| const Location & | Loc | ||
| ) |
Higher level methods for querying mod/ref information. canBasicBlockModify - Return true if it is possible for execution of the specified basic block to modify the value pointed to by Ptr.
canBasicBlockModify - Return true if it is possible for execution of the specified basic block to modify the value pointed to by Ptr.
Definition at line 506 of file AliasAnalysis.cpp.
References llvm::BasicBlock::back(), canInstructionRangeModify(), and llvm::BasicBlock::front().
Referenced by canBasicBlockModify().
| bool llvm::AliasAnalysis::canBasicBlockModify | ( | const BasicBlock & | BB, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
canBasicBlockModify - A convenience wrapper.
Definition at line 499 of file AliasAnalysis.h.
References canBasicBlockModify().
| bool AliasAnalysis::canInstructionRangeModify | ( | const Instruction & | I1, |
| const Instruction & | I2, | ||
| const Location & | Loc | ||
| ) |
canInstructionRangeModify - Return true if it is possible for the execution of the specified instructions to modify the value pointed to by Ptr. The instructions to consider are all of the instructions in the range of [I1,I2] INCLUSIVE. I1 and I2 must be in the same basic block.
Definition at line 516 of file AliasAnalysis.cpp.
References getModRefInfo(), llvm::Instruction::getParent(), I, and Mod.
Referenced by canBasicBlockModify(), and canInstructionRangeModify().
| bool llvm::AliasAnalysis::canInstructionRangeModify | ( | const Instruction & | I1, |
| const Instruction & | I2, | ||
| const Value * | Ptr, | ||
| uint64_t | Size | ||
| ) | [inline] |
canInstructionRangeModify - A convenience wrapper.
Definition at line 511 of file AliasAnalysis.h.
References canInstructionRangeModify().
copyValue - This method should be used whenever a preexisting value in the program is copied or cloned, introducing a new value. Note that analysis implementations should tolerate clients that use this method to introduce the same value multiple times: if the analysis already knows about a value, it should ignore the request.
Definition at line 67 of file AliasAnalysis.cpp.
References copyValue().
Referenced by ConstructSSAForLoadSet(), llvm::AliasSetTracker::copyValue(), copyValue(), replaceWithNewValue(), and UpdatePHINodes().
| void AliasAnalysis::deleteValue | ( | Value * | V | ) | [virtual] |
Methods that clients should call when they transform the program to allow alias analyses to update their internal data structures. Note that these methods may be called on any instruction, regardless of whether or not they have pointer-analysis implications. deleteValue - This method should be called whenever an LLVM Value is deleted from the program, for example when an instruction is found to be redundant and is eliminated.
Definition at line 62 of file AliasAnalysis.cpp.
References deleteValue().
Referenced by llvm::AliasSetTracker::deleteValue(), deleteValue(), FindPHIToPartitionLoops(), llvm::FoldSingleEntryPHINodes(), llvm::MemoryDependenceAnalysis::removeInstruction(), and replaceWithNewValue().
| static bool llvm::AliasAnalysis::doesAccessArgPointees | ( | ModRefBehavior | MRB | ) | [inline, static] |
doesAccessArgPointees - Return true if functions with the specified behavior are known to potentially read or write from objects pointed to be their pointer-typed arguments (with arbitrary offsets).
Definition at line 346 of file AliasAnalysis.h.
References ArgumentPointees, and ModRef.
Referenced by getModRefInfo().
| bool llvm::AliasAnalysis::doesNotAccessMemory | ( | ImmutableCallSite | CS | ) | [inline] |
doesNotAccessMemory - If the specified call is known to never read or write memory, return true. If the call only reads from known-constant memory, it is also legal to return true. Calls that unwind the stack are legal for this predicate.
Many optimizations (such as CSE and LICM) can be performed on such calls without worrying about aliasing properties, and many calls have this property (e.g. calls to 'sin' and 'cos').
This property corresponds to the GCC 'const' attribute.
Definition at line 295 of file AliasAnalysis.h.
References DoesNotAccessMemory, and getModRefBehavior().
doesNotAccessMemory - If the specified function is known to never read or write memory, return true. For use when the call site is not known.
Definition at line 302 of file AliasAnalysis.h.
References DoesNotAccessMemory, and getModRefBehavior().
| void AliasAnalysis::getAnalysisUsage | ( | AnalysisUsage & | AU | ) | const [protected, virtual] |
getAnalysisUsage - All alias analysis implementations should invoke this directly (using AliasAnalysis::getAnalysisUsage(AU)).
Reimplemented in llvm::LibCallAliasAnalysis.
Definition at line 492 of file AliasAnalysis.cpp.
References llvm::AnalysisUsage::addRequired().
| const DataLayout* llvm::AliasAnalysis::getDataLayout | ( | ) | const [inline] |
getDataLayout - Return a pointer to the current DataLayout object, or null if no DataLayout object is available.
Definition at line 89 of file AliasAnalysis.h.
References TD.
Referenced by getLocForWrite(), getPointerSize(), and isOverwrite().
| AliasAnalysis::Location AliasAnalysis::getLocation | ( | const LoadInst * | LI | ) |
getLocation - Fill in Loc with information about the memory reference by the given instruction.
Definition at line 226 of file AliasAnalysis.cpp.
References llvm::Instruction::getMetadata(), llvm::LoadInst::getPointerOperand(), llvm::Value::getType(), getTypeStoreSize(), and llvm::LLVMContext::MD_tbaa.
Referenced by GetLocation(), getLocForWrite(), getModRefInfo(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), and isSafeToMove().
| AliasAnalysis::Location AliasAnalysis::getLocation | ( | const StoreInst * | SI | ) |
Definition at line 232 of file AliasAnalysis.cpp.
References llvm::Instruction::getMetadata(), llvm::StoreInst::getPointerOperand(), llvm::Value::getType(), getTypeStoreSize(), llvm::StoreInst::getValueOperand(), and llvm::LLVMContext::MD_tbaa.
| AliasAnalysis::Location AliasAnalysis::getLocation | ( | const VAArgInst * | VI | ) |
Definition at line 238 of file AliasAnalysis.cpp.
References llvm::Instruction::getMetadata(), llvm::VAArgInst::getPointerOperand(), llvm::LLVMContext::MD_tbaa, and UnknownSize.
| AliasAnalysis::Location AliasAnalysis::getLocation | ( | const AtomicCmpXchgInst * | CXI | ) |
Definition at line 245 of file AliasAnalysis.cpp.
References llvm::AtomicCmpXchgInst::getCompareOperand(), llvm::Instruction::getMetadata(), llvm::AtomicCmpXchgInst::getPointerOperand(), llvm::Value::getType(), getTypeStoreSize(), and llvm::LLVMContext::MD_tbaa.
| AliasAnalysis::Location AliasAnalysis::getLocation | ( | const AtomicRMWInst * | RMWI | ) |
Definition at line 252 of file AliasAnalysis.cpp.
References llvm::Instruction::getMetadata(), llvm::AtomicRMWInst::getPointerOperand(), llvm::Value::getType(), getTypeStoreSize(), llvm::AtomicRMWInst::getValOperand(), and llvm::LLVMContext::MD_tbaa.
| AliasAnalysis::Location AliasAnalysis::getLocationForDest | ( | const MemIntrinsic * | MI | ) | [static] |
Definition at line 272 of file AliasAnalysis.cpp.
References llvm::CallingConv::C, llvm::MemIntrinsic::getLength(), llvm::Instruction::getMetadata(), llvm::MemIntrinsic::getRawDest(), llvm::LLVMContext::MD_tbaa, and UnknownSize.
Referenced by getLocForWrite().
| AliasAnalysis::Location AliasAnalysis::getLocationForSource | ( | const MemTransferInst * | MTI | ) | [static] |
Definition at line 259 of file AliasAnalysis.cpp.
References llvm::CallingConv::C, llvm::MemIntrinsic::getLength(), llvm::Instruction::getMetadata(), llvm::MemTransferInst::getRawSource(), llvm::LLVMContext::MD_tbaa, and UnknownSize.
Referenced by getLocForRead().
| AliasAnalysis::ModRefBehavior AliasAnalysis::getModRefBehavior | ( | ImmutableCallSite | CS | ) | [virtual] |
getModRefBehavior - Return the behavior when calling the given call site.
Definition at line 198 of file AliasAnalysis.cpp.
References F(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), getModRefBehavior(), and UnknownModRefBehavior.
Referenced by llvm::objcarc::CanAlterRefCount(), doesNotAccessMemory(), getModRefBehavior(), getModRefInfo(), and onlyReadsMemory().
| AliasAnalysis::ModRefBehavior AliasAnalysis::getModRefBehavior | ( | const Function * | F | ) | [virtual] |
getModRefBehavior - Return the behavior when calling the given function. For use when the call site is not known.
Definition at line 217 of file AliasAnalysis.cpp.
References getModRefBehavior().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const Instruction * | I, |
| const Location & | Loc | ||
| ) | [inline] |
getModRefInfo - Return information about whether or not an instruction may read or write the specified memory location. An instruction that doesn't read or write memory may be trivially LICM'd for example.
Definition at line 353 of file AliasAnalysis.h.
References llvm::Call, llvm::Instruction::getOpcode(), llvm::SPII::Load, NoModRef, and llvm::SPII::Store.
Referenced by llvm::AliasSet::aliasesPointer(), llvm::AliasSet::aliasesUnknownInst(), canInstructionRangeModify(), llvm::FindAvailableLoadedValue(), getModRefInfo(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), isSafeToMove(), and mayLoopAccessLocation().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const Instruction * | I, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo - A convenience wrapper.
Definition at line 371 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | ImmutableCallSite | CS, |
| const Location & | Loc | ||
| ) | [virtual] |
getModRefInfo (for call sites) - Return information about whether a particular call site modifies or reads the specified memory location.
Reimplemented in llvm::LibCallAliasAnalysis.
Definition at line 79 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), doesAccessArgPointees(), DoesNotAccessMemory, llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::Instruction::getMetadata(), getModRefBehavior(), getModRefInfo(), llvm::Value::getType(), isNoAlias(), llvm::Type::isPointerTy(), llvm::LLVMContext::MD_tbaa, Mod, ModRef, NoModRef, onlyAccessesArgPointees(), onlyReadsMemory(), pointsToConstantMemory(), Ref, and UnknownSize.
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | ImmutableCallSite | CS, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo (for call sites) - A convenience wrapper.
Definition at line 382 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const CallInst * | C, |
| const Location & | Loc | ||
| ) | [inline] |
getModRefInfo (for calls) - Return information about whether a particular call modifies or reads the specified memory location.
Definition at line 389 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const CallInst * | C, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo (for calls) - A convenience wrapper.
Definition at line 394 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const InvokeInst * | I, |
| const Location & | Loc | ||
| ) | [inline] |
getModRefInfo (for invokes) - Return information about whether a particular invoke modifies or reads the specified memory location.
Definition at line 400 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const InvokeInst * | I, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo (for invokes) - A convenience wrapper.
Definition at line 406 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const LoadInst * | L, |
| const Location & | Loc | ||
| ) |
getModRefInfo (for loads) - Return information about whether a particular load modifies or reads the specified memory location.
Definition at line 287 of file AliasAnalysis.cpp.
References alias(), getLocation(), llvm::LoadInst::isUnordered(), ModRef, NoModRef, and Ref.
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const LoadInst * | L, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo (for loads) - A convenience wrapper.
Definition at line 416 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const StoreInst * | S, |
| const Location & | Loc | ||
| ) |
getModRefInfo (for stores) - Return information about whether a particular store modifies or reads the specified memory location.
Definition at line 302 of file AliasAnalysis.cpp.
References alias(), getLocation(), llvm::StoreInst::isUnordered(), Mod, ModRef, NoModRef, and pointsToConstantMemory().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const StoreInst * | S, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo (for stores) - A convenience wrapper.
Definition at line 425 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const FenceInst * | S, |
| const Location & | Loc | ||
| ) | [inline] |
getModRefInfo (for fences) - Return information about whether a particular store modifies or reads the specified memory location.
Definition at line 431 of file AliasAnalysis.h.
References ModRef.
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const FenceInst * | S, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo (for fences) - A convenience wrapper.
Definition at line 438 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const AtomicCmpXchgInst * | CX, |
| const Location & | Loc | ||
| ) |
getModRefInfo (for cmpxchges) - Return information about whether a particular cmpxchg modifies or reads the specified memory location.
Definition at line 338 of file AliasAnalysis.cpp.
References alias(), getLocation(), llvm::AtomicCmpXchgInst::getOrdering(), ModRef, llvm::Monotonic, and NoModRef.
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const AtomicCmpXchgInst * | CX, |
| const Value * | P, | ||
| unsigned | Size | ||
| ) | [inline] |
getModRefInfo (for cmpxchges) - A convenience wrapper.
Definition at line 447 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const AtomicRMWInst * | RMW, |
| const Location & | Loc | ||
| ) |
getModRefInfo (for atomicrmws) - Return information about whether a particular atomicrmw modifies or reads the specified memory location.
Definition at line 351 of file AliasAnalysis.cpp.
References alias(), getLocation(), llvm::AtomicRMWInst::getOrdering(), ModRef, llvm::Monotonic, and NoModRef.
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const AtomicRMWInst * | RMW, |
| const Value * | P, | ||
| unsigned | Size | ||
| ) | [inline] |
getModRefInfo (for atomicrmws) - A convenience wrapper.
Definition at line 457 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const VAArgInst * | I, |
| const Location & | Loc | ||
| ) |
getModRefInfo (for va_args) - Return information about whether a particular va_arg modifies or reads the specified memory location.
Definition at line 322 of file AliasAnalysis.cpp.
References alias(), getLocation(), ModRef, NoModRef, and pointsToConstantMemory().
| ModRefResult llvm::AliasAnalysis::getModRefInfo | ( | const VAArgInst * | I, |
| const Value * | P, | ||
| uint64_t | Size | ||
| ) | [inline] |
getModRefInfo (for va_args) - A convenience wrapper.
Definition at line 467 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | ImmutableCallSite | CS1, |
| ImmutableCallSite | CS2 | ||
| ) | [virtual] |
getModRefInfo - Return information about whether two call sites may refer to the same set of memory locations. See http://llvm.org/docs/AliasAnalysis.html#ModRefInfo for details.
Reimplemented in llvm::LibCallAliasAnalysis.
Definition at line 125 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), doesAccessArgPointees(), DoesNotAccessMemory, llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::Instruction::getMetadata(), getModRefBehavior(), getModRefInfo(), llvm::Value::getType(), I, llvm::Type::isPointerTy(), llvm::LLVMContext::MD_tbaa, ModRef, NoModRef, onlyAccessesArgPointees(), onlyReadsMemory(), Ref, and UnknownSize.
| const TargetLibraryInfo* llvm::AliasAnalysis::getTargetLibraryInfo | ( | ) | const [inline] |
getTargetLibraryInfo - Return a pointer to the current TargetLibraryInfo object, or null if no TargetLibraryInfo object is available.
Definition at line 94 of file AliasAnalysis.h.
References TLI.
Referenced by GetLocation(), getLocForRead(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), and getPointerSize().
| uint64_t AliasAnalysis::getTypeStoreSize | ( | Type * | Ty | ) |
getTypeStoreSize - Return the DataLayout store size for the given type, if known, or a conservative value otherwise.
Definition at line 499 of file AliasAnalysis.cpp.
References llvm::DataLayout::getTypeStoreSize(), TD, and UnknownSize.
Referenced by llvm::AliasSetTracker::add(), llvm::FindAvailableLoadedValue(), getLocation(), llvm::AliasSetTracker::remove(), and underlyingObjectsAlias().
| void AliasAnalysis::InitializeAliasAnalysis | ( | Pass * | P | ) | [protected] |
InitializeAliasAnalysis - Subclasses must call this method to initialize the AliasAnalysis interface before any other methods are called. This is typically called by the run* methods of these subclasses. This may be called multiple times.
InitializeAliasAnalysis - Subclasses must call this method to initialize the AliasAnalysis interface before any other methods are called.
Definition at line 484 of file AliasAnalysis.cpp.
References llvm::Pass::getAnalysis(), llvm::Pass::getAnalysisIfAvailable(), TD, and TLI.
Referenced by llvm::LibCallAliasAnalysis::runOnFunction().
isMustAlias - A convenience wrapper.
Definition at line 203 of file AliasAnalysis.h.
References alias(), and MustAlias.
Referenced by llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), and isPossibleSelfRead().
isMustAlias - A convenience wrapper.
Definition at line 208 of file AliasAnalysis.h.
isNoAlias - A trivial helper function to check to see if the specified pointers are no-alias.
Definition at line 187 of file AliasAnalysis.h.
References alias(), and NoAlias.
Referenced by callCapturesBefore(), getModRefInfo(), isNoAlias(), and isPossibleSelfRead().
| bool llvm::AliasAnalysis::isNoAlias | ( | const Value * | V1, |
| uint64_t | V1Size, | ||
| const Value * | V2, | ||
| uint64_t | V2Size | ||
| ) | [inline] |
isNoAlias - A convenience wrapper.
Definition at line 192 of file AliasAnalysis.h.
References isNoAlias().
isNoAlias - A convenience wrapper.
Definition at line 198 of file AliasAnalysis.h.
References isNoAlias().
| static bool llvm::AliasAnalysis::onlyAccessesArgPointees | ( | ModRefBehavior | MRB | ) | [inline, static] |
onlyAccessesArgPointees - Return true if functions with the specified behavior are known to read and write at most from objects pointed to by their pointer-typed arguments (with arbitrary offsets).
Definition at line 338 of file AliasAnalysis.h.
References Anywhere, and ArgumentPointees.
Referenced by llvm::objcarc::CanAlterRefCount(), and getModRefInfo().
| bool llvm::AliasAnalysis::onlyReadsMemory | ( | ImmutableCallSite | CS | ) | [inline] |
onlyReadsMemory - If the specified call is known to only read from non-volatile memory (or not access memory at all), return true. Calls that unwind the stack are legal for this predicate.
This property allows many common optimizations to be performed in the absence of interfering store instructions, such as CSE of strlen calls.
This property corresponds to the GCC 'pure' attribute.
Definition at line 315 of file AliasAnalysis.h.
References getModRefBehavior().
Referenced by llvm::objcarc::CanAlterRefCount(), llvm::MemoryDependenceAnalysis::getDependency(), getModRefInfo(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), and onlyReadsMemory().
onlyReadsMemory - If the specified function is known to only read from non-volatile memory (or not access memory at all), return true. For use when the call site is not known.
Definition at line 323 of file AliasAnalysis.h.
References getModRefBehavior(), and onlyReadsMemory().
| static bool llvm::AliasAnalysis::onlyReadsMemory | ( | ModRefBehavior | MRB | ) | [inline, static] |
onlyReadsMemory - Return true if functions with the specified behavior are known to only read from non-volatile memory (or not access memory at all).
Definition at line 330 of file AliasAnalysis.h.
References Mod.
pointsToConstantMemory - If the specified memory location is known to be constant, return true. If OrLocal is true and the specified memory location is known to be "local" (derived from an alloca), return true. Otherwise return false.
Definition at line 56 of file AliasAnalysis.cpp.
References pointsToConstantMemory().
Referenced by getMemCmpLoad(), getModRefInfo(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), llvm::MachineInstr::isInvariantLoad(), llvm::objcarc::IsPotentialRetainableObjPtr(), and pointsToConstantMemory().
pointsToConstantMemory - A convenient wrapper.
Definition at line 220 of file AliasAnalysis.h.
References pointsToConstantMemory().
replaceWithNewValue - This method is the obvious combination of the two above, and it provided as a helper to simplify client code.
Definition at line 551 of file AliasAnalysis.h.
References copyValue(), and deleteValue().
char AliasAnalysis::ID = 0 [static] |
Reimplemented in llvm::objcarc::ObjCARCAliasAnalysis, and llvm::LibCallAliasAnalysis.
Definition at line 77 of file AliasAnalysis.h.
Referenced by llvm::LibCallAliasAnalysis::getAdjustedAnalysisPointer().
const DataLayout* llvm::AliasAnalysis::TD [protected] |
Definition at line 58 of file AliasAnalysis.h.
Referenced by callCapturesBefore(), getDataLayout(), getTypeStoreSize(), and InitializeAliasAnalysis().
const TargetLibraryInfo* llvm::AliasAnalysis::TLI [protected] |
Definition at line 59 of file AliasAnalysis.h.
Referenced by getTargetLibraryInfo(), and InitializeAliasAnalysis().
uint64_t const llvm::AliasAnalysis::UnknownSize = ~UINT64_C(0) [static] |
UnknownSize - This is a special value which can be used with the size arguments in alias queries to indicate that the caller does not know the sizes of the potential memory references.
Definition at line 84 of file AliasAnalysis.h.
Referenced by llvm::AliasSetTracker::add(), alias(), getLocation(), getLocationForDest(), getLocationForSource(), getLocForWrite(), getModRefInfo(), getObjectSize(), getPointerSize(), getTypeStoreSize(), isObjectSize(), isObjectSmallerThan(), isOverwrite(), and llvm::AliasSetTracker::remove().