LLVM  10.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, AAQueryInfo &AAQI)
 
bool pointsToConstantMemory (const MemoryLocation &Loc, AAQueryInfo &AAQI, bool OrLocal)
 
ModRefInfo getArgModRefInfo (const CallBase *Call, unsigned ArgIdx)
 
FunctionModRefBehavior getModRefBehavior (const CallBase *Call)
 
FunctionModRefBehavior getModRefBehavior (const Function *F)
 
ModRefInfo getModRefInfo (const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
 
ModRefInfo getModRefInfo (const CallBase *Call1, const CallBase *Call2, AAQueryInfo &AAQI)
 

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 944 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 1016 of file AliasAnalysis.h.

◆ AAResultBase() [3/3]

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

Definition at line 1017 of file AliasAnalysis.h.

Member Function Documentation

◆ alias()

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

◆ getArgModRefInfo()

template<typename DerivedT>
ModRefInfo llvm::AAResultBase< DerivedT >::getArgModRefInfo ( const CallBase Call,
unsigned  ArgIdx 
)
inline

Definition at line 1042 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 1029 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 ( const CallBase Call)
inline

◆ getModRefBehavior() [2/2]

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

Definition at line 1050 of file AliasAnalysis.h.

◆ getModRefInfo() [1/2]

template<typename DerivedT>
ModRefInfo llvm::AAResultBase< DerivedT >::getModRefInfo ( const CallBase Call,
const MemoryLocation Loc,
AAQueryInfo AAQI 
)
inline

◆ getModRefInfo() [2/2]

template<typename DerivedT>
ModRefInfo llvm::AAResultBase< DerivedT >::getModRefInfo ( const CallBase Call1,
const CallBase Call2,
AAQueryInfo AAQI 
)
inline

Definition at line 1059 of file AliasAnalysis.h.

◆ pointsToConstantMemory()

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

Friends And Related Function Documentation

◆ AAResults::Model< DerivedT >

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

Definition at line 948 of file AliasAnalysis.h.


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