[llvm] [NewPM] Remove LazyValueInfoPrinter Pass (PR #73408)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 14:51:37 PST 2023
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/73408
>From 29cd5cb3a3c8452bc68e03ca9a76d4250cc8b47a Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Sat, 25 Nov 2023 14:11:27 -0800
Subject: [PATCH] [NewPM] Remove LazyValueInfoPrinter Pass
This pass isn't used anywhere upstream and thus has no test coverage.
For these reasons, remove it.
---
llvm/include/llvm/InitializePasses.h | 1 -
llvm/lib/Analysis/Analysis.cpp | 1 -
llvm/lib/Analysis/LazyValueInfo.cpp | 34 ----------------------------
3 files changed, 36 deletions(-)
diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h
index 64644f5135394c4..66177f9b9f774f4 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -144,7 +144,6 @@ void initializeLCSSAWrapperPassPass(PassRegistry&);
void initializeLazyBlockFrequencyInfoPassPass(PassRegistry&);
void initializeLazyBranchProbabilityInfoPassPass(PassRegistry&);
void initializeLazyMachineBlockFrequencyInfoPassPass(PassRegistry&);
-void initializeLazyValueInfoPrinterPass(PassRegistry&);
void initializeLazyValueInfoWrapperPassPass(PassRegistry&);
void initializeLegacyLICMPassPass(PassRegistry&);
void initializeLegalizerPass(PassRegistry&);
diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp
index f70cc4a9fb29843..44d2ff18a694924 100644
--- a/llvm/lib/Analysis/Analysis.cpp
+++ b/llvm/lib/Analysis/Analysis.cpp
@@ -43,7 +43,6 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
initializeLazyBranchProbabilityInfoPassPass(Registry);
initializeLazyBlockFrequencyInfoPassPass(Registry);
initializeLazyValueInfoWrapperPassPass(Registry);
- initializeLazyValueInfoPrinterPass(Registry);
initializeLoopInfoWrapperPassPass(Registry);
initializeMemoryDependenceWrapperPassPass(Registry);
initializeModuleSummaryIndexWrapperPassPass(Registry);
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 868824285301a09..3c2f26e9242137b 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -2095,37 +2095,3 @@ PreservedAnalyses LazyValueInfoPrinterPass::run(Function &F,
LVI.printLVI(F, DTree, OS);
return PreservedAnalyses::all();
}
-
-namespace {
-// Printer class for LazyValueInfo results.
-class LazyValueInfoPrinter : public FunctionPass {
-public:
- static char ID; // Pass identification, replacement for typeid
- LazyValueInfoPrinter() : FunctionPass(ID) {
- initializeLazyValueInfoPrinterPass(*PassRegistry::getPassRegistry());
- }
-
- void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.setPreservesAll();
- AU.addRequired<LazyValueInfoWrapperPass>();
- AU.addRequired<DominatorTreeWrapperPass>();
- }
-
- // Get the mandatory dominator tree analysis and pass this in to the
- // LVIPrinter. We cannot rely on the LVI's DT, since it's optional.
- bool runOnFunction(Function &F) override {
- dbgs() << "LVI for function '" << F.getName() << "':\n";
- auto &LVI = getAnalysis<LazyValueInfoWrapperPass>().getLVI();
- auto &DTree = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
- LVI.printLVI(F, DTree, dbgs());
- return false;
- }
-};
-}
-
-char LazyValueInfoPrinter::ID = 0;
-INITIALIZE_PASS_BEGIN(LazyValueInfoPrinter, "print-lazy-value-info",
- "Lazy Value Info Printer Pass", false, false)
-INITIALIZE_PASS_DEPENDENCY(LazyValueInfoWrapperPass)
-INITIALIZE_PASS_END(LazyValueInfoPrinter, "print-lazy-value-info",
- "Lazy Value Info Printer Pass", false, false)
More information about the llvm-commits
mailing list