LLVM 20.0.0git
Public Member Functions | List of all members
llvm::upward_defs_iterator Class Reference

Provide an iterator that walks defs, giving both the memory access, and the current pointer location, updating the pointer location as it changes due to phi node translation. More...

#include "llvm/Analysis/MemorySSA.h"

Inheritance diagram for llvm::upward_defs_iterator:
Inheritance graph
[legend]

Public Member Functions

 upward_defs_iterator (const MemoryAccessPair &Info, DominatorTree *DT)
 
 upward_defs_iterator ()
 
bool operator== (const upward_defs_iterator &Other) const
 
std::iterator_traits< BaseT >::reference operator* () const
 
upward_defs_iteratoroperator++ ()
 
BasicBlockgetPhiArgBlock () const
 
- Public Member Functions inherited from llvm::iterator_facade_base< upward_defs_iterator, std::forward_iterator_tag, const MemoryAccessPair >
upward_defs_iterator operator+ (std::ptrdiff_t n) const
 
upward_defs_iterator operator- (std::ptrdiff_t n) const
 
upward_defs_iteratoroperator++ ()
 
upward_defs_iterator operator++ (int)
 
upward_defs_iteratoroperator-- ()
 
upward_defs_iterator operator-- (int)
 
bool operator!= (const upward_defs_iterator &RHS) const
 
bool operator> (const upward_defs_iterator &RHS) const
 
bool operator<= (const upward_defs_iterator &RHS) const
 
bool operator>= (const upward_defs_iterator &RHS) const
 
PointerProxy operator-> () const
 
ReferenceProxy operator[] (std::ptrdiff_t n) const
 

Additional Inherited Members

- Public Types inherited from llvm::iterator_facade_base< upward_defs_iterator, std::forward_iterator_tag, const MemoryAccessPair >
using iterator_category = std::forward_iterator_tag
 
using value_type = const MemoryAccessPair
 
using difference_type = std::ptrdiff_t
 
using pointer = const MemoryAccessPair *
 
using reference = const MemoryAccessPair &
 
- Protected Types inherited from llvm::iterator_facade_base< upward_defs_iterator, std::forward_iterator_tag, const MemoryAccessPair >
enum  
 

Detailed Description

Provide an iterator that walks defs, giving both the memory access, and the current pointer location, updating the pointer location as it changes due to phi node translation.

This iterator, while somewhat specialized, is what most clients actually want when walking upwards through MemorySSA def chains. It takes a pair of <MemoryAccess,MemoryLocation>, and walks defs, properly translating the memory location through phi nodes for the user.

Definition at line 1220 of file MemorySSA.h.

Constructor & Destructor Documentation

◆ upward_defs_iterator() [1/2]

llvm::upward_defs_iterator::upward_defs_iterator ( const MemoryAccessPair Info,
DominatorTree DT 
)
inline

Definition at line 1227 of file MemorySSA.h.

References Info.

◆ upward_defs_iterator() [2/2]

llvm::upward_defs_iterator::upward_defs_iterator ( )
inline

Definition at line 1236 of file MemorySSA.h.

Member Function Documentation

◆ getPhiArgBlock()

BasicBlock * llvm::upward_defs_iterator::getPhiArgBlock ( ) const
inline

◆ operator*()

std::iterator_traits< BaseT >::reference llvm::upward_defs_iterator::operator* ( ) const
inline

Definition at line 1242 of file MemorySSA.h.

References assert(), and llvm::MemoryAccess::defs_end().

◆ operator++()

upward_defs_iterator & llvm::upward_defs_iterator::operator++ ( )
inline

Definition at line 1249 of file MemorySSA.h.

References assert(), and llvm::MemoryAccess::defs_end().

◆ operator==()

bool llvm::upward_defs_iterator::operator== ( const upward_defs_iterator Other) const
inline

Definition at line 1238 of file MemorySSA.h.

References llvm::Other.


The documentation for this class was generated from the following files: