Iterator that walks defs with a phi‐translated memory location.

Synopsis

Declared in <llvm/Analysis/MemorySSA.h>

Description

Gives 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.

Base Classes

Name

Description

iterator_facade_base<upward_defs_iterator, std::forward_iterator_tag, UpwardDefsElem const>

CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of the interface.

Type Aliases

Name

Description

difference_type

Signed type used to express the distance between iterators.

iterator_category

Iterator category tag for this facade.

pointer

Pointer type returned by the iterator.

reference

Reference type returned by the iterator.

value_type

Value type produced by the iterator.

Enums

Name

Description

Unnamed enum

Capability flags for the iterator category.

Member Functions

Name

Description

upward_defs_iterator [constructor]

Constructors

getPhiArgBlock

Return the incoming basic block for the current MemoryPhi argument.

operator*

Return the current access and translated memory location.

operator+

Advance the iterator by n and return the result.

operator++

Increment operators

operator‐

Retreat the iterator by n and return the result.

operator‐‐

Decrement operators

operator‐>

Return a proxy pointer to the current element.

operator[]

Return a proxy to the element at offset n.

operator==

Return true if this iterator is at the same position as Other.

operator<=

Return true if this iterator is less than or equal to RHS.

operator>

Return true if this iterator is greater than RHS.

operator>=

Return true if this iterator is greater than or equal to RHS.

Using Declarations

Name

Description

operator++

Inherit the postfix increment from the facade base.

Protected Types

Name

Description

PointerProxy

Proxy that yields a pointer from a copied reference.

ReferenceProxy

Proxy that yields a reference from a copied iterator.

Non-Member Functions

Name

Description

operator+

Return an iterator n positions after i.

upward_defs

Return a range walking upward defs from Pair with phi translation.

upward_defs_begin

Return the begin iterator for an upward defs walk of Pair.

upward_defs_end

Return the end iterator for an upward defs walk.

Created with MrDocs