[llvm] 0cfa109 - [NewPM] Remove Delinearization legacy pass (#72942)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 00:57:41 PST 2023
Author: Aiden Grossman
Date: 2023-11-21T00:57:37-08:00
New Revision: 0cfa10955f716d58d7a223e2e39625674e703931
URL: https://github.com/llvm/llvm-project/commit/0cfa10955f716d58d7a223e2e39625674e703931
DIFF: https://github.com/llvm/llvm-project/commit/0cfa10955f716d58d7a223e2e39625674e703931.diff
LOG: [NewPM] Remove Delinearization legacy pass (#72942)
This pass isn't used/tested anywhere in upstream LLVM, so remove it.
Added:
Modified:
llvm/include/llvm/Analysis/Passes.h
llvm/include/llvm/InitializePasses.h
llvm/lib/Analysis/Analysis.cpp
llvm/lib/Analysis/Delinearization.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/Passes.h b/llvm/include/llvm/Analysis/Passes.h
index c0a3ad1da03cd9b..06077fd0d03e416 100644
--- a/llvm/include/llvm/Analysis/Passes.h
+++ b/llvm/include/llvm/Analysis/Passes.h
@@ -32,13 +32,6 @@ namespace llvm {
//
FunctionPass *createDependenceAnalysisWrapperPass();
- //===--------------------------------------------------------------------===//
- //
- // createDelinearizationPass - This pass implements attempts to restore
- // multidimensional array indices from linearized expressions.
- //
- FunctionPass *createDelinearizationPass();
-
//===--------------------------------------------------------------------===//
//
// createRegionInfoPass - This pass finds all single entry single exit regions
diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h
index 896ec849ae14dc0..05122ea98d8ca52 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -89,7 +89,6 @@ void initializeDAHPass(PassRegistry&);
void initializeDCELegacyPassPass(PassRegistry&);
void initializeDeadMachineInstructionElimPass(PassRegistry&);
void initializeDebugifyMachineModulePass(PassRegistry &);
-void initializeDelinearizationPass(PassRegistry&);
void initializeDependenceAnalysisWrapperPassPass(PassRegistry&);
void initializeDetectDeadLanesPass(PassRegistry&);
void initializeDomOnlyPrinterWrapperPassPass(PassRegistry &);
diff --git a/llvm/lib/Analysis/Analysis.cpp b/llvm/lib/Analysis/Analysis.cpp
index 86c7a4c6ad92a9f..1fa14b005d37609 100644
--- a/llvm/lib/Analysis/Analysis.cpp
+++ b/llvm/lib/Analysis/Analysis.cpp
@@ -31,7 +31,6 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
initializeCFGOnlyPrinterLegacyPassPass(Registry);
initializeCycleInfoWrapperPassPass(Registry);
initializeDependenceAnalysisWrapperPassPass(Registry);
- initializeDelinearizationPass(Registry);
initializeDominanceFrontierWrapperPassPass(Registry);
initializeDomViewerWrapperPassPass(Registry);
initializeDomPrinterWrapperPassPass(Registry);
diff --git a/llvm/lib/Analysis/Delinearization.cpp b/llvm/lib/Analysis/Delinearization.cpp
index 7ab91b9eaea4ed9..a45d8815e54ce9c 100644
--- a/llvm/lib/Analysis/Delinearization.cpp
+++ b/llvm/lib/Analysis/Delinearization.cpp
@@ -25,8 +25,6 @@
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PassManager.h"
-#include "llvm/InitializePasses.h"
-#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
@@ -561,24 +559,6 @@ bool llvm::tryDelinearizeFixedSizeImpl(
namespace {
-class Delinearization : public FunctionPass {
- Delinearization(const Delinearization &); // do not implement
-protected:
- Function *F;
- LoopInfo *LI;
- ScalarEvolution *SE;
-
-public:
- static char ID; // Pass identification, replacement for typeid
-
- Delinearization() : FunctionPass(ID) {
- initializeDelinearizationPass(*PassRegistry::getPassRegistry());
- }
- bool runOnFunction(Function &F) override;
- void getAnalysisUsage(AnalysisUsage &AU) const override;
- void print(raw_ostream &O, const Module *M = nullptr) const override;
-};
-
void printDelinearization(raw_ostream &O, Function *F, LoopInfo *LI,
ScalarEvolution *SE) {
O << "Delinearization on function " << F->getName() << ":\n";
@@ -631,32 +611,6 @@ void printDelinearization(raw_ostream &O, Function *F, LoopInfo *LI,
} // end anonymous namespace
-void Delinearization::getAnalysisUsage(AnalysisUsage &AU) const {
- AU.setPreservesAll();
- AU.addRequired<LoopInfoWrapperPass>();
- AU.addRequired<ScalarEvolutionWrapperPass>();
-}
-
-bool Delinearization::runOnFunction(Function &F) {
- this->F = &F;
- SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
- LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
- return false;
-}
-
-void Delinearization::print(raw_ostream &O, const Module *) const {
- printDelinearization(O, F, LI, SE);
-}
-
-char Delinearization::ID = 0;
-static const char delinearization_name[] = "Delinearization";
-INITIALIZE_PASS_BEGIN(Delinearization, DL_NAME, delinearization_name, true,
- true)
-INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
-INITIALIZE_PASS_END(Delinearization, DL_NAME, delinearization_name, true, true)
-
-FunctionPass *llvm::createDelinearizationPass() { return new Delinearization; }
-
DelinearizationPrinterPass::DelinearizationPrinterPass(raw_ostream &OS)
: OS(OS) {}
PreservedAnalyses DelinearizationPrinterPass::run(Function &F,
More information about the llvm-commits
mailing list