13#ifndef LLVM_ANALYSIS_BASICALIASANALYSIS_H
14#define LLVM_ANALYSIS_BASICALIASANALYSIS_H
32class TargetLibraryInfo;
58 :
DL(
DL),
F(
F), TLI(TLI), AC(AC), DT_(DT) {}
65 AC(Arg.AC), DT_(Arg.DT_) {}
88 bool IgnoreLocals =
false);
101 struct DecomposedGEP;
118 bool constantOffsetHeuristic(
const DecomposedGEP &
GEP,
LocationSize V1Size,
122 bool isValueEqualInPotentialCycles(
const Value *V1,
const Value *V2,
125 void subtractDecomposedGEPs(DecomposedGEP &DestGEP,
126 const DecomposedGEP &SrcGEP,
131 const Value *UnderlyingV1,
const Value *UnderlyingV2,
165 std::unique_ptr<BasicAAResult> Result;
167 virtual void anchor();
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This header defines various interfaces for pass management in LLVM.
StandardInstrumentations SI(Mod->getContext(), Debug, VerifyEach)
This file defines the SmallPtrSet class.
This class stores info we want to provide to or retain within an alias query.
bool UseDominatorTree
Whether alias analysis is allowed to use the dominator tree, for use by passes that lazily update the...
A base class to help implement the function alias analysis results concept.
The possible results of an alias query.
API to communicate dependencies between analyses during invalidation.
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
A cache of @llvm.assume calls within a function.
This is the AA result object for the basic, local, and stateless alias analysis.
BasicAAResult(const DataLayout &DL, const Function &F, const TargetLibraryInfo &TLI, AssumptionCache &AC, DominatorTree *DT=nullptr)
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
Checks to see if the specified callsite can clobber the specified memory object.
ModRefInfo getArgModRefInfo(const CallBase *Call, unsigned ArgIdx)
Get the location associated with a pointer argument of a callsite.
BasicAAResult(BasicAAResult &&Arg)
MemoryEffects getMemoryEffects(const CallBase *Call, AAQueryInfo &AAQI)
Returns the behavior when calling the given call site.
BasicAAResult(const BasicAAResult &Arg)
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals=false)
Returns a bitmask that should be unconditionally applied to the ModRef info of a memory location.
bool invalidate(Function &Fn, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv)
Handle invalidation events in the new pass manager.
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *CtxI)
Legacy wrapper pass to provide the BasicAAResult object.
const BasicAAResult & getResult() const
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
BasicAAResult & getResult()
Analysis pass providing a never-invalidated alias analysis result.
BasicAAResult run(Function &F, FunctionAnalysisManager &AM)
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
A parsed version of the target data layout string in and methods for querying it.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
FunctionPass class - This class is used to implement most global optimizations.
Representation for a specific memory location.
A set of analyses that are preserved following a run of a transformation pass.
This class represents the LLVM 'select' instruction.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Provides information about what library functions are available for the current target.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
FunctionPass * createBasicAAWrapperPass()
ModRefInfo
Flags indicating whether a memory access modifies or references memory.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...