Walks the defining accesses of MemoryDefs. Stops after we hit something that has no defining use (e.g. a MemoryPhi or liveOnEntry). Note that, when comparing against a null def_chain_iterator, this will compare equal only after walking said Phi/liveOnEntry.
Synopsis
Declared in <llvm/Analysis/MemorySSA.h>
template<
class T,
bool UseOptimizedChain = false>
struct def_chain_iterator
: iterator_facade_base<def_chain_iterator<T, UseOptimizedChain>, std::forward_iterator_tag, MemoryAccess*>
Description
The UseOptimizedChain flag specifies whether to walk the clobbering access chain, or all the accesses.
Normally, MemoryDef are all just def/use linked together, so a def_chain on a MemoryDef will walk all MemoryDefs above it in the program until it hits a phi node. The optimized chain walks the clobbering access of a store. So if you are just trying to find, given a store, what the next thing that would clobber the same memory is, you want the optimized chain.
Base Classes
Name |
Description |
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of the interface. |
Type Aliases
Name |
Description |
Signed type used to express the distance between iterators. |
|
Iterator category tag for this facade. |
|
Pointer type returned by the iterator. |
|
Reference type returned by the iterator. |
|
Value type produced by the iterator. |
Enums
Name |
Description |
Capability flags for the iterator category. |
Member Functions
Name |
Description |
|
Constructors |
Advance the iterator by |
|
Post‐increment the iterator and return the previous value. |
|
Retreat the iterator by |
|
Decrement operators |
|
Return a proxy pointer to the current element. |
|
Return a proxy to the element at offset |
|
Equality operator |
|
Return true if this iterator is less than or equal to |
|
Return true if this iterator is greater than |
|
Return true if this iterator is greater than or equal to |
Protected Types
Name |
Description |
Proxy that yields a pointer from a copied reference. |
|
Proxy that yields a reference from a copied iterator. |
Created with MrDocs