14 #ifndef LLVM_ANALYSIS_BASICALIASANALYSIS_H 15 #define LLVM_ANALYSIS_BASICALIASANALYSIS_H 36 class AssumptionCache;
45 class TargetLibraryInfo;
67 :
AAResultBase(), DL(DL), TLI(TLI), AC(AC), DT(DT), LI(LI) {}
70 :
AAResultBase(Arg), DL(Arg.DL), TLI(Arg.TLI), AC(Arg.AC), DT(Arg.DT),
102 struct VariableGEPIndex {
116 return V == Other.V && ZExtBits == Other.ZExtBits &&
117 SExtBits == Other.SExtBits && Scale == Other.Scale;
120 bool operator!=(
const VariableGEPIndex &Other)
const {
127 struct DecomposedGEP {
131 int64_t StructOffset;
140 using LocPair = std::pair<MemoryLocation, MemoryLocation>;
165 unsigned &ZExtBits,
unsigned &SExtBits,
169 static bool DecomposeGEPExpression(
const Value *V, DecomposedGEP &Decomposed,
172 static bool isGEPBaseAtNegativeOffset(
const GEPOperator *GEPOp,
173 const DecomposedGEP &DecompGEP,
const DecomposedGEP &DecompObject,
174 uint64_t ObjectAccessSize);
186 uint64_t V1Size, uint64_t V2Size, int64_t BaseOffset,
189 bool isValueEqualInPotentialCycles(
const Value *V1,
const Value *
V2);
196 uint64_t V2Size,
const AAMDNodes &V2AAInfo,
197 const Value *UnderlyingV1,
const Value *UnderlyingV2);
201 uint64_t V2Size,
const AAMDNodes &V2AAInfo,
202 const Value *UnderV2);
206 uint64_t V2Size,
const AAMDNodes &V2AAInfo,
207 const Value *UnderV2);
211 const Value *O1 =
nullptr,
const Value *O2 =
nullptr);
228 std::unique_ptr<BasicAAResult> Result;
230 virtual void anchor();
270 #endif // LLVM_ANALYSIS_BASICALIASANALYSIS_H Pass interface - Implemented by all 'passes'.
bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv)
Handle invalidation events in the new pass manager.
const BasicAAResult & getResult() const
A parsed version of the target data layout string in and methods for querying it. ...
BasicAAResult(const DataLayout &DL, const TargetLibraryInfo &TLI, AssumptionCache &AC, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr)
Compute iterated dominance frontiers using a linear time algorithm.
BasicAAResult createLegacyPMBasicAAResult(Pass &P, Function &F)
A helper for the legacy pass manager to create a BasicAAResult object populated to the best of our ab...
void emplace(ArgTypes &&... Args)
Create a new object by constructing it in place with the given arguments.
A cache of .assume calls within a function.
This is the AA result object for the basic, local, and stateless alias analysis.
bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal)
Chases pointers until we find a (constant global) or not.
This class represents the LLVM 'select' instruction.
This class is a functor to be used in legacy module or SCC passes for computing AA results for a func...
AAResults createLegacyPMAAResults(Pass &P, Function &F, BasicAAResult &BAR)
A helper for the legacy pass manager to create a AAResults object populated to the best of our abilit...
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
A CRTP-driven "mixin" base class to help implement the function alias analysis results concept...
FunctionModRefBehavior
Summary of how a function affects memory in the program.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
AliasResult
The possible results of an alias query.
static bool runOnFunction(Function &F, bool PostInlining)
A set of analyses that are preserved following a run of a transformation pass.
AAResults & operator()(Function &F)
A CRTP mix-in that provides informational APIs needed for analysis passes.
FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS)
Returns the behavior when calling the given call site.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc)
Checks to see if the specified callsite can clobber the specified memory object.
Representation for a specific memory location.
BasicAAResult & getResult()
Provides information about what library functions are available for the current target.
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
Class for arbitrary precision integers.
FunctionPass * createBasicAAWrapperPass()
amdgpu Simplify well known AMD library false Value Value * Arg
Analysis pass providing a never-invalidated alias analysis result.
bool operator!=(uint64_t V1, const APInt &V2)
BasicAAResult(BasicAAResult &&Arg)
BasicAAResult(const BasicAAResult &Arg)
This file provides utility analysis objects describing memory locations.
Establish a view to a call site for examination.
API to communicate dependencies between analyses during invalidation.
LLVM Value Representation.
ModRefInfo getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx)
Get the location associated with a pointer argument of a callsite.
ModRefInfo
Flags indicating whether a memory access modifies or references memory.
A container for analyses that lazily runs them and caches their results.
bool operator==(uint64_t V1, const APInt &V2)
This header defines various interfaces for pass management in LLVM.
A special type used by analysis passes to provide an address that identifies that particular analysis...
Legacy wrapper pass to provide the BasicAAResult object.