llvm::PHITransAddr

PHITransAddr - An address value which tracks and handles phi translation. As we walk "up" the CFG through predecessors, we need to ensure that the address we're tracking is kept up to date. For example, if we're analyzing an address of "&A[i]" and walk through the definition of 'i' which is a PHI node, we must phi translate i to get "&A[j]" or else we will analyze an incorrect pointer in the predecessor block.

Synopsis

Declared in <llvm/Analysis/PHITransAddr.h>

class PHITransAddr;

Description

This is designed to be a relatively small object that lives on the stack and is copyable.

Member Functions

NameDescription
PHITransAddr [constructor]Constructor
dump
getAddr
getSelectCondition If the address expression depends on a select instruction (possibly through casts or GEPs), return that select's condition. Otherwise return nullptr. This is used to drive translation of both sides of a select-dependent address (see the Cond overload of translateValue).
isPotentiallyPHITranslatable isPotentiallyPHITranslatable - If this needs PHI translation, return true if we have some hope of doing it. This should be used as a filter to avoid calling PHITranslateValue in hopeless situations.
needsPHITranslationFromBlock needsPHITranslationFromBlock - Return true if moving from the specified BasicBlock to its predecessors requires PHI translation.
translateValue translateValue overloads
translateWithInsertion translateWithInsertion - PHI translate this value into the specified predecessor block, inserting a computation of the value if it is unavailable.
verify verify - Check internal consistency of this data structure. If the structure is valid, it returns true. If invalid, it prints errors and returns false.