LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::def_chain_iterator< T, UseOptimizedChain > Struct Template Reference

Walks the defining accesses of MemoryDefs. More...

#include "llvm/Analysis/MemorySSA.h"

Inheritance diagram for llvm::def_chain_iterator< T, UseOptimizedChain >:
Inheritance graph
[legend]
Collaboration diagram for llvm::def_chain_iterator< T, UseOptimizedChain >:
Collaboration graph
[legend]

Public Member Functions

 def_chain_iterator ()
 
 def_chain_iterator (T MA)
 
T operator* () const
 
def_chain_iteratoroperator++ ()
 
bool operator== (const def_chain_iterator &O) const
 
- Public Member Functions inherited from llvm::iterator_facade_base< def_chain_iterator< T, UseOptimizedChain >, std::forward_iterator_tag, MemoryAccess *>
def_chain_iterator< T, UseOptimizedChain > operator+ (std::ptrdiff_t n) const
 
def_chain_iterator< T, UseOptimizedChain > operator- (std::ptrdiff_t n) const
 
def_chain_iterator< T, UseOptimizedChain > & operator++ ()
 
def_chain_iterator< T, UseOptimizedChain > operator++ (int)
 
def_chain_iterator< T, UseOptimizedChain > & operator-- ()
 
def_chain_iterator< T, UseOptimizedChain > operator-- (int)
 
bool operator!= (const def_chain_iterator< T, UseOptimizedChain > &RHS) const
 
bool operator> (const def_chain_iterator< T, UseOptimizedChain > &RHS) const
 
bool operator<= (const def_chain_iterator< T, UseOptimizedChain > &RHS) const
 
bool operator>= (const def_chain_iterator< T, UseOptimizedChain > &RHS) const
 
MemoryAccess * * operator-> ()
 
MemoryAccess * * operator-> () const
 
ReferenceProxy operator[] (std::ptrdiff_t n)
 
ReferenceProxy operator[] (std::ptrdiff_t n) const
 

Additional Inherited Members

- Protected Types inherited from llvm::iterator_facade_base< def_chain_iterator< T, UseOptimizedChain >, std::forward_iterator_tag, MemoryAccess *>
enum  
 

Detailed Description

template<class T, bool UseOptimizedChain = false>
struct llvm::def_chain_iterator< T, UseOptimizedChain >

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.

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.

Definition at line 1156 of file MemorySSA.h.

Constructor & Destructor Documentation

◆ def_chain_iterator() [1/2]

template<class T , bool UseOptimizedChain = false>
llvm::def_chain_iterator< T, UseOptimizedChain >::def_chain_iterator ( )
inline

Definition at line 1159 of file MemorySSA.h.

◆ def_chain_iterator() [2/2]

template<class T , bool UseOptimizedChain = false>
llvm::def_chain_iterator< T, UseOptimizedChain >::def_chain_iterator ( T  MA)
inline

Definition at line 1160 of file MemorySSA.h.

Member Function Documentation

◆ operator*()

template<class T , bool UseOptimizedChain = false>
T llvm::def_chain_iterator< T, UseOptimizedChain >::operator* ( ) const
inline

Definition at line 1162 of file MemorySSA.h.

◆ operator++()

template<class T , bool UseOptimizedChain = false>
def_chain_iterator& llvm::def_chain_iterator< T, UseOptimizedChain >::operator++ ( )
inline

Definition at line 1164 of file MemorySSA.h.

◆ operator==()

template<class T , bool UseOptimizedChain = false>
bool llvm::def_chain_iterator< T, UseOptimizedChain >::operator== ( const def_chain_iterator< T, UseOptimizedChain > &  O) const
inline

Definition at line 1178 of file MemorySSA.h.


The documentation for this struct was generated from the following file: