15 #ifndef LLVM_ANALYSIS_CFLANDERSALIASANALYSIS_H
16 #define LLVM_ANALYSIS_CFLANDERSALIASANALYSIS_H
24 #include <forward_list>
28 class TargetLibraryInfo;
60 struct FunctionHandle final :
public CallbackVH {
67 void deleted()
override { removeSelfFromCache(); }
68 void allUsesReplacedWith(Value *)
override { removeSelfFromCache(); }
73 void removeSelfFromCache() {
76 Result->evict(*cast<Function>(Val));
83 const Optional<FunctionInfo> &ensureCached(
const Function &);
86 void scan(
const Function &);
89 FunctionInfo buildInfoFrom(
const Function &);
91 const TargetLibraryInfo &TLI;
98 DenseMap<const Function *, Optional<FunctionInfo>> Cache;
100 std::forward_list<FunctionHandle> Handles;
119 std::unique_ptr<CFLAndersAAResult> Result;
CFLAndersAAResult(const TargetLibraryInfo &)
void initializePass() override
initializePass - This method may be overriden by immutable passes to allow them to perform various in...
void evict(const Function &Fn)
Evict the given function from cache.
const cflaa::AliasSummary * getAliasSummary(const Function &)
Get the alias summary for the given function Return nullptr if the summary is not found or not availa...
A CRTP-driven "mixin" base class to help implement the function alias analysis results concept...
AliasSummary is just a collection of ExternalRelation and ExternalAttribute.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
AliasResult query(const MemoryLocation &, const MemoryLocation &)
A set of analyses that are preserved following a run of a transformation pass.
Value * getValPtr() const
A CRTP mix-in that provides informational APIs needed for analysis passes.
Legacy wrapper pass to provide the CFLAndersAAResult object.
AliasResult
The possible results of an alias query.
Represent the analysis usage information of a pass.
CFLAndersAAResult & getResult()
Analysis pass providing a never-invalidated alias analysis result.
const CFLAndersAAResult & getResult() const
Representation for a specific memory location.
ImmutablePass class - This class is used to provide information that does not need to be run...
Provides information about what library functions are available for the current target.
bool invalidate(Function &, const PreservedAnalyses &, FunctionAnalysisManager::Invalidator &)
Handle invalidation events from the new pass manager.
API to communicate dependencies between analyses during invalidation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
CFLAndersAAResult run(Function &F, FunctionAnalysisManager &AM)
Value handle with callbacks on RAUW and destruction.
A container for analyses that lazily runs them and caches their results.
AliasResult alias(const MemoryLocation &, const MemoryLocation &)
ImmutablePass * createCFLAndersAAWrapperPass()
A special type used by analysis passes to provide an address that identifies that particular analysis...