85#ifndef LLVM_ANALYSIS_MEMORYSSA_H
86#define LLVM_ANALYSIS_MEMORYSSA_H
111struct AnalysisOptions;
134template <
class T>
class memoryaccess_def_iterator_base;
143 public ilist_node<MemoryAccess, ilist_tag<MSSAHelpers::AllAccessTag>>,
144 public ilist_node<MemoryAccess, ilist_tag<MSSAHelpers::DefsOnlyTag>> {
159 unsigned ID = V->getValueID();
160 return ID == MemoryUseVal || ID == MemoryPhiVal || ID == MemoryDefVal;
220 inline unsigned getID()
const;
287 MemoryInstruction(
MI) {
321 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
322 void operator delete(
void *Ptr) { User::operator
delete(Ptr, AllocMarker); }
331 OptimizedID = DMA->getID();
386 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
387 void operator delete(
void *Ptr) { User::operator
delete(Ptr, AllocMarker); }
395 OptimizedID = MA->
getID();
413 unsigned getID()
const {
return ID; }
484 void *
operator new(
size_t S) {
return User::operator
new(S, AllocMarker); }
487 void operator delete(
void *Ptr) { User::operator
delete(Ptr, AllocMarker); }
493 :
MemoryAccess(
C, MemoryPhiVal, deleteMe, BB, AllocMarker), ID(Ver),
494 ReservedSpace(NumPreds) {
535 assert(V &&
"PHI node got a null value!");
548 assert(
this == U.getUser() &&
"Iterator doesn't point to PHI's Uses?");
559 assert(BB &&
"PHI node got a null basic block!");
584 assert(Idx >= 0 &&
"Invalid basic block argument!");
591 assert(
I <
E &&
"Cannot remove out of bounds Phi entry.");
594 assert(
E >= 2 &&
"Cannot only remove incoming values in MemoryPhis with "
595 "at least 2 values.");
613 "Cannot remove all incoming blocks in a MemoryPhi.");
623 return V->getValueID() == MemoryPhiVal;
628 unsigned getID()
const {
return ID; }
643 unsigned ReservedSpace;
647 void growOperands() {
648 unsigned E = getNumOperands();
650 ReservedSpace = std::max(
E +
E / 2, 2u);
651 growHungoffUses(ReservedSpace,
true);
654 static void deleteMe(DerivedUser *Self);
659 "only memory defs and phis have ids");
667 return MD->isOptimized();
673 return MD->getOptimized();
679 MD->setOptimized(MA);
686 MD->resetOptimized();
735 return MA == LiveOnEntryDef.get();
739 return LiveOnEntryDef.get();
753 auto It = PerBlockAccesses.find(BB);
754 return It == PerBlockAccesses.end() ? nullptr : It->second.get();
760 auto It = PerBlockDefs.find(BB);
761 return It == PerBlockDefs.
end() ? nullptr : It->second.get();
781 verifyMemorySSA(VerificationLevel = VerificationLevel::Fast)
const;
792 LLVM_ABI void ensureOptimizedUses();
800 template <
typename IterT>
818 renamePass(DT->getNode(BB), IncomingVal, Visited,
true,
true);
826 AccessList::iterator);
830 bool CreationMustSucceed =
true);
833 class ClobberWalkerBase;
835 class SkipSelfWalker;
838 CachingWalker *getWalkerImpl();
839 template <
typename IterT>
848 void markUnreachableAsLiveOnEntry(
BasicBlock *BB);
850 template <
typename AliasAnalysisType>
858 bool SkipVisited =
false,
859 bool RenameAllUses =
false);
860 AccessList *getOrCreateAccessList(
const BasicBlock *);
861 DefsList *getOrCreateDefsList(
const BasicBlock *);
863 const AnalysisOptions &Opts;
878 AccessMap PerBlockAccesses;
879 DefsMap PerBlockDefs;
880 std::unique_ptr<MemoryAccess, ValueDeleter> LiveOnEntryDef;
889 std::unique_ptr<ClobberWalkerBase> WalkerBase;
890 std::unique_ptr<CachingWalker> Walker;
891 std::unique_ptr<SkipSelfWalker> SkipWalker;
893 bool IsOptimized =
false;
931 std::unique_ptr<MemorySSA>
MSSA;
934 FunctionAnalysisManager::Invalidator &Inv);
944 bool EnsureOptimizedUses;
948 : OS(OS), EnsureOptimizedUses(EnsureOptimizedUses) {}
983 void verifyAnalysis()
const override;
987 std::unique_ptr<MemorySSA> MSSA;
1033 assert(MA &&
"Handed an instruction that MemorySSA doesn't recognize?");
1106 std::forward_iterator_tag, T, ptrdiff_t, T *,
1108 using BaseT =
typename memoryaccess_def_iterator_base::iterator_facade_base;
1115 return Access ==
Other.Access && (!Access || ArgNo ==
Other.ArgNo);
1126 assert(MP &&
"Tried to get phi arg block when not iterating over a PHI");
1130 typename std::iterator_traits<BaseT>::pointer
operator*()
const {
1131 assert(Access &&
"Tried to access past the end of our iterator");
1135 return MP->getIncomingValue(ArgNo);
1139 using BaseT::operator++;
1141 assert(Access &&
"Hit end of iterator");
1143 if (++ArgNo >= MP->getNumIncomingValues()) {
1209 LHS.MayBeCrossIteration ==
RHS.MayBeCrossIteration;
1223 std::forward_iterator_tag,
1224 const UpwardDefsElem> {
1225 using BaseT = upward_defs_iterator::iterator_facade_base;
1229 : DefIterator(Elem.MA), Location(Elem.
Loc), OriginalAccess(Elem.MA),
1231 CurrentElem.MA =
nullptr;
1235 fillInCurrentElem();
1241 return DefIterator ==
Other.DefIterator;
1245 assert(DefIterator != OriginalAccess->defs_end() &&
1246 "Tried to access past the end of our iterator");
1250 using BaseT::operator++;
1252 assert(DefIterator != OriginalAccess->defs_end() &&
1253 "Tried to access past the end of the iterator");
1255 if (DefIterator != OriginalAccess->defs_end())
1256 fillInCurrentElem();
1266 LLVM_ABI bool IsGuaranteedLoopInvariant(
const Value *Ptr)
const;
1268 void fillInCurrentElem() {
1269 CurrentElem.
MA = *DefIterator;
1270 CurrentElem.
Loc = Location;
1278 const_cast<Value *
>(Location.Ptr),
1282 Translator.translateValue(OriginalAccess->
getBlock(),
1284 if (Addr != CurrentElem.
Loc.
Ptr)
1292 if (!IsGuaranteedLoopInvariant(CurrentElem.
Loc.
Ptr))
1304 UpwardDefsElem CurrentElem;
1306 MemoryLocation Location;
1307 MemoryAccess *OriginalAccess =
nullptr;
1308 DominatorTree *DT =
nullptr;
1309 bool WalkingPhi =
false;
1332template <
class T,
bool UseOptimizedChain = false>
1335 std::forward_iterator_tag, MemoryAccess *> {
1344 if (UseOptimizedChain && MUD->isOptimized())
1345 MA = MUD->getOptimized();
1347 MA = MUD->getDefiningAccess();
1364#ifdef EXPENSIVE_CHECKS
1366 "UpTo isn't in the def chain!");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file defines the DenseMap class.
early cse Early CSE w MemorySSA
static bool runOnFunction(Function &F, bool PostInlining)
static MemoryAccess * getClobberingMemoryAccess(MemorySSA &MSSA, BatchAAResults &BAA, SinkAndHoistLICMFlags &Flags, MemoryUseOrDef *MA)
This file provides utility analysis objects describing memory locations.
#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS)
Macro for generating out-of-class operand accessor definitions.
static bool dominates(InstrPosIndexes &PosIndexes, const MachineInstr &A, const MachineInstr &B)
This file defines the SmallPtrSet class.
This file defines the SmallVector class.
Represent the analysis usage information of a pass.
LLVM Basic Block Representation.
LLVM_ABI const DataLayout & getDataLayout() const
Get the data layout of the module this basic block belongs to.
This class is a wrapper over an AAResults, and it is intended to be used only when there are no IR ch...
Extension point for the Value hierarchy.
void(*)(DerivedUser *) DeleteValueTy
DerivedUser(Type *Ty, unsigned VK, AllocInfo AllocInfo, DeleteValueTy DeleteValue)
A MemorySSAWalker that does no alias queries, or anything else.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
This is an important class for using LLVM in a threaded context.
static constexpr LocationSize beforeOrAfterPointer()
Any location before or after the base pointer (but still within the underlying object).
Represents a single loop in the control flow graph.
LLVM_ABI void dump() const
AllAccessType::reverse_self_iterator getReverseIterator()
AllAccessType::const_self_iterator getIterator() const
MemoryAccess(const MemoryAccess &)=delete
static bool classof(const Value *V)
friend class MemoryUseOrDef
DefsOnlyType::const_self_iterator getDefsIterator() const
DefsOnlyType::self_iterator getDefsIterator()
DefsOnlyType::reverse_self_iterator getReverseDefsIterator()
ilist_node< MemoryAccess, ilist_tag< MSSAHelpers::AllAccessTag > > AllAccessType
DefsOnlyType::const_reverse_self_iterator getReverseDefsIterator() const
memoryaccess_def_iterator defs_end()
MemoryAccess(LLVMContext &C, unsigned Vty, DeleteValueTy DeleteValue, BasicBlock *BB, AllocInfo AllocInfo)
ilist_node< MemoryAccess, ilist_tag< MSSAHelpers::DefsOnlyTag > > DefsOnlyType
BasicBlock * getBlock() const
user_iterator iterator
The user iterators for a memory access.
AllAccessType::const_reverse_self_iterator getReverseIterator() const
LLVM_ABI void print(raw_ostream &OS) const
unsigned getID() const
Used for debugging and tracking things about MemoryAccesses.
MemoryAccess & operator=(const MemoryAccess &)=delete
void setBlock(BasicBlock *BB)
Used by MemorySSA to change the block of a MemoryAccess when it is moved.
const_user_iterator const_iterator
memoryaccess_def_iterator defs_begin()
This iterator walks over all of the defs in a given MemoryAccess.
AllAccessType::self_iterator getIterator()
Get the iterators for the all access list and the defs only list We default to the all access list.
Represents a read-write access to memory, whether it is a must-alias, or a may-alias.
static bool classof(const Value *MA)
MemoryAccess * getOptimized() const
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess)
MemoryDef(LLVMContext &C, MemoryAccess *DMA, Instruction *MI, BasicBlock *BB, unsigned Ver)
void setOptimized(MemoryAccess *MA)
Representation for a specific memory location.
MemoryLocation getWithNewSize(LocationSize NewSize) const
MemoryLocation getWithNewPtr(const Value *NewPtr) const
const Value * Ptr
The address of the start of the location.
Represents phi nodes for memory accesses.
void setIncomingBlock(unsigned I, BasicBlock *BB)
void allocHungoffUses(unsigned N)
this is more complicated than the generic User::allocHungoffUses, because we have to allocate Uses fo...
void setIncomingValue(unsigned I, MemoryAccess *V)
static bool classof(const Value *V)
const_block_iterator block_end() const
BasicBlock * getIncomingBlock(const Use &U) const
Return incoming basic block corresponding to an operand of the PHI.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess)
Provide fast operand accessors.
unsigned getNumIncomingValues() const
Return the number of incoming edges.
MemoryAccess * getIncomingValueForBlock(const BasicBlock *BB) const
block_iterator block_end()
const_block_iterator block_begin() const
iterator_range< block_iterator > blocks()
void unorderedDeleteIncomingIf(Fn &&Pred)
void unorderedDeleteIncoming(unsigned I)
BasicBlock * getIncomingBlock(unsigned I) const
Return incoming basic block number i.
const_op_range incoming_values() const
BasicBlock ** block_iterator
BasicBlock * getIncomingBlock(MemoryAccess::const_user_iterator I) const
Return incoming basic block corresponding to value use iterator.
static unsigned getIncomingValueNumForOperand(unsigned I)
void addIncoming(MemoryAccess *V, BasicBlock *BB)
Add an incoming value to the end of the PHI list.
op_range incoming_values()
void unorderedDeleteIncomingBlock(const BasicBlock *BB)
MemoryPhi(LLVMContext &C, BasicBlock *BB, unsigned Ver, unsigned NumPreds=0)
MemoryAccess * getIncomingValue(unsigned I) const
Return incoming value number x.
static unsigned getOperandNumForIncomingValue(unsigned I)
int getBasicBlockIndex(const BasicBlock *BB) const
Return the first index of the specified basic block in the value list for this PHI.
iterator_range< const_block_iterator > blocks() const
BasicBlock *const * const_block_iterator
block_iterator block_begin()
An analysis that produces MemorySSA for a function.
LLVM_ABI Result run(Function &F, FunctionAnalysisManager &AM)
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
MemorySSAPrinterPass(raw_ostream &OS, bool EnsureOptimizedUses)
static LLVM_ABI bool defClobbersUseOrDef(MemoryDef *MD, const MemoryUseOrDef *MU, AliasAnalysis &AA)
friend class MemorySSAWalker
MemorySSAWalkerPrinterPass(raw_ostream &OS)
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
This is the generic walker interface for walkers of MemorySSA.
SmallVector< MemoryAccess *, 8 > MemoryAccessSet
MemoryAccess * getClobberingMemoryAccess(const Instruction *I, BatchAAResults &AA)
Given a memory Mod/Ref/ModRef'ing instruction, calling this will give you the nearest dominating Memo...
LLVM_ABI MemorySSAWalker(MemorySSA *)
virtual ~MemorySSAWalker()=default
MemoryAccess * getClobberingMemoryAccess(MemoryAccess *MA, const MemoryLocation &Loc)
virtual void invalidateInfo(MemoryAccess *)
Given a memory access, invalidate anything this walker knows about that access.
virtual MemoryAccess * getClobberingMemoryAccess(MemoryAccess *, const MemoryLocation &, BatchAAResults &AA)=0
Given a potentially clobbering memory access and a new location, calling this will give you the neare...
virtual MemoryAccess * getClobberingMemoryAccess(MemoryAccess *, BatchAAResults &AA)=0
Does the same thing as getClobberingMemoryAccess(const Instruction *I), but takes a MemoryAccess inst...
MemoryAccess * getClobberingMemoryAccess(const Instruction *I)
MemoryAccess * getClobberingMemoryAccess(MemoryAccess *MA)
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
const MemorySSA & getMSSA() const
Encapsulates MemorySSA, including all data associated with memory accesses.
simple_ilist< MemoryAccess, ilist_tag< MSSAHelpers::DefsOnlyTag > > DefsList
LLVM_ABI void moveTo(MemoryUseOrDef *What, BasicBlock *BB, AccessList::iterator Where)
void renamePass(BasicBlock *BB, MemoryAccess *IncomingVal, SmallPtrSetImpl< BasicBlock * > &Visited)
DefsList * getBlockDefs(const BasicBlock *BB) const
Return the list of MemoryDef's and MemoryPhi's for a given basic block.
LLVM_ABI MemorySSAWalker * getSkipSelfWalker()
LLVM_ABI MemorySSA(Function &, AliasAnalysis *, DominatorTree *)
iplist< MemoryAccess, ilist_tag< MSSAHelpers::AllAccessTag > > AccessList
AccessList * getBlockAccesses(const BasicBlock *BB) const
Return the list of MemoryAccess's for a given basic block.
void verifyOrderingDominationAndDefUses(IterT Blocks, VerificationLevel=VerificationLevel::Fast) const
Verify ordering: the order and existence of MemoryAccesses matches the order and existence of memory ...
LLVM_ABI MemorySSAWalker * getWalker()
InsertionPlace
Used in various insertion functions to specify whether we are talking about the beginning or end of a...
MemorySSA(MemorySSA &&)=delete
DominatorTree & getDomTree() const
MemoryUseOrDef * getMemoryAccess(const Instruction *I) const
Given a memory Mod/Ref'ing instruction, get the MemorySSA access associated with it.
friend class MemorySSAUpdater
MemoryPhi * getMemoryAccess(const BasicBlock *BB) const
MemoryAccess * getLiveOnEntryDef() const
void verifyDominationNumbers(IterT Blocks) const
Verify that all of the blocks we believe to have valid domination numbers actually have valid dominat...
void verifyPrevDefInPhis(IterT Blocks) const
bool isLiveOnEntryDef(const MemoryAccess *MA) const
Return true if MA represents the live on entry value.
Class that has the common methods + fields of memory uses/defs.
MemoryUseOrDef(LLVMContext &C, MemoryAccess *DMA, unsigned Vty, DeleteValueTy DeleteValue, Instruction *MI, BasicBlock *BB, AllocInfo AllocInfo)
~MemoryUseOrDef()=default
MemoryAccess * getDefiningAccess() const
Get the access that produces the memory state used by this Use.
void resetOptimized()
Reset the ID of what this MemoryUse was optimized to, causing it to be rewalked by the walker if nece...
MemoryAccess * getOptimized() const
Return the MemoryAccess associated with the optimized use, or nullptr.
void setDefiningAccess(MemoryAccess *DMA, bool Optimized=false)
void setOptimized(MemoryAccess *)
Sets the optimized use for a MemoryDef.
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess)
Instruction * getMemoryInst() const
Get the instruction that this MemoryUse represents.
friend class MemorySSAUpdater
static bool classof(const Value *MA)
bool isOptimized() const
Do we have an optimized use?
Represents read-only accesses to memory.
MemoryAccess * getOptimized() const
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(MemoryAccess)
MemoryUse(LLVMContext &C, MemoryAccess *DMA, Instruction *MI, BasicBlock *BB)
LLVM_ABI void print(raw_ostream &OS) const
bool isOptimized() const
Whether the MemoryUse is optimized.
static bool classof(const Value *MA)
void setOptimized(MemoryAccess *DMA)
A Module instance is used to store all the information related to an LLVM module.
PHITransAddr - An address value which tracks and handles phi translation.
A set of analyses that are preserved following a run of a transformation pass.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
The instances of the Type class are immutable: once they are created, they are never changed.
A Use represents the edge between a Value definition and its users.
iterator_range< const_op_iterator > const_op_range
LLVM_ABI void allocHungoffUses(unsigned N, bool WithExtraValues=false)
Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User.
void setOperand(unsigned i, Value *Val)
void setNumHungOffUseOperands(unsigned NumOps)
Subclasses with hung off uses need to manage the operand count themselves.
iterator_range< op_iterator > op_range
Value * getOperand(unsigned i) const
unsigned getNumOperands() const
LLVM Value Representation.
user_iterator_impl< const User > const_user_iterator
unsigned getValueID() const
Return an ID for the concrete type of this object.
LLVM_ABI void deleteValue()
Delete a pointer to a generic Value.
user_iterator_impl< User > user_iterator
ilist_select_iterator_type< OptionsT, false, true > const_self_iterator
ilist_select_iterator_type< OptionsT, true, false > reverse_self_iterator
reverse_self_iterator getReverseIterator()
ilist_select_iterator_type< OptionsT, true, true > const_reverse_self_iterator
self_iterator getIterator()
ilist_select_iterator_type< OptionsT, false, false > self_iterator
typename base_list_type::iterator iterator
An intrusive list with ownership and callbacks specified/controlled by ilist_traits,...
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
A range adaptor for a pair of iterators.
Iterator base class used to implement const and non-const iterators over the defining accesses of a M...
memoryaccess_def_iterator_base()=default
BasicBlock * getPhiArgBlock() const
std::iterator_traits< BaseT >::pointer operator*() const
bool operator==(const memoryaccess_def_iterator_base &Other) const
memoryaccess_def_iterator_base(T *Start)
memoryaccess_def_iterator_base & operator++()
This class implements an extremely fast bulk output stream that can only output to a stream.
A simple intrusive list implementation.
Provide an iterator that walks defs, giving both the memory access, and the current pointer location,...
std::iterator_traits< BaseT >::reference operator*() const
upward_defs_iterator(const UpwardDefsElem &Elem, DominatorTree *DT)
BasicBlock * getPhiArgBlock() const
upward_defs_iterator & operator++()
bool operator==(const upward_defs_iterator &Other) const
This file defines the ilist_node class template, which is a convenient base class for creating classe...
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
Abstract Attribute helper functions.
This is an optimization pass for GlobalISel generic memory operations.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
auto find(R &&Range, const T &Val)
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly.
@ INVALID_MEMORYACCESS_ID
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
auto cast_or_null(const Y &Val)
DomTreeNodeBase< BasicBlock > DomTreeNode
iterator_range< def_chain_iterator< T > > def_chain(T MA, MemoryAccess *UpTo=nullptr)
LLVM_ABI bool VerifyMemorySSA
Enables verification of MemorySSA.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
iterator_range(Container &&) -> iterator_range< llvm::detail::IterOfRange< Container > >
upward_defs_iterator upward_defs_end()
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
memoryaccess_def_iterator_base< const MemoryAccess > const_memoryaccess_def_iterator
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
AAResults AliasAnalysis
Temporary typedef for legacy code that uses a generic AliasAnalysis pointer or reference.
upward_defs_iterator upward_defs_begin(const UpwardDefsElem &Pair, DominatorTree &DT)
memoryaccess_def_iterator_base< MemoryAccess > memoryaccess_def_iterator
iterator_range< def_chain_iterator< T, true > > optimized_def_chain(T MA)
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...
static unsigned getHashValue(const UpwardDefsElem &Val)
static bool isEqual(const UpwardDefsElem &LHS, const UpwardDefsElem &RHS)
An information struct used to provide DenseMap with the various necessary components for a given valu...
FixedNumOperandTraits - determine the allocation regime of the Use array when it is a prefix to the U...
static ChildIteratorType child_begin(NodeRef N)
MemoryAccess::iterator ChildIteratorType
static ChildIteratorType child_end(NodeRef N)
static NodeRef getEntryNode(NodeRef N)
static ChildIteratorType child_begin(NodeRef N)
static ChildIteratorType child_end(NodeRef N)
static NodeRef getEntryNode(NodeRef N)
memoryaccess_def_iterator ChildIteratorType
HungoffOperandTraits - determine the allocation regime of the Use array when it is not a prefix to th...
Result(std::unique_ptr< MemorySSA > &&MSSA)
LLVM_ABI bool invalidate(Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv)
std::unique_ptr< MemorySSA > MSSA
Verifier pass for MemorySSA.
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static unsigned operands(const MemoryUseOrDef *MUD)
static Use * op_end(MemoryUseOrDef *MUD)
static Use * op_begin(MemoryUseOrDef *MUD)
Compile-time customization of User operands.
A CRTP mix-in for passes that should not be skipped.
Information about how a User object was allocated, to be passed into the User constructor.
Indicates this User has operands "hung off" in another allocation.
Indicates this User has operands co-allocated.
Walks the defining accesses of MemoryDefs.
bool operator==(const def_chain_iterator &O) const
def_chain_iterator & operator++()
static void deleteNode(MemoryAccess *MA)
Use delete by default for iplist and ilist.