18#ifndef LLVM_ANALYSIS_ALIASSETTRACKER_H
19#define LLVM_ANALYSIS_ALIASSETTRACKER_H
37class AnyMemTransferInst;
59 std::vector<AssertingVH<Instruction>> UnknownInsts;
63 unsigned RefCount : 27;
67 unsigned AliasAny : 1;
79 ModRefAccess = RefAccess | ModAccess
90 SetMustAlias = 0, SetMayAlias = 1
94 void addRef() { ++RefCount; }
97 assert(RefCount >= 1 &&
"Invalid reference count detected!");
99 removeFromTracker(AST);
126 unsigned size()
const {
return MemoryLocs.
size(); }
140 : RefCount(0), AliasAny(
false),
Access(NoAccess), Alias(SetMustAlias) {}
145 bool KnownMustAlias =
false);
231 unsigned TotalAliasSetSize = 0;
245 void collapseForwardingIn(
AliasSet *&AS) {
247 collapseForwardingIn(AS->Forward);
256 AliasSet &addMemoryLocation(MemoryLocation Loc, AliasSet::AccessLattice
E);
257 AliasSet *mergeAliasSetsForMemoryLocation(
const MemoryLocation &MemLoc,
265 AliasSet *findAliasSetForUnknownInst(Instruction *Inst);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the DenseMap class.
This header defines various interfaces for pass management in LLVM.
This file provides utility analysis objects describing memory locations.
This file defines the SmallVector class.
The possible results of an alias query.
ilist< AliasSet >::iterator iterator
LLVM_ABI void dump() const
const ilist< AliasSet > & getAliasSets() const
Return the alias sets that are active.
BatchAAResults & getAliasAnalysis() const
Return the underlying alias analysis object used by this tracker.
LLVM_ABI AliasSet & getAliasSetFor(const MemoryLocation &MemLoc)
Return the alias set which contains the specified memory location.
LLVM_ABI void addUnknown(Instruction *I)
AliasSetTracker(BatchAAResults &AA)
Create an empty collection of AliasSets, and use the specified alias analysis object to disambiguate ...
const_iterator end() const
ilist< AliasSet >::const_iterator const_iterator
const_iterator begin() const
LLVM_ABI void print(raw_ostream &OS) const
LLVM_ABI void add(const MemoryLocation &Loc)
These methods are used to add different types of instructions to the alias sets.
LLVM_ABI void mergeSetIn(AliasSet &AS, AliasSetTracker &AST, BatchAAResults &BatchAA)
Merge the specified alias set into this alias set.
LLVM_ABI void print(raw_ostream &OS) const
AliasSet(const AliasSet &)=delete
bool isForwardingAliasSet() const
Return true if this alias set should be ignored as part of the AliasSetTracker object.
AliasSet & operator=(const AliasSet &)=delete
LLVM_ABI ModRefInfo aliasesUnknownInst(const Instruction *Inst, BatchAAResults &AA) const
LLVM_ABI AliasResult aliasesMemoryLocation(const MemoryLocation &MemLoc, BatchAAResults &AA) const
If the specified memory location "may" (or must) alias one of the members in the set return the appro...
friend class AliasSetTracker
SmallVectorImpl< MemoryLocation >::const_iterator iterator
bool isRef() const
Accessors...
LLVM_ABI PointerVector getPointers() const
LLVM_ABI void dump() const
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
A container for analyses that lazily runs them and caches their results.
This class represents any memset intrinsic.
LLVM Basic Block Representation.
This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR ch...
An instruction for reading from memory.
Representation for a specific memory location.
A set of analyses that are preserved following a run of a transformation pass.
typename SuperClass::const_iterator const_iterator
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
An instruction for storing to memory.
This class represents the va_arg llvm instruction, which returns an argument of the specified type gi...
base_list_type::const_iterator const_iterator
base_list_type::iterator iterator
An intrusive list with ownership and callbacks specified/controlled by ilist_traits,...
This class implements an extremely fast bulk output stream that can only output to a stream.
This file defines classes to implement an intrusive doubly linked list class (i.e.
This file defines the ilist_node class template, which is a convenient base class for creating classe...
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
ModRefInfo
Flags indicating whether a memory access modifies or references memory.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
A CRTP mix-in to automatically provide informational APIs needed for passes.