|
LLVM
3.7.0
|
#include <AliasAnalysis.h>
Public Types | |
| enum | ModRefResult { NoModRef = 0, Ref = 1, Mod = 2, ModRef = 3 } |
| Simple mod/ref information... More... | |
| enum | { Nowhere = 0, ArgumentPointees = 4, Anywhere = 8 | ArgumentPointees } |
| These values define additional bits used to define the ModRefBehavior values. More... | |
| enum | ModRefBehavior { DoesNotAccessMemory = Nowhere | NoModRef, OnlyReadsArgumentPointees = ArgumentPointees | Ref, OnlyAccessesArgumentPointees = ArgumentPointees | ModRef, OnlyReadsMemory = Anywhere | Ref, UnknownModRefBehavior = Anywhere | ModRef } |
| ModRefBehavior - Summary of how a function affects memory in the program. More... | |
Public Member Functions | |
| AliasAnalysis () | |
| virtual | ~AliasAnalysis () |
| const TargetLibraryInfo * | getTargetLibraryInfo () const |
| getTargetLibraryInfo - Return a pointer to the current TargetLibraryInfo object, or null if no TargetLibraryInfo object is available. More... | |
| uint64_t | getTypeStoreSize (Type *Ty) |
| getTypeStoreSize - Return the DataLayout store size for the given type, if known, or a conservative value otherwise. More... | |
| virtual AliasResult | alias (const MemoryLocation &LocA, const MemoryLocation &LocB) |
| Alias Queries... More... | |
| AliasResult | alias (const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size) |
| alias - A convenience wrapper. More... | |
| AliasResult | alias (const Value *V1, const Value *V2) |
| alias - A convenience wrapper. More... | |
| bool | isNoAlias (const MemoryLocation &LocA, const MemoryLocation &LocB) |
| isNoAlias - A trivial helper function to check to see if the specified pointers are no-alias. More... | |
| bool | isNoAlias (const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size) |
| isNoAlias - A convenience wrapper. More... | |
| bool | isNoAlias (const Value *V1, const Value *V2) |
| isNoAlias - A convenience wrapper. More... | |
| bool | isMustAlias (const MemoryLocation &LocA, const MemoryLocation &LocB) |
| isMustAlias - A convenience wrapper. More... | |
| bool | isMustAlias (const Value *V1, const Value *V2) |
| isMustAlias - A convenience wrapper. More... | |
| virtual bool | pointsToConstantMemory (const MemoryLocation &Loc, bool OrLocal=false) |
| pointsToConstantMemory - If the specified memory location is known to be constant, return true. More... | |
| bool | pointsToConstantMemory (const Value *P, bool OrLocal=false) |
| pointsToConstantMemory - A convenient wrapper. More... | |
| virtual ModRefResult | getArgModRefInfo (ImmutableCallSite CS, unsigned ArgIdx) |
| Get the ModRef info associated with a pointer argument of a callsite. More... | |
| virtual ModRefBehavior | getModRefBehavior (ImmutableCallSite CS) |
| getModRefBehavior - Return the behavior when calling the given call site. More... | |
| virtual ModRefBehavior | getModRefBehavior (const Function *F) |
| getModRefBehavior - Return the behavior when calling the given function. More... | |
| bool | doesNotAccessMemory (ImmutableCallSite CS) |
| doesNotAccessMemory - If the specified call is known to never read or write memory, return true. More... | |
| bool | doesNotAccessMemory (const Function *F) |
| doesNotAccessMemory - If the specified function is known to never read or write memory, return true. More... | |
| bool | onlyReadsMemory (ImmutableCallSite CS) |
| onlyReadsMemory - If the specified call is known to only read from non-volatile memory (or not access memory at all), return true. More... | |
| bool | onlyReadsMemory (const Function *F) |
| onlyReadsMemory - If the specified function is known to only read from non-volatile memory (or not access memory at all), return true. More... | |
| ModRefResult | getModRefInfo (const Instruction *I) |
| getModRefInfo - Return information about whether or not an instruction may read or write memory (without regard to a specific location) More... | |
| ModRefResult | getModRefInfo (const Instruction *I, const MemoryLocation &Loc) |
| getModRefInfo - Return information about whether or not an instruction may read or write the specified memory location. More... | |
| ModRefResult | getModRefInfo (const Instruction *I, const Value *P, uint64_t Size) |
| getModRefInfo - A convenience wrapper. More... | |
| virtual ModRefResult | getModRefInfo (ImmutableCallSite CS, const MemoryLocation &Loc) |
| getModRefInfo (for call sites) - Return information about whether a particular call site modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (ImmutableCallSite CS, const Value *P, uint64_t Size) |
| getModRefInfo (for call sites) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const CallInst *C, const MemoryLocation &Loc) |
| getModRefInfo (for calls) - Return information about whether a particular call modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const CallInst *C, const Value *P, uint64_t Size) |
| getModRefInfo (for calls) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const InvokeInst *I, const MemoryLocation &Loc) |
| getModRefInfo (for invokes) - Return information about whether a particular invoke modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const InvokeInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for invokes) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const LoadInst *L, const MemoryLocation &Loc) |
| getModRefInfo (for loads) - Return information about whether a particular load modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const LoadInst *L, const Value *P, uint64_t Size) |
| getModRefInfo (for loads) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const StoreInst *S, const MemoryLocation &Loc) |
| getModRefInfo (for stores) - Return information about whether a particular store modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const StoreInst *S, const Value *P, uint64_t Size) |
| getModRefInfo (for stores) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const FenceInst *S, const MemoryLocation &Loc) |
| getModRefInfo (for fences) - Return information about whether a particular store modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const FenceInst *S, const Value *P, uint64_t Size) |
| getModRefInfo (for fences) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const AtomicCmpXchgInst *CX, const MemoryLocation &Loc) |
| getModRefInfo (for cmpxchges) - Return information about whether a particular cmpxchg modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const AtomicCmpXchgInst *CX, const Value *P, unsigned Size) |
| getModRefInfo (for cmpxchges) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const AtomicRMWInst *RMW, const MemoryLocation &Loc) |
| getModRefInfo (for atomicrmws) - Return information about whether a particular atomicrmw modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const AtomicRMWInst *RMW, const Value *P, unsigned Size) |
| getModRefInfo (for atomicrmws) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (const VAArgInst *I, const MemoryLocation &Loc) |
| getModRefInfo (for va_args) - Return information about whether a particular va_arg modifies or reads the specified memory location. More... | |
| ModRefResult | getModRefInfo (const VAArgInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for va_args) - A convenience wrapper. More... | |
| ModRefResult | getModRefInfo (Instruction *I, ImmutableCallSite Call) |
| getModRefInfo - Return information about whether a call and an instruction may refer to the same memory locations. More... | |
| virtual ModRefResult | getModRefInfo (ImmutableCallSite CS1, ImmutableCallSite CS2) |
| getModRefInfo - Return information about whether two call sites may refer to the same set of memory locations. More... | |
| ModRefResult | callCapturesBefore (const Instruction *I, const MemoryLocation &MemLoc, DominatorTree *DT) |
| callCapturesBefore - Return information about whether a particular call site modifies or reads the specified memory location. More... | |
| ModRefResult | callCapturesBefore (const Instruction *I, const Value *P, uint64_t Size, DominatorTree *DT) |
| callCapturesBefore - A convenience wrapper. More... | |
| bool | canBasicBlockModify (const BasicBlock &BB, const MemoryLocation &Loc) |
| Higher level methods for querying mod/ref information. More... | |
| bool | canBasicBlockModify (const BasicBlock &BB, const Value *P, uint64_t Size) |
| canBasicBlockModify - A convenience wrapper. More... | |
| bool | canInstructionRangeModRef (const Instruction &I1, const Instruction &I2, const MemoryLocation &Loc, const ModRefResult Mode) |
| canInstructionRangeModRef - Return true if it is possible for the execution of the specified instructions to mod(according to the mode) the location Loc. More... | |
| bool | canInstructionRangeModRef (const Instruction &I1, const Instruction &I2, const Value *Ptr, uint64_t Size, const ModRefResult Mode) |
| canInstructionRangeModRef - A convenience wrapper. More... | |
| virtual void | deleteValue (Value *V) |
| Methods that clients should call when they transform the program to allow alias analyses to update their internal data structures. More... | |
| virtual void | addEscapingUse (Use &U) |
| addEscapingUse - This method should be used whenever an escaping use is added to a pointer value. More... | |
| void | replaceWithNewValue (Value *Old, Value *New) |
| replaceWithNewValue - This method is the obvious combination of the two above, and it provided as a helper to simplify client code. More... | |
Static Public Member Functions | |
| static bool | onlyReadsMemory (ModRefBehavior MRB) |
| onlyReadsMemory - Return true if functions with the specified behavior are known to only read from non-volatile memory (or not access memory at all). More... | |
| static bool | onlyAccessesArgPointees (ModRefBehavior MRB) |
| 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). More... | |
| static bool | doesAccessArgPointees (ModRefBehavior MRB) |
| 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). More... | |
Static Public Attributes | |
| static char | ID = 0 |
Protected Member Functions | |
| void | InitializeAliasAnalysis (Pass *P, const DataLayout *DL) |
| InitializeAliasAnalysis - Subclasses must call this method to initialize the AliasAnalysis interface before any other methods are called. More... | |
| virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
| getAnalysisUsage - All alias analysis implementations should invoke this directly (using AliasAnalysis::getAnalysisUsage(AU)). More... | |
Protected Attributes | |
| const DataLayout * | DL |
| const TargetLibraryInfo * | TLI |
Definition at line 87 of file AliasAnalysis.h.
| anonymous enum |
These values define additional bits used to define the ModRefBehavior values.
| Enumerator | |
|---|---|
| Nowhere | |
| ArgumentPointees | |
| Anywhere | |
Definition at line 195 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 201 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.
| Enumerator | |
|---|---|
| NoModRef | |
| Ref | |
| Mod | |
| ModRef | |
Definition at line 191 of file AliasAnalysis.h.
|
inline |
Definition at line 109 of file AliasAnalysis.h.
|
virtual |
Definition at line 405 of file AliasAnalysis.cpp.
|
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 74 of file AliasAnalysis.cpp.
References addEscapingUse().
Referenced by addEscapingUse(), and ConstructSSAForLoadSet().
|
virtual |
Alias Queries...
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().
|
inline |
|
inline |
alias - A convenience wrapper.
Definition at line 140 of file AliasAnalysis.h.
References alias(), and llvm::MemoryLocation::UnknownSize.
| AliasAnalysis::ModRefResult AliasAnalysis::callCapturesBefore | ( | const Instruction * | I, |
| const MemoryLocation & | MemLoc, | ||
| DominatorTree * | DT | ||
| ) |
callCapturesBefore - Return information about whether a particular call site modifies or reads the specified memory location.
Definition at line 353 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), llvm::CS, DL, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotAccessMemory(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotCapture(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::GetUnderlyingObject(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::isByValArgument(), llvm::isIdentifiedObject(), isNoAlias(), ModRef, NoModRef, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::onlyReadsMemory(), llvm::PointerMayBeCapturedBefore(), llvm::MemoryLocation::Ptr, and Ref.
Referenced by callCapturesBefore(), and llvm::MemoryDependenceAnalysis::getPointerDependencyFrom().
|
inline |
callCapturesBefore - A convenience wrapper.
Definition at line 477 of file AliasAnalysis.h.
References callCapturesBefore().
| bool AliasAnalysis::canBasicBlockModify | ( | const BasicBlock & | BB, |
| const MemoryLocation & | 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 location Loc.
Definition at line 433 of file AliasAnalysis.cpp.
References llvm::BasicBlock::back(), canInstructionRangeModRef(), llvm::BasicBlock::front(), and Mod.
Referenced by canBasicBlockModify().
|
inline |
canBasicBlockModify - A convenience wrapper.
Definition at line 491 of file AliasAnalysis.h.
References canBasicBlockModify().
| bool AliasAnalysis::canInstructionRangeModRef | ( | const Instruction & | I1, |
| const Instruction & | I2, | ||
| const MemoryLocation & | Loc, | ||
| const ModRefResult | Mode | ||
| ) |
canInstructionRangeModRef - Return true if it is possible for the execution of the specified instructions to mod(according to the mode) the location Loc.
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 443 of file AliasAnalysis.cpp.
References getModRefInfo(), llvm::Instruction::getParent(), and I.
Referenced by canBasicBlockModify(), and canInstructionRangeModRef().
|
inline |
canInstructionRangeModRef - A convenience wrapper.
Definition at line 505 of file AliasAnalysis.h.
References canInstructionRangeModRef().
|
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 69 of file AliasAnalysis.cpp.
References deleteValue().
Referenced by llvm::AliasSetTracker::deleteValue(), deleteValue(), findPHIToPartitionLoops(), llvm::FoldSingleEntryPHINodes(), insertUniqueBackedgeBlock(), llvm::MemoryDependenceAnalysis::removeInstruction(), replaceWithNewValue(), and simplifyOneLoop().
|
inlinestatic |
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 316 of file AliasAnalysis.h.
References ArgumentPointees, and ModRef.
Referenced by getModRefInfo().
|
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 265 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 272 of file AliasAnalysis.h.
References DoesNotAccessMemory, and getModRefBehavior().
|
protectedvirtual |
getAnalysisUsage - All alias analysis implementations should invoke this directly (using AliasAnalysis::getAnalysisUsage(AU)).
Reimplemented in llvm::LibCallAliasAnalysis.
Definition at line 419 of file AliasAnalysis.cpp.
References llvm::AnalysisUsage::addRequired().
Referenced by llvm::LibCallAliasAnalysis::getAnalysisUsage().
|
virtual |
Get the ModRef info associated with a pointer argument of a callsite.
The result's bits are set to indicate the allowed aliasing ModRef kinds. Note that these bits do not necessarily account for the overall behavior of the function, but rather only provide additional per-argument information.
Definition at line 64 of file AliasAnalysis.cpp.
References getArgModRefInfo().
Referenced by getArgModRefInfo(), and getModRefInfo().
|
virtual |
getModRefBehavior - Return the behavior when calling the given call site.
Definition at line 236 of file AliasAnalysis.cpp.
References F(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), getModRefBehavior(), and UnknownModRefBehavior.
Referenced by AddAliasScopeMetadata(), llvm::objcarc::CanAlterRefCount(), canSinkOrHoistInst(), doesNotAccessMemory(), getModRefBehavior(), getModRefInfo(), and onlyReadsMemory().
|
virtual |
getModRefBehavior - Return the behavior when calling the given function.
For use when the call site is not known.
Definition at line 255 of file AliasAnalysis.cpp.
References getModRefBehavior().
|
inline |
getModRefInfo - Return information about whether or not an instruction may read or write memory (without regard to a specific location)
Definition at line 323 of file AliasAnalysis.h.
References llvm::CS, getModRefBehavior(), Mod, ModRef, NoModRef, and Ref.
Referenced by llvm::AliasSet::aliasesPointer(), llvm::AliasSet::aliasesUnknownInst(), canInstructionRangeModRef(), llvm::FindAvailableLoadedValue(), findSafeStoreForStoreStrongContraction(), llvm::LibCallAliasAnalysis::getModRefInfo(), getModRefInfo(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), isSafeToMove(), and mayLoopAccessLocation().
|
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 341 of file AliasAnalysis.h.
References llvm::Call, getModRefInfo(), llvm::Instruction::getOpcode(), llvm::SPII::Load, NoModRef, and llvm::SPII::Store.
|
inline |
getModRefInfo - A convenience wrapper.
Definition at line 358 of file AliasAnalysis.h.
References getModRefInfo().
|
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 98 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), doesAccessArgPointees(), DoesNotAccessMemory, getArgModRefInfo(), llvm::MemoryLocation::getForArgument(), getModRefBehavior(), getModRefInfo(), llvm::Value::getType(), isNoAlias(), llvm::Type::isPointerTy(), Mod, ModRef, NoModRef, onlyAccessesArgPointees(), onlyReadsMemory(), pointsToConstantMemory(), Ref, and TLI.
|
inline |
getModRefInfo (for call sites) - A convenience wrapper.
Definition at line 369 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for calls) - Return information about whether a particular call modifies or reads the specified memory location.
Definition at line 376 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for calls) - A convenience wrapper.
Definition at line 381 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for invokes) - Return information about whether a particular invoke modifies or reads the specified memory location.
Definition at line 387 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for invokes) - A convenience wrapper.
Definition at line 392 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const LoadInst * | L, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for loads) - Return information about whether a particular load modifies or reads the specified memory location.
Definition at line 265 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::LoadInst::isUnordered(), ModRef, NoModRef, llvm::MemoryLocation::Ptr, and Ref.
|
inline |
getModRefInfo (for loads) - A convenience wrapper.
Definition at line 402 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const StoreInst * | S, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for stores) - Return information about whether a particular store modifies or reads the specified memory location.
Definition at line 280 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::StoreInst::isUnordered(), Mod, ModRef, NoModRef, pointsToConstantMemory(), and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for stores) - A convenience wrapper.
Definition at line 411 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for fences) - Return information about whether a particular store modifies or reads the specified memory location.
Definition at line 417 of file AliasAnalysis.h.
References ModRef.
|
inline |
getModRefInfo (for fences) - A convenience wrapper.
Definition at line 424 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const AtomicCmpXchgInst * | CX, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for cmpxchges) - Return information about whether a particular cmpxchg modifies or reads the specified memory location.
Definition at line 322 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::AtomicCmpXchgInst::getSuccessOrdering(), ModRef, llvm::Monotonic, NoModRef, and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for cmpxchges) - A convenience wrapper.
Definition at line 434 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const AtomicRMWInst * | RMW, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for atomicrmws) - Return information about whether a particular atomicrmw modifies or reads the specified memory location.
Definition at line 336 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::AtomicRMWInst::getOrdering(), ModRef, llvm::Monotonic, NoModRef, and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for atomicrmws) - A convenience wrapper.
Definition at line 445 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | const VAArgInst * | I, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for va_args) - Return information about whether a particular va_arg modifies or reads the specified memory location.
Definition at line 303 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), ModRef, NoModRef, pointsToConstantMemory(), and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for va_args) - A convenience wrapper.
Definition at line 455 of file AliasAnalysis.h.
References getModRefInfo().
| AliasAnalysis::ModRefResult AliasAnalysis::getModRefInfo | ( | Instruction * | I, |
| ImmutableCallSite | Call | ||
| ) |
getModRefInfo - Return information about whether a call and an instruction may refer to the same memory locations.
Definition at line 80 of file AliasAnalysis.cpp.
References llvm::CS, llvm::MemoryLocation::get(), getModRefInfo(), ModRef, and NoModRef.
|
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 147 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), doesAccessArgPointees(), DoesNotAccessMemory, getArgModRefInfo(), llvm::MemoryLocation::getForArgument(), getModRefBehavior(), getModRefInfo(), llvm::Value::getType(), I, llvm::Type::isPointerTy(), Mod, ModRef, NoModRef, onlyAccessesArgPointees(), onlyReadsMemory(), Ref, and TLI.
|
inline |
getTargetLibraryInfo - Return a pointer to the current TargetLibraryInfo object, or null if no TargetLibraryInfo object is available.
Definition at line 115 of file AliasAnalysis.h.
References TLI.
Referenced by GetLocation(), getLocForRead(), and llvm::MemoryDependenceAnalysis::getPointerDependencyFrom().
| 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 426 of file AliasAnalysis.cpp.
References DL, llvm::DataLayout::getTypeStoreSize(), and llvm::MemoryLocation::UnknownSize.
Referenced by llvm::AliasSetTracker::add(), canSinkOrHoistInst(), llvm::AliasSetTracker::remove(), and underlyingObjectsAlias().
|
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.
Definition at line 410 of file AliasAnalysis.cpp.
References DL, llvm::Pass::getAnalysis(), llvm::Pass::getAnalysisIfAvailable(), and TLI.
Referenced by llvm::LibCallAliasAnalysis::runOnFunction().
|
inline |
isMustAlias - A convenience wrapper.
Definition at line 163 of file AliasAnalysis.h.
References alias(), and llvm::MustAlias.
Referenced by llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), and isPossibleSelfRead().
isMustAlias - A convenience wrapper.
Definition at line 168 of file AliasAnalysis.h.
References alias(), and llvm::MustAlias.
|
inline |
isNoAlias - A trivial helper function to check to see if the specified pointers are no-alias.
Definition at line 147 of file AliasAnalysis.h.
References alias(), and llvm::NoAlias.
Referenced by callCapturesBefore(), getModRefInfo(), isNoAlias(), and isPossibleSelfRead().
|
inline |
isNoAlias - A convenience wrapper.
Definition at line 152 of file AliasAnalysis.h.
References isNoAlias().
isNoAlias - A convenience wrapper.
Definition at line 158 of file AliasAnalysis.h.
References isNoAlias().
|
inlinestatic |
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 308 of file AliasAnalysis.h.
References Anywhere, and ArgumentPointees.
Referenced by llvm::objcarc::CanAlterRefCount(), and getModRefInfo().
|
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 285 of file AliasAnalysis.h.
References getModRefBehavior().
Referenced by llvm::objcarc::CanAlterRefCount(), canSinkOrHoistInst(), 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 293 of file AliasAnalysis.h.
References getModRefBehavior(), and onlyReadsMemory().
|
inlinestatic |
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 300 of file AliasAnalysis.h.
References Mod.
|
virtual |
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 57 of file AliasAnalysis.cpp.
References pointsToConstantMemory().
Referenced by canSinkOrHoistInst(), getMemCmpLoad(), getModRefInfo(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), llvm::MachineInstr::isInvariantLoad(), llvm::objcarc::IsPotentialRetainableObjPtr(), and pointsToConstantMemory().
pointsToConstantMemory - A convenient wrapper.
Definition at line 180 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 538 of file AliasAnalysis.h.
References deleteValue().
|
protected |
Definition at line 89 of file AliasAnalysis.h.
Referenced by callCapturesBefore(), getTypeStoreSize(), and InitializeAliasAnalysis().
|
static |
Definition at line 108 of file AliasAnalysis.h.
Referenced by llvm::LibCallAliasAnalysis::getAdjustedAnalysisPointer().
|
protected |
Definition at line 90 of file AliasAnalysis.h.
Referenced by getModRefInfo(), getTargetLibraryInfo(), and InitializeAliasAnalysis().
1.8.6