[llvm] 361034b - [NFC] Add LazyValueInfo::clear method
Dmitry Makogon via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 15 03:53:19 PDT 2022
Author: Dmitry Makogon
Date: 2022-03-15T17:52:50+07:00
New Revision: 361034ba781105c630b58660cfd70148747b9f61
URL: https://github.com/llvm/llvm-project/commit/361034ba781105c630b58660cfd70148747b9f61
DIFF: https://github.com/llvm/llvm-project/commit/361034ba781105c630b58660cfd70148747b9f61.diff
LOG: [NFC] Add LazyValueInfo::clear method
This method just calls LazyValueInfoImpl::clear
Added:
Modified:
llvm/include/llvm/Analysis/LazyValueInfo.h
llvm/lib/Analysis/LazyValueInfo.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/LazyValueInfo.h b/llvm/include/llvm/Analysis/LazyValueInfo.h
index 754391e106302..24c2bfcc74b9c 100644
--- a/llvm/include/llvm/Analysis/LazyValueInfo.h
+++ b/llvm/include/llvm/Analysis/LazyValueInfo.h
@@ -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.
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 0d0f186ddbfe4..d1593333763a9 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -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) {
More information about the llvm-commits
mailing list