13 #ifndef LLVM_ANALYSIS_BASICALIASANALYSIS_H 14 #define LLVM_ANALYSIS_BASICALIASANALYSIS_H 35 class AssumptionCache;
44 class TargetLibraryInfo;
70 :
AAResultBase(), DL(DL), F(F), TLI(TLI), AC(AC), DT(DT), LI(LI), PV(PV)
74 :
AAResultBase(Arg), DL(Arg.DL), F(Arg.F), TLI(Arg.TLI), AC(Arg.AC),
75 DT(Arg.DT), LI(Arg.LI), PV(Arg.PV) {}
110 struct VariableGEPIndex {
124 return V == Other.V && ZExtBits == Other.ZExtBits &&
125 SExtBits == Other.SExtBits && Scale == Other.Scale;
128 bool operator!=(
const VariableGEPIndex &Other)
const {
135 struct DecomposedGEP {
168 unsigned &ZExtBits,
unsigned &SExtBits,
172 static bool DecomposeGEPExpression(
const Value *V, DecomposedGEP &Decomposed,
175 static bool isGEPBaseAtNegativeOffset(
const GEPOperator *GEPOp,
176 const DecomposedGEP &DecompGEP,
const DecomposedGEP &DecompObject,
193 bool isValueEqualInPotentialCycles(
const Value *V1,
const Value *
V2);
201 const Value *UnderlyingV1,
const Value *UnderlyingV2,
218 const Value *O2 =
nullptr);
235 std::unique_ptr<BasicAAResult> Result;
237 virtual void anchor();
277 #endif // LLVM_ANALYSIS_BASICALIASANALYSIS_H Pass interface - Implemented by all 'passes'.
bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool OrLocal)
Chases pointers until we find a (constant global) or not.
const BasicAAResult & getResult() const
A parsed version of the target data layout string in and methods for querying it. ...
This class represents lattice values for constants.
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...
This class stores info we want to provide to or retain within an alias query.
void emplace(ArgTypes &&... Args)
Create a new object by constructing it in place with the given arguments.
A cache of @llvm.assume calls within a function.
This is the AA result object for the basic, local, and stateless alias analysis.
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
ModRefInfo getArgModRefInfo(const CallBase *Call, unsigned ArgIdx)
Get the location associated with a pointer argument of a callsite.
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...
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.
BasicAAResult(const DataLayout &DL, const Function &F, const TargetLibraryInfo &TLI, AssumptionCache &AC, DominatorTree *DT=nullptr, LoopInfo *LI=nullptr, PhiValues *PV=nullptr)
static bool runOnFunction(Function &F, bool PostInlining)
FunctionModRefBehavior getModRefBehavior(const CallBase *Call)
Returns the behavior when calling the given call site.
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.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
bool invalidate(Function &Fn, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv)
Handle invalidation events in the new pass manager.
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()
Analysis pass providing a never-invalidated alias analysis result.
bool operator!=(uint64_t V1, const APInt &V2)
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
Checks to see if the specified callsite can clobber the specified memory object.
BasicAAResult(BasicAAResult &&Arg)
BasicAAResult(const BasicAAResult &Arg)
This file provides utility analysis objects describing memory locations.
Class for calculating and caching the underlying values of phis in a function.
API to communicate dependencies between analyses during invalidation.
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI)
LLVM Value Representation.
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.