class LazyValueInfo

Declaration

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

Description

This pass computes, caches, and vends lazy value constraint information.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:31

Member Variables

private llvm::AssumptionCache* AC = nullptr
private const llvm::DataLayout* DL = nullptr
private class TargetLibraryInfo* TLI = nullptr
private void* PImpl = nullptr

Method Overview

  • private LazyValueInfo(const llvm::LazyValueInfo &)
  • public LazyValueInfo()
  • public LazyValueInfo(llvm::AssumptionCache * AC_, const llvm::DataLayout * DL_, llvm::TargetLibraryInfo * TLI_)
  • public LazyValueInfo(llvm::LazyValueInfo && Arg)
  • public void clear(const llvm::Module * M)
  • public void eraseBlock(llvm::BasicBlock * BB)
  • public llvm::Constant * getConstant(llvm::Value * V, llvm::Instruction * CxtI)
  • public llvm::Constant * getConstantOnEdge(llvm::Value * V, llvm::BasicBlock * FromBB, llvm::BasicBlock * ToBB, llvm::Instruction * CxtI = nullptr)
  • public llvm::ConstantRange getConstantRange(llvm::Value * V, llvm::Instruction * CxtI, bool UndefAllowed = true)
  • public llvm::ConstantRange getConstantRangeOnEdge(llvm::Value * V, llvm::BasicBlock * FromBB, llvm::BasicBlock * ToBB, llvm::Instruction * CxtI = nullptr)
  • public llvm::LazyValueInfo::Tristate getPredicateAt(unsigned int Pred, llvm::Value * V, llvm::Constant * C, llvm::Instruction * CxtI, bool UseBlockValue)
  • public llvm::LazyValueInfo::Tristate getPredicateAt(unsigned int Pred, llvm::Value * LHS, llvm::Value * RHS, llvm::Instruction * CxtI, bool UseBlockValue)
  • public llvm::LazyValueInfo::Tristate getPredicateOnEdge(unsigned int Pred, llvm::Value * V, llvm::Constant * C, llvm::BasicBlock * FromBB, llvm::BasicBlock * ToBB, llvm::Instruction * CxtI = nullptr)
  • public bool invalidate(llvm::Function & F, const llvm::PreservedAnalyses & PA, FunctionAnalysisManager::Invalidator & Inv)
  • public void printLVI(llvm::Function & F, llvm::DominatorTree & DTree, llvm::raw_ostream & OS)
  • public void releaseMemory()
  • public void threadEdge(llvm::BasicBlock * PredBB, llvm::BasicBlock * OldSucc, llvm::BasicBlock * NewSucc)
  • public ~LazyValueInfo()

Methods

LazyValueInfo(const llvm::LazyValueInfo&)

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:37

Parameters

const llvm::LazyValueInfo&

LazyValueInfo()

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:41

LazyValueInfo(llvm::AssumptionCache* AC_,
              const llvm::DataLayout* DL_,
              llvm::TargetLibraryInfo* TLI_)

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

Parameters

llvm::AssumptionCache* AC_
const llvm::DataLayout* DL_
llvm::TargetLibraryInfo* TLI_

LazyValueInfo(llvm::LazyValueInfo&& Arg)

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:45

Parameters

llvm::LazyValueInfo&& Arg

void clear(const llvm::Module* M)

Description

Complete flush all previously computed values

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:118

Parameters

const llvm::Module* M

void eraseBlock(llvm::BasicBlock* BB)

Description

Inform the analysis cache that we have erased a block.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:115

Parameters

llvm::BasicBlock* BB

llvm::Constant* getConstant(
    llvm::Value* V,
    llvm::Instruction* CxtI)

Description

Determine whether the specified value is known to be a constant at the specified instruction. Return null if not.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:90

Parameters

llvm::Value* V
llvm::Instruction* CxtI

llvm::Constant* getConstantOnEdge(
    llvm::Value* V,
    llvm::BasicBlock* FromBB,
    llvm::BasicBlock* ToBB,
    llvm::Instruction* CxtI = nullptr)

Description

Determine whether the specified value is known to be a constant on the specified edge. Return null if not.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:100

Parameters

llvm::Value* V
llvm::BasicBlock* FromBB
llvm::BasicBlock* ToBB
llvm::Instruction* CxtI = nullptr

llvm::ConstantRange getConstantRange(
    llvm::Value* V,
    llvm::Instruction* CxtI,
    bool UndefAllowed = true)

Description

Return the ConstantRange constraint that is known to hold for the specified value at the specified instruction. This may only be called on integer-typed Values.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:95

Parameters

llvm::Value* V
llvm::Instruction* CxtI
bool UndefAllowed = true

llvm::ConstantRange getConstantRangeOnEdge(
    llvm::Value* V,
    llvm::BasicBlock* FromBB,
    llvm::BasicBlock* ToBB,
    llvm::Instruction* CxtI = nullptr)

Description

Return the ConstantRage constraint that is known to hold for the specified value on the specified edge. This may be only be called on integer-typed Values.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:106

Parameters

llvm::Value* V
llvm::BasicBlock* FromBB
llvm::BasicBlock* ToBB
llvm::Instruction* CxtI = nullptr

llvm::LazyValueInfo::Tristate getPredicateAt(
    unsigned int Pred,
    llvm::Value* V,
    llvm::Constant* C,
    llvm::Instruction* CxtI,
    bool UseBlockValue)

Description

Determine whether the specified value comparison with a constant is known to be true or false at the specified instruction.\p Pred is a CmpInst predicate. If \p UseBlockValue is true, the block value is also taken into account.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:77

Parameters

unsigned int Pred
llvm::Value* V
llvm::Constant* C
llvm::Instruction* CxtI
bool UseBlockValue

llvm::LazyValueInfo::Tristate getPredicateAt(
    unsigned int Pred,
    llvm::Value* LHS,
    llvm::Value* RHS,
    llvm::Instruction* CxtI,
    bool UseBlockValue)

Description

Determine whether the specified value comparison is known to be true or false at the specified instruction. While this takes two Value's, it still requires that one of them is a constant.\p Pred is a CmpInst predicate. If \p UseBlockValue is true, the block value is also taken into account.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:85

Parameters

unsigned int Pred
llvm::Value* LHS
llvm::Value* RHS
llvm::Instruction* CxtI
bool UseBlockValue

llvm::LazyValueInfo::Tristate getPredicateOnEdge(
    unsigned int Pred,
    llvm::Value* V,
    llvm::Constant* C,
    llvm::BasicBlock* FromBB,
    llvm::BasicBlock* ToBB,
    llvm::Instruction* CxtI = nullptr)

Description

Determine whether the specified value comparison with a constant is known to be true or false on the specified CFG edge. Pred is a CmpInst predicate.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:69

Parameters

unsigned int Pred
llvm::Value* V
llvm::Constant* C
llvm::BasicBlock* FromBB
llvm::BasicBlock* ToBB
llvm::Instruction* CxtI = nullptr

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

Description

Handle invalidation events in the new pass manager.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:129

Parameters

llvm::Function& F
const llvm::PreservedAnalyses& PA
FunctionAnalysisManager::Invalidator& Inv

void printLVI(llvm::Function& F,
              llvm::DominatorTree& DTree,
              llvm::raw_ostream& OS)

Description

Print the \LazyValueInfoAnalysis. We pass in the DTree that is required for identifying which basic blocks we can solve/print for, in the LVIPrinter.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:123

Parameters

llvm::Function& F
llvm::DominatorTree& DTree
llvm::raw_ostream& OS

void releaseMemory()

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:126

void threadEdge(llvm::BasicBlock* PredBB,
                llvm::BasicBlock* OldSucc,
                llvm::BasicBlock* NewSucc)

Description

Inform the analysis cache that we have threaded an edge from PredBB to OldSucc to be from PredBB to NewSucc instead.

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:112

Parameters

llvm::BasicBlock* PredBB
llvm::BasicBlock* OldSucc
llvm::BasicBlock* NewSucc

~LazyValueInfo()

Declared at: llvm/include/llvm/Analysis/LazyValueInfo.h:40