15 #ifndef LLVM_ANALYSIS_CFLSTEENSALIASANALYSIS_H
16 #define LLVM_ANALYSIS_CFLSTEENSALIASANALYSIS_H
26 #include <forward_list>
30 class TargetLibraryInfo;
77 if (isa<Constant>(LocA.
Ptr) && isa<Constant>(LocB.
Ptr))
88 struct FunctionHandle final :
public CallbackVH {
95 void deleted()
override { removeSelfFromCache(); }
96 void allUsesReplacedWith(Value *)
override { removeSelfFromCache(); }
101 void removeSelfFromCache() {
102 assert(Result !=
nullptr);
104 Result->evict(cast<Function>(Val));
109 const TargetLibraryInfo &TLI;
116 DenseMap<Function *, Optional<FunctionInfo>> Cache;
117 std::forward_list<FunctionHandle> Handles;
119 FunctionInfo buildSetsFrom(Function *
F);
138 std::unique_ptr<CFLSteensAAResult> Result;
The two locations precisely alias each other.
const cflaa::AliasSummary * getAliasSummary(Function &Fn)
Get the alias summary for the given function Return nullptr if the summary is not found or not availa...
bool invalidate(Function &, const PreservedAnalyses &, FunctionAnalysisManager::Invalidator &)
Handle invalidation events from the new pass manager.
The two locations alias, but only due to a partial overlap.
const Optional< FunctionInfo > & ensureCached(Function *Fn)
Ensures that the given function is available in the cache.
The two locations may or may not alias. This is the least precise result.
CFLSteensAAResult run(Function &F, FunctionAnalysisManager &AM)
A CRTP-driven "mixin" base class to help implement the function alias analysis results concept...
CFLSteensAAResult(const TargetLibraryInfo &)
AliasSummary is just a collection of ExternalRelation and ExternalAttribute.
Legacy wrapper pass to provide the CFLSteensAAResult object.
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
CFLSteensAAResult & getResult()
void scan(Function *Fn)
Inserts the given Function into the cache.
A set of analyses that are preserved following a run of a transformation pass.
void initializePass() override
initializePass - This method may be overriden by immutable passes to allow them to perform various in...
Value * getValPtr() const
Analysis pass providing a never-invalidated alias analysis result.
A CRTP mix-in that provides informational APIs needed for analysis passes.
AliasResult
The possible results of an alias query.
Represent the analysis usage information of a pass.
const CFLSteensAAResult & getResult() const
AliasResult query(const MemoryLocation &LocA, const MemoryLocation &LocB)
const Value * Ptr
The address of the start of the location.
Representation for a specific memory location.
ImmutablePass class - This class is used to provide information that does not need to be run...
Module.h This file contains the declarations for the Module class.
Provides information about what library functions are available for the current target.
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
Information we have about a function and would like to keep around.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
ImmutablePass * createCFLSteensAAWrapperPass()
API to communicate dependencies between analyses during invalidation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Value handle with callbacks on RAUW and destruction.
A container for analyses that lazily runs them and caches their results.
A special type used by analysis passes to provide an address that identifies that particular analysis...
uint64_t Size
The maximum size of the location, in address-units, or UnknownSize if the size is not known...