LLVM 20.0.0git
|
This class holds the mapping between values and value numbers. More...
#include "llvm/Transforms/Scalar/GVN.h"
Public Member Functions | |
ValueTable () | |
ValueTable (const ValueTable &Arg) | |
ValueTable (ValueTable &&Arg) | |
~ValueTable () | |
ValueTable & | operator= (const ValueTable &Arg) |
uint32_t | lookupOrAdd (Value *V) |
lookup_or_add - Returns the value number for the specified value, assigning it a new number if it did not have one before. | |
uint32_t | lookup (Value *V, bool Verify=true) const |
Returns the value number of the specified value. | |
uint32_t | lookupOrAddCmp (unsigned Opcode, CmpInst::Predicate Pred, Value *LHS, Value *RHS) |
Returns the value number of the given comparison, assigning it a new number if it did not have one before. | |
uint32_t | phiTranslate (const BasicBlock *BB, const BasicBlock *PhiBlock, uint32_t Num, GVNPass &Gvn) |
Wrap phiTranslateImpl to provide caching functionality. | |
void | eraseTranslateCacheEntry (uint32_t Num, const BasicBlock &CurrBlock) |
Erase stale entry from phiTranslate cache so phiTranslate can be computed again. | |
bool | exists (Value *V) const |
Returns true if a value number exists for the specified value. | |
void | add (Value *V, uint32_t num) |
add - Insert a value into the table with a specified value number. | |
void | clear () |
Remove all entries from the ValueTable. | |
void | erase (Value *v) |
Remove a value from the value numbering. | |
void | setAliasAnalysis (AAResults *A) |
AAResults * | getAliasAnalysis () const |
void | setMemDep (MemoryDependenceResults *M) |
void | setDomTree (DominatorTree *D) |
uint32_t | getNextUnusedValueNumber () |
void | verifyRemoved (const Value *) const |
verifyRemoved - Verify that the value is removed from all internal data structures. | |
This class holds the mapping between values and value numbers.
It is used as an efficient mechanism to determine the expression-wise equivalence of two values.
|
default |
|
default |
|
default |
|
default |
add - Insert a value into the table with a specified value number.
Definition at line 473 of file GVN.cpp.
References llvm::SmallVectorImpl< T >::insert().
void GVNPass::ValueTable::clear | ( | ) |
Remove all entries from the ValueTable.
void GVNPass::ValueTable::erase | ( | Value * | v | ) |
Remove a value from the value numbering.
Definition at line 722 of file GVN.cpp.
Referenced by llvm::GVNPass::markInstructionForDeletion().
void GVNPass::ValueTable::eraseTranslateCacheEntry | ( | uint32_t | Num, |
const BasicBlock & | CurrBlock | ||
) |
Erase stale entry from phiTranslate cache so phiTranslate can be computed again.
Definition at line 2349 of file GVN.cpp.
References llvm::predecessors().
|
inline |
Definition at line 218 of file GVN.h.
Referenced by llvm::GVNPass::getAliasAnalysis().
|
inline |
lookup_or_add - Returns the value number for the specified value, assigning it a new number if it did not have one before.
Definition at line 610 of file GVN.cpp.
References I.
Referenced by llvm::CallInfo::insert(), llvm::InsnInfo::insert(), llvm::LoadInfo::insert(), and llvm::StoreInfo::insert().
uint32_t GVNPass::ValueTable::lookupOrAddCmp | ( | unsigned | Opcode, |
CmpInst::Predicate | Predicate, | ||
Value * | LHS, | ||
Value * | RHS | ||
) |
|
default |
uint32_t GVNPass::ValueTable::phiTranslate | ( | const BasicBlock * | BB, |
const BasicBlock * | PhiBlock, | ||
uint32_t | Num, | ||
GVNPass & | Gvn | ||
) |
|
inline |
|
inline |
|
inline |