[llvm] [NewPM] Remove MakeGuardsExplicitLegacyPass (PR #72946)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 18:53:17 PST 2023
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/72946
This pass isn't used anywhere or tested anywhere upstream (it doesn't even have a create function), so remove it.
>From ae0a7d49400c3573b7d3df698a21a7e41d60dbc9 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Mon, 20 Nov 2023 18:51:53 -0800
Subject: [PATCH] [NewPM] Remove MakeGuardsExplicitLegacyPass
This pass isn't used anywhere or tested anywhere upstream (it doesn't
even have a create function), so remove it.
---
llvm/include/llvm/InitializePasses.h | 1 -
.../Transforms/Scalar/MakeGuardsExplicit.cpp | 20 -------------------
llvm/lib/Transforms/Scalar/Scalar.cpp | 1 -
3 files changed, 22 deletions(-)
diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h
index 2305db4f775d49c..a3e1124e9185414 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -114,7 +114,6 @@ void initializeExpandMemCmpPassPass(PassRegistry&);
void initializeExpandPostRAPass(PassRegistry&);
void initializeExpandReductionsPass(PassRegistry&);
void initializeExpandVectorPredicationPass(PassRegistry &);
-void initializeMakeGuardsExplicitLegacyPassPass(PassRegistry&);
void initializeExternalAAWrapperPassPass(PassRegistry&);
void initializeFEntryInserterPass(PassRegistry&);
void initializeFinalizeISelPass(PassRegistry&);
diff --git a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
index a3f09a5a33c3742..78e474f925b5419 100644
--- a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
+++ b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
@@ -42,17 +42,6 @@
using namespace llvm;
-namespace {
-struct MakeGuardsExplicitLegacyPass : public FunctionPass {
- static char ID;
- MakeGuardsExplicitLegacyPass() : FunctionPass(ID) {
- initializeMakeGuardsExplicitLegacyPassPass(*PassRegistry::getPassRegistry());
- }
-
- bool runOnFunction(Function &F) override;
-};
-}
-
static void turnToExplicitForm(CallInst *Guard, Function *DeoptIntrinsic) {
// Replace the guard with an explicit branch (just like in GuardWidening).
BasicBlock *OriginalBB = Guard->getParent();
@@ -89,15 +78,6 @@ static bool explicifyGuards(Function &F) {
return true;
}
-bool MakeGuardsExplicitLegacyPass::runOnFunction(Function &F) {
- return explicifyGuards(F);
-}
-
-char MakeGuardsExplicitLegacyPass::ID = 0;
-INITIALIZE_PASS(MakeGuardsExplicitLegacyPass, "make-guards-explicit",
- "Lower the guard intrinsic to explicit control flow form",
- false, false)
-
PreservedAnalyses MakeGuardsExplicitPass::run(Function &F,
FunctionAnalysisManager &) {
if (explicifyGuards(F))
diff --git a/llvm/lib/Transforms/Scalar/Scalar.cpp b/llvm/lib/Transforms/Scalar/Scalar.cpp
index 80db06b03a901b3..021ab454d28660c 100644
--- a/llvm/lib/Transforms/Scalar/Scalar.cpp
+++ b/llvm/lib/Transforms/Scalar/Scalar.cpp
@@ -25,7 +25,6 @@ void llvm::initializeScalarOpts(PassRegistry &Registry) {
initializeGVNLegacyPassPass(Registry);
initializeEarlyCSELegacyPassPass(Registry);
initializeEarlyCSEMemSSALegacyPassPass(Registry);
- initializeMakeGuardsExplicitLegacyPassPass(Registry);
initializeFlattenCFGLegacyPassPass(Registry);
initializeInferAddressSpacesPass(Registry);
initializeInstSimplifyLegacyPassPass(Registry);
More information about the llvm-commits
mailing list