14 #ifndef LLVM_ANALYSIS_BASICALIASANALYSIS_H 15 #define LLVM_ANALYSIS_BASICALIASANALYSIS_H 36 class AssumptionCache;
45 class TargetLibraryInfo;
71 :
AAResultBase(), DL(DL), F(F), TLI(TLI), AC(AC), DT(DT), LI(LI), PV(PV)
75 :
AAResultBase(Arg), DL(Arg.DL), F(Arg.F), TLI(Arg.TLI), AC(Arg.AC),
76 DT(Arg.DT), LI(Arg.LI), PV(Arg.PV) {}
107 struct VariableGEPIndex {
121 return V == Other.V && ZExtBits == Other.ZExtBits &&
122 SExtBits == Other.SExtBits && Scale == Other.Scale;
125 bool operator!=(
const VariableGEPIndex &Other)
const {
132 struct DecomposedGEP {
145 using LocPair = std::pair<MemoryLocation, MemoryLocation>;
170 unsigned &ZExtBits,
unsigned &SExtBits,
174 static bool DecomposeGEPExpression(
const Value *V, DecomposedGEP &Decomposed,
177 static bool isGEPBaseAtNegativeOffset(
const GEPOperator *GEPOp,
178 const DecomposedGEP &DecompGEP,
const DecomposedGEP &DecompObject,
195 bool isValueEqualInPotentialCycles(
const Value *V1,
const Value *
V2);
203 const Value *UnderlyingV1,
const Value *UnderlyingV2);
208 const Value *UnderV2);
213 const Value *UnderV2);
218 const Value *O1 =
nullptr,
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'.
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...
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.
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.
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.
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...
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc)
Checks to see if the specified callsite can clobber the specified memory object.
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.
Class for calculating and caching the underlying values of phis in a function.
API to communicate dependencies between analyses during invalidation.
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.