class PhiValues

Declaration

class PhiValues { /* full declaration omitted */ };

Description

Class for calculating and caching the underlying values of phis in a function. Initially the PhiValues is empty, and gets incrementally populated whenever it is queried.

Declared at: llvm/include/llvm/Analysis/PhiValues.h:42

Method Overview

  • public PhiValues(const llvm::Function & F)
  • public const llvm::PhiValues::ValueSet & getValuesForPhi(const llvm::PHINode * PN)
  • public bool invalidate(llvm::Function &, const llvm::PreservedAnalyses &, FunctionAnalysisManager::Invalidator &)
  • public void invalidateValue(const llvm::Value * V)
  • public void print(llvm::raw_ostream & OS) const
  • public void releaseMemory()

Methods

PhiValues(const llvm::Function& F)

Description

Construct an empty PhiValues.

Declared at: llvm/include/llvm/Analysis/PhiValues.h:47

Parameters

const llvm::Function& F

const llvm::PhiValues::ValueSet& getValuesForPhi(
    const llvm::PHINode* PN)

Description

Get the underlying values of a phi. This returns the cached value if PN has previously been processed, otherwise it processes it first.

Declared at: llvm/include/llvm/Analysis/PhiValues.h:53

Parameters

const llvm::PHINode* PN

bool invalidate(
    llvm::Function&,
    const llvm::PreservedAnalyses&,
    FunctionAnalysisManager::Invalidator&)

Description

Handle invalidation events in the new pass manager.

Declared at: llvm/include/llvm/Analysis/PhiValues.h:70

Parameters

llvm::Function&
const llvm::PreservedAnalyses&
FunctionAnalysisManager::Invalidator&

void invalidateValue(const llvm::Value* V)

Description

Notify PhiValues that the cached information using V is no longer valid Whenever a phi has its operands modified the cached values for that phi (and the phis that use that phi) become invalid. A user of PhiValues has to notify it of this by calling invalidateValue on either the operand or the phi, which will then clear the relevant cached information.

Declared at: llvm/include/llvm/Analysis/PhiValues.h:61

Parameters

const llvm::Value* V

void print(llvm::raw_ostream& OS) const

Description

Print out the values currently in the cache.

Declared at: llvm/include/llvm/Analysis/PhiValues.h:67

Parameters

llvm::raw_ostream& OS

void releaseMemory()

Description

Free the memory used by this class.

Declared at: llvm/include/llvm/Analysis/PhiValues.h:64