Skip to content

Commit

Permalink
[NFC] Add LazyValueInfo::clear method
Browse files Browse the repository at this point in the history
This method just calls LazyValueInfoImpl::clear
  • Loading branch information
d-makogon committed Mar 15, 2022
1 parent 126b37a commit 361034b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/include/llvm/Analysis/LazyValueInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ class LazyValueInfo {
/// Inform the analysis cache that we have erased a block.
void eraseBlock(BasicBlock *BB);

/// Complete flush all previously computed values
void clear(const Module *M);

/// Print the \LazyValueInfo Analysis.
/// We pass in the DTree that is required for identifying which basic blocks
/// we can solve/print for, in the LVIPrinter.
Expand Down
5 changes: 5 additions & 0 deletions llvm/lib/Analysis/LazyValueInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1885,6 +1885,11 @@ void LazyValueInfo::eraseBlock(BasicBlock *BB) {
}
}

void LazyValueInfo::clear(const Module *M) {
if (PImpl) {
getImpl(PImpl, AC, M).clear();
}
}

void LazyValueInfo::printLVI(Function &F, DominatorTree &DTree, raw_ostream &OS) {
if (PImpl) {
Expand Down

0 comments on commit 361034b

Please sign in to comment.