class upward_defs_iterator

Declaration

class upward_defs_iterator : public iterator_facade_base { /* full declaration omitted */ };

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.

Declared at: llvm/include/llvm/Analysis/MemorySSA.h:1212

Inherits from: iterator_facade_base

Member Variables

private llvm::MemoryAccessPair CurrentPair
private llvm::memoryaccess_def_iterator DefIterator
private llvm::MemoryLocation Location
private llvm::MemoryAccess* OriginalAccess = nullptr
private llvm::DominatorTree* DT = nullptr
private bool WalkingPhi = false
private bool* PerformedPhiTranslation = nullptr

Method Overview

Methods

bool IsGuaranteedLoopInvariant(
    llvm::Value* Ptr) const

Description

Returns true if \p Ptr is guaranteed to be loop invariant for any possible loop. In particular, this guarantees that it only references a single MemoryLocation during execution of the containing function.

Declared at: llvm/include/llvm/Analysis/MemorySSA.h:1258

Parameters

llvm::Value* Ptr

void fillInCurrentPair()

Declared at: llvm/include/llvm/Analysis/MemorySSA.h:1260

llvm::BasicBlock* getPhiArgBlock() const

Declared at: llvm/include/llvm/Analysis/MemorySSA.h:1252

upward_defs_iterator(
    const llvm::MemoryAccessPair& Info,
    llvm::DominatorTree* DT,
    bool* PerformedPhiTranslation = nullptr)

Declared at: llvm/include/llvm/Analysis/MemorySSA.h:1219

Parameters

const llvm::MemoryAccessPair& Info
llvm::DominatorTree* DT
bool* PerformedPhiTranslation = nullptr

upward_defs_iterator()

Declared at: llvm/include/llvm/Analysis/MemorySSA.h:1230