18#ifndef LLVM_ANALYSIS_ALIASSETTRACKER_H
19#define LLVM_ANALYSIS_ALIASSETTRACKER_H
59 std::vector<AssertingVH<Instruction>> UnknownInsts;
63 unsigned RefCount : 30;
67 unsigned AliasAny : 1;
76 SetMustAlias = 0, SetMayAlias = 1
83 void addRef() { ++RefCount; }
86 assert(RefCount >= 1 &&
"Invalid reference count detected!");
88 removeFromTracker(AST);
115 unsigned size()
const {
return MemoryLocs.size(); }
129 : RefCount(0), AliasAny(
false), Alias(SetMustAlias),
135 bool KnownMustAlias =
false);
161 PointerMapType PointerMap;
222 unsigned TotalAliasSetSize = 0;
236 void collapseForwardingIn(
AliasSet *&AS) {
238 collapseForwardingIn(AS->Forward);
247 AliasSet &addMemoryLocation(MemoryLocation Loc, ModRefInfo MR);
248 AliasSet *mergeAliasSetsForMemoryLocation(
const MemoryLocation &MemLoc,
256 AliasSet *findAliasSetForUnknownInst(Instruction *Inst);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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 ...
LLVM_ABI void addWithoutAATags(StoreInst *SI)
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
SmallVector< const Value *, 8 > PointerVector
Retrieve the pointer values for the memory locations in this alias set.
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
LLVM_ABI AliasSetsPrinterPass(raw_ostream &OS)
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...
LLVM Value Representation.
typename base_list_type::iterator iterator
typename base_list_type::const_iterator const_iterator
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...
Abstract Attribute helper functions.
This is an optimization pass for GlobalISel generic memory operations.
iplist< T, Options... > ilist
bool isModSet(const ModRefInfo MRI)
ModRefInfo
Flags indicating whether a memory access modifies or references memory.
@ NoModRef
The access neither references nor modifies the value stored in memory.
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
bool isRefSet(const ModRefInfo MRI)
A CRTP mix-in for passes that should not be skipped.