LLVM  3.7.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
llvm::LibCallAliasAnalysis Struct Reference

LibCallAliasAnalysis - Alias analysis driven from LibCallInfo. More...

#include <LibCallAliasAnalysis.h>

Inheritance diagram for llvm::LibCallAliasAnalysis:
[legend]
Collaboration diagram for llvm::LibCallAliasAnalysis:
[legend]

Public Member Functions

 LibCallAliasAnalysis (LibCallInfo *LC=nullptr)
 
 LibCallAliasAnalysis (char &ID, LibCallInfo *LC)
 
 ~LibCallAliasAnalysis () override
 
ModRefResult getModRefInfo (ImmutableCallSite CS, const MemoryLocation &Loc) override
 getModRefInfo (for call sites) - Return information about whether a particular call site modifies or reads the specified memory location. More...
 
ModRefResult getModRefInfo (ImmutableCallSite CS1, ImmutableCallSite CS2) override
 getModRefInfo - Return information about whether two call sites may refer to the same set of memory locations. More...
 
void getAnalysisUsage (AnalysisUsage &AU) const override
 getAnalysisUsage - All alias analysis implementations should invoke this directly (using AliasAnalysis::getAnalysisUsage(AU)). More...
 
bool runOnFunction (Function &F) override
 runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass. More...
 
void * getAdjustedAnalysisPointer (const void *PI) override
 getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. More...
 
- Public Member Functions inherited from llvm::FunctionPass
 FunctionPass (char &pid)
 
PasscreatePrinterPass (raw_ostream &O, const std::string &Banner) const override
 createPrinterPass - Get a function printer pass. More...
 
void assignPassManager (PMStack &PMS, PassManagerType T) override
 Find appropriate Function Pass Manager or Call Graph Pass Manager in the PM Stack and add self into that manager. More...
 
PassManagerType getPotentialPassManagerType () const override
 Return what kind of Pass Manager can manage this pass. More...
 
- Public Member Functions inherited from llvm::Pass
 Pass (PassKind K, char &pid)
 
virtual ~Pass ()
 
PassKind getPassKind () const
 
virtual const char * getPassName () const
 getPassName - Return a nice clean name for a pass. More...
 
AnalysisID getPassID () const
 getPassID - Return the PassID number that corresponds to this pass. More...
 
virtual bool doInitialization (Module &)
 doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. More...
 
virtual bool doFinalization (Module &)
 doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run. More...
 
virtual void print (raw_ostream &O, const Module *M) const
 print - Print out the internal state of the pass. More...
 
void dump () const
 
virtual void preparePassManager (PMStack &)
 Check if available pass managers are suitable for this pass or not. More...
 
void setResolver (AnalysisResolver *AR)
 
AnalysisResolvergetResolver () const
 
virtual void releaseMemory ()
 releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. More...
 
virtual ImmutablePassgetAsImmutablePass ()
 
virtual PMDataManagergetAsPMDataManager ()
 
virtual void verifyAnalysis () const
 verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information. More...
 
virtual void dumpPassStructure (unsigned Offset=0)
 
template<typename AnalysisType >
AnalysisType * getAnalysisIfAvailable () const
 getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information that might be around, for example to update it. More...
 
bool mustPreserveAnalysisID (char &AID) const
 mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. More...
 
template<typename AnalysisType >
AnalysisType & getAnalysis () const
 getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. More...
 
template<typename AnalysisType >
AnalysisType & getAnalysis (Function &F)
 getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. More...
 
template<typename AnalysisType >
AnalysisType & getAnalysisID (AnalysisID PI) const
 
template<typename AnalysisType >
AnalysisType & getAnalysisID (AnalysisID PI, Function &F)
 
- Public Member Functions inherited from llvm::AliasAnalysis
 AliasAnalysis ()
 
virtual ~AliasAnalysis ()
 
const TargetLibraryInfogetTargetLibraryInfo () 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...
 
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...
 
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...
 

Public Attributes

LibCallInfoLCI
 

Static Public Attributes

static char ID = 0
 
- Static Public Attributes inherited from llvm::AliasAnalysis
static char ID = 0
 

Additional Inherited Members

- Public Types inherited from llvm::AliasAnalysis
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...
 
- Static Public Member Functions inherited from llvm::Pass
static const PassInfolookupPassInfo (const void *TI)
 
static const PassInfolookupPassInfo (StringRef Arg)
 
static PasscreatePass (AnalysisID ID)
 
- Static Public Member Functions inherited from llvm::AliasAnalysis
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...
 
- Protected Member Functions inherited from llvm::FunctionPass
bool skipOptnoneFunction (const Function &F) const
 skipOptnoneFunction - This function has Attribute::OptimizeNone and most transformation passes should skip it. More...
 
- Protected Member Functions inherited from llvm::AliasAnalysis
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...
 
- Protected Attributes inherited from llvm::AliasAnalysis
const DataLayoutDL
 
const TargetLibraryInfoTLI
 

Detailed Description

LibCallAliasAnalysis - Alias analysis driven from LibCallInfo.

Definition at line 26 of file LibCallAliasAnalysis.h.

Constructor & Destructor Documentation

llvm::LibCallAliasAnalysis::LibCallAliasAnalysis ( LibCallInfo LC = nullptr)
inlineexplicit
llvm::LibCallAliasAnalysis::LibCallAliasAnalysis ( char &  ID,
LibCallInfo LC 
)
inlineexplicit
LibCallAliasAnalysis::~LibCallAliasAnalysis ( )
override

Definition at line 30 of file LibCallAliasAnalysis.cpp.

References LCI.

Member Function Documentation

void* llvm::LibCallAliasAnalysis::getAdjustedAnalysisPointer ( const void *  PI)
inlineoverridevirtual

getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance.

If needed, it should override this to adjust the this pointer as needed for the specified pass info.

Reimplemented from llvm::Pass.

Definition at line 58 of file LibCallAliasAnalysis.h.

References llvm::AliasAnalysis::ID.

void LibCallAliasAnalysis::getAnalysisUsage ( AnalysisUsage AU) const
overridevirtual

getAnalysisUsage - All alias analysis implementations should invoke this directly (using AliasAnalysis::getAnalysisUsage(AU)).

Reimplemented from llvm::AliasAnalysis.

Definition at line 34 of file LibCallAliasAnalysis.cpp.

References llvm::AliasAnalysis::getAnalysisUsage(), and llvm::AnalysisUsage::setPreservesAll().

AliasAnalysis::ModRefResult LibCallAliasAnalysis::getModRefInfo ( ImmutableCallSite  CS,
const MemoryLocation Loc 
)
overridevirtual

getModRefInfo (for call sites) - Return information about whether a particular call site modifies or reads the specified memory location.

Reimplemented from llvm::AliasAnalysis.

Definition at line 124 of file LibCallAliasAnalysis.cpp.

References F(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::LibCallInfo::getFunctionInfo(), llvm::AliasAnalysis::getModRefInfo(), LCI, llvm::AliasAnalysis::ModRef, and llvm::AliasAnalysis::NoModRef.

ModRefResult llvm::LibCallAliasAnalysis::getModRefInfo ( ImmutableCallSite  CS1,
ImmutableCallSite  CS2 
)
inlineoverridevirtual

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 from llvm::AliasAnalysis.

Definition at line 44 of file LibCallAliasAnalysis.h.

References llvm::AliasAnalysis::getModRefInfo().

bool LibCallAliasAnalysis::runOnFunction ( Function F)
overridevirtual

runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.

Implements llvm::FunctionPass.

Definition at line 39 of file LibCallAliasAnalysis.cpp.

References llvm::Module::getDataLayout(), llvm::GlobalValue::getParent(), and llvm::AliasAnalysis::InitializeAliasAnalysis().

Member Data Documentation

char LibCallAliasAnalysis::ID = 0
static

Definition at line 27 of file LibCallAliasAnalysis.h.

LibCallInfo* llvm::LibCallAliasAnalysis::LCI

Definition at line 29 of file LibCallAliasAnalysis.h.

Referenced by getModRefInfo(), and ~LibCallAliasAnalysis().


The documentation for this struct was generated from the following files: