[llvm] [NewPM] Remove LazyValueInfoPrinter Pass (PR #73408)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 25 14:16:56 PST 2023
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/73408
This pass isn't used anywhere upstream and thus has no test coverage. For these reasons, remove it.
>From f95e083d9854d6fb10694a8973b0aa0e0a0d60eb 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 05122ea98d8ca52..9e9e0be5d0426c0 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -149,7 +149,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 1fa14b005d37609..b670aa7e53511a2 100644
--- a/llvm/lib/Analysis/Analysis.cpp
+++ b/llvm/lib/Analysis/Analysis.cpp
@@ -48,7 +48,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 5cb207c8036d40a..d4677b8ed444398 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -2086,37 +2086,3 @@ void LazyValueInfoAnnotatedWriter::emitInstructionAnnot(
printResult(UseI->getParent());
}
-
-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