LLVM  6.0.0svn
Public Types | Public Member Functions | Friends | List of all members
llvm::LazyValueInfo Class Reference

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

#include "llvm/Analysis/LazyValueInfo.h"

Public Types

enum  Tristate { Unknown = -1, False = 0, True = 1 }
 This is used to return true/false/dunno results. More...
 

Public Member Functions

 ~LazyValueInfo ()
 
 LazyValueInfo ()
 
 LazyValueInfo (AssumptionCache *AC_, const DataLayout *DL_, TargetLibraryInfo *TLI_, DominatorTree *DT_)
 
 LazyValueInfo (LazyValueInfo &&Arg)
 
LazyValueInfooperator= (LazyValueInfo &&Arg)
 
Tristate getPredicateOnEdge (unsigned Pred, Value *V, Constant *C, BasicBlock *FromBB, BasicBlock *ToBB, Instruction *CxtI=nullptr)
 Determine whether the specified value comparison with a constant is known to be true or false on the specified CFG edge. More...
 
Tristate getPredicateAt (unsigned Pred, Value *V, Constant *C, Instruction *CxtI)
 Determine whether the specified value comparison with a constant is known to be true or false at the specified instruction (from an assume intrinsic). More...
 
ConstantgetConstant (Value *V, BasicBlock *BB, Instruction *CxtI=nullptr)
 Determine whether the specified value is known to be a constant at the end of the specified block. More...
 
ConstantRange getConstantRange (Value *V, BasicBlock *BB, Instruction *CxtI=nullptr)
 Return the ConstantRange constraint that is known to hold for the specified value at the end of the specified block. More...
 
ConstantgetConstantOnEdge (Value *V, BasicBlock *FromBB, BasicBlock *ToBB, Instruction *CxtI=nullptr)
 Determine whether the specified value is known to be a constant on the specified edge. More...
 
ConstantRange getConstantRangeOnEdge (Value *V, BasicBlock *FromBB, BasicBlock *ToBB, Instruction *CxtI=nullptr)
 Return the ConstantRage constraint that is known to hold for the specified value on the specified edge. More...
 
void threadEdge (BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc)
 Inform the analysis cache that we have threaded an edge from PredBB to OldSucc to be from PredBB to NewSucc instead. More...
 
void eraseBlock (BasicBlock *BB)
 Inform the analysis cache that we have erased a block. More...
 
void printLVI (Function &F, DominatorTree &DTree, raw_ostream &OS)
 Print the Analysis. More...
 
void releaseMemory ()
 
bool invalidate (Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv)
 Handle invalidation events in the new pass manager. More...
 

Friends

class LazyValueInfoWrapperPass
 

Detailed Description

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

Definition at line 32 of file LazyValueInfo.h.

Member Enumeration Documentation

◆ Tristate

This is used to return true/false/dunno results.

Enumerator
Unknown 
False 
True 

Definition at line 63 of file LazyValueInfo.h.

Constructor & Destructor Documentation

◆ ~LazyValueInfo()

LazyValueInfo::~LazyValueInfo ( )

Definition at line 1469 of file LazyValueInfo.cpp.

◆ LazyValueInfo() [1/3]

llvm::LazyValueInfo::LazyValueInfo ( )
inline

Definition at line 43 of file LazyValueInfo.h.

◆ LazyValueInfo() [2/3]

llvm::LazyValueInfo::LazyValueInfo ( AssumptionCache AC_,
const DataLayout DL_,
TargetLibraryInfo TLI_,
DominatorTree DT_ 
)
inline

Definition at line 44 of file LazyValueInfo.h.

◆ LazyValueInfo() [3/3]

llvm::LazyValueInfo::LazyValueInfo ( LazyValueInfo &&  Arg)
inline

Definition at line 47 of file LazyValueInfo.h.

References Arg.

Member Function Documentation

◆ eraseBlock()

void LazyValueInfo::eraseBlock ( BasicBlock BB)

Inform the analysis cache that we have erased a block.

Definition at line 1780 of file LazyValueInfo.cpp.

References llvm::Module::getDataLayout(), getImpl(), and llvm::BasicBlock::getModule().

Referenced by llvm::removeUnreachableBlocks().

◆ getConstant()

Constant * LazyValueInfo::getConstant ( Value V,
BasicBlock BB,
Instruction CxtI = nullptr 
)

◆ getConstantOnEdge()

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

◆ getConstantRange()

ConstantRange LazyValueInfo::getConstantRange ( Value V,
BasicBlock BB,
Instruction CxtI = nullptr 
)

◆ getConstantRangeOnEdge()

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

◆ getPredicateAt()

LazyValueInfo::Tristate LazyValueInfo::getPredicateAt ( unsigned  Pred,
Value V,
Constant C,
Instruction CxtI 
)

◆ getPredicateOnEdge()

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

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.

Definition at line 1661 of file LazyValueInfo.cpp.

References llvm::Module::getDataLayout(), getImpl(), llvm::BasicBlock::getModule(), and getPredicateResult().

Referenced by processPHI(), and processSwitch().

◆ invalidate()

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

Handle invalidation events in the new pass manager.

Definition at line 1479 of file LazyValueInfo.cpp.

References F(), llvm::PreservedAnalyses::getChecker(), and llvm::AnalysisManager< IRUnitT, ExtraArgTs >::Invalidator::invalidate().

◆ operator=()

LazyValueInfo& llvm::LazyValueInfo::operator= ( LazyValueInfo &&  Arg)
inline

Definition at line 51 of file LazyValueInfo.h.

References Arg, and releaseMemory().

◆ printLVI()

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

◆ releaseMemory()

void LazyValueInfo::releaseMemory ( )

◆ threadEdge()

void LazyValueInfo::threadEdge ( BasicBlock PredBB,
BasicBlock OldSucc,
BasicBlock NewSucc 
)

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

Definition at line 1772 of file LazyValueInfo.cpp.

References llvm::Module::getDataLayout(), getImpl(), and llvm::BasicBlock::getModule().

Friends And Related Function Documentation

◆ LazyValueInfoWrapperPass

friend class LazyValueInfoWrapperPass
friend

Definition at line 33 of file LazyValueInfo.h.


The documentation for this class was generated from the following files: