LLVM  6.0.0svn
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
llvm::AAResultBase< DerivedT > Class Template Reference

A CRTP-driven "mixin" base class to help implement the function alias analysis results concept. More...

#include "llvm/Analysis/AliasAnalysis.h"

Inheritance diagram for llvm::AAResultBase< DerivedT >:
Inheritance graph
[legend]

Classes

class  AAResultsProxy
 This proxy class models a common pattern where we delegate to either the top-level AAResults aggregation if one is registered, or to the current result if none are registered. More...
 

Public Member Functions

AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB)
 
bool pointsToConstantMemory (const MemoryLocation &Loc, bool OrLocal)
 
ModRefInfo getArgModRefInfo (ImmutableCallSite CS, unsigned ArgIdx)
 
FunctionModRefBehavior getModRefBehavior (ImmutableCallSite CS)
 
FunctionModRefBehavior getModRefBehavior (const Function *F)
 
ModRefInfo getModRefInfo (ImmutableCallSite CS, const MemoryLocation &Loc)
 
ModRefInfo getModRefInfo (ImmutableCallSite CS1, ImmutableCallSite CS2)
 

Protected Member Functions

 AAResultBase ()=default
 
 AAResultBase (const AAResultBase &Arg)
 
 AAResultBase (AAResultBase &&Arg)
 
AAResultsProxy getBestAAResults ()
 Get a proxy for the best AA result set to query at this time. More...
 

Friends

class AAResults::Model< DerivedT >
 

Detailed Description

template<typename DerivedT>
class llvm::AAResultBase< DerivedT >

A CRTP-driven "mixin" base class to help implement the function alias analysis results concept.

Because of the nature of many alias analysis implementations, they often only implement a subset of the interface. This base class will attempt to implement the remaining portions of the interface in terms of simpler forms of the interface where possible, and otherwise provide conservatively correct fallback implementations.

Implementors of an alias analysis should derive from this CRTP, and then override specific methods that they wish to customize. There is no need to use virtual anywhere, the CRTP base class does static dispatch to the derived type passed into it.

Definition at line 764 of file AliasAnalysis.h.

Constructor & Destructor Documentation

◆ AAResultBase() [1/3]

template<typename DerivedT>
llvm::AAResultBase< DerivedT >::AAResultBase ( )
explicitprotecteddefault

◆ AAResultBase() [2/3]

template<typename DerivedT>
llvm::AAResultBase< DerivedT >::AAResultBase ( const AAResultBase< DerivedT > &  Arg)
inlineprotected

Definition at line 828 of file AliasAnalysis.h.

◆ AAResultBase() [3/3]

template<typename DerivedT>
llvm::AAResultBase< DerivedT >::AAResultBase ( AAResultBase< DerivedT > &&  Arg)
inlineprotected

Definition at line 829 of file AliasAnalysis.h.

Member Function Documentation

◆ alias()

template<typename DerivedT>
AliasResult llvm::AAResultBase< DerivedT >::alias ( const MemoryLocation LocA,
const MemoryLocation LocB 
)
inline

◆ getArgModRefInfo()

template<typename DerivedT>
ModRefInfo llvm::AAResultBase< DerivedT >::getArgModRefInfo ( ImmutableCallSite  CS,
unsigned  ArgIdx 
)
inline

Definition at line 852 of file AliasAnalysis.h.

Referenced by llvm::BasicAAResult::getArgModRefInfo().

◆ getBestAAResults()

template<typename DerivedT>
AAResultsProxy llvm::AAResultBase< DerivedT >::getBestAAResults ( )
inlineprotected

Get a proxy for the best AA result set to query at this time.

When this result is part of a larger aggregation, this will proxy to that aggregation. When this result is used in isolation, it will just delegate back to the derived class's implementation.

Note that callers of this need to take considerable care to not cause performance problems when they use this routine, in the case of a large number of alias analyses being aggregated, it can be expensive to walk back across the chain.

Definition at line 841 of file AliasAnalysis.h.

Referenced by llvm::BasicAAResult::getModRefBehavior(), llvm::BasicAAResult::getModRefInfo(), and MergeAliasResults().

◆ getModRefBehavior() [1/2]

template<typename DerivedT>
FunctionModRefBehavior llvm::AAResultBase< DerivedT >::getModRefBehavior ( ImmutableCallSite  CS)
inline

◆ getModRefBehavior() [2/2]

template<typename DerivedT>
FunctionModRefBehavior llvm::AAResultBase< DerivedT >::getModRefBehavior ( const Function F)
inline

Definition at line 860 of file AliasAnalysis.h.

◆ getModRefInfo() [1/2]

template<typename DerivedT>
ModRefInfo llvm::AAResultBase< DerivedT >::getModRefInfo ( ImmutableCallSite  CS,
const MemoryLocation Loc 
)
inline

◆ getModRefInfo() [2/2]

template<typename DerivedT>
ModRefInfo llvm::AAResultBase< DerivedT >::getModRefInfo ( ImmutableCallSite  CS1,
ImmutableCallSite  CS2 
)
inline

Definition at line 868 of file AliasAnalysis.h.

◆ pointsToConstantMemory()

template<typename DerivedT>
bool llvm::AAResultBase< DerivedT >::pointsToConstantMemory ( const MemoryLocation Loc,
bool  OrLocal 
)
inline

Friends And Related Function Documentation

◆ AAResults::Model< DerivedT >

template<typename DerivedT>
friend class AAResults::Model< DerivedT >
friend

Definition at line 768 of file AliasAnalysis.h.


The documentation for this class was generated from the following file: