[llvm] a403d75 - [LegacyPM] Remove LowerGuardIntrinsicLegacyPass
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 8 08:37:42 PDT 2023
Author: Kazu Hirata
Date: 2023-08-08T08:37:35-07:00
New Revision: a403d75be7add73f3e34032d73c81b8e1dcba3b9
URL: https://github.com/llvm/llvm-project/commit/a403d75be7add73f3e34032d73c81b8e1dcba3b9
DIFF: https://github.com/llvm/llvm-project/commit/a403d75be7add73f3e34032d73c81b8e1dcba3b9.diff
LOG: [LegacyPM] Remove LowerGuardIntrinsicLegacyPass
Differential Revision: https://reviews.llvm.org/D157073
Added:
Modified:
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/Scalar.h
llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp
llvm/lib/Transforms/Scalar/Scalar.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h
index c6fee47b464b95..d5e4ac835b3414 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -189,7 +189,6 @@ void initializeLowerConstantIntrinsicsPass(PassRegistry&);
void initializeLowerEmuTLSPass(PassRegistry&);
void initializeLowerExpectIntrinsicPass(PassRegistry&);
void initializeLowerGlobalDtorsLegacyPassPass(PassRegistry &);
-void initializeLowerGuardIntrinsicLegacyPassPass(PassRegistry&);
void initializeLowerWidenableConditionLegacyPassPass(PassRegistry&);
void initializeLowerIntrinsicsPass(PassRegistry&);
void initializeLowerInvokeLegacyPassPass(PassRegistry&);
diff --git a/llvm/include/llvm/Transforms/Scalar.h b/llvm/include/llvm/Transforms/Scalar.h
index aaba710cfde61c..2af6ca8e471493 100644
--- a/llvm/include/llvm/Transforms/Scalar.h
+++ b/llvm/include/llvm/Transforms/Scalar.h
@@ -195,12 +195,6 @@ FunctionPass *createSinkingPass();
//
Pass *createLowerAtomicPass();
-//===----------------------------------------------------------------------===//
-//
-// LowerGuardIntrinsic - Lower guard intrinsics to normal control flow.
-//
-Pass *createLowerGuardIntrinsicPass();
-
//===----------------------------------------------------------------------===//
//
// LowerWidenableCondition - Lower widenable condition to i1 true.
diff --git a/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp b/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp
index 8dc037b10cc8bc..3d82c475382f66 100644
--- a/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp
@@ -27,18 +27,6 @@
using namespace llvm;
-namespace {
-struct LowerGuardIntrinsicLegacyPass : public FunctionPass {
- static char ID;
- LowerGuardIntrinsicLegacyPass() : FunctionPass(ID) {
- initializeLowerGuardIntrinsicLegacyPassPass(
- *PassRegistry::getPassRegistry());
- }
-
- bool runOnFunction(Function &F) override;
-};
-}
-
static bool lowerGuardIntrinsic(Function &F) {
// Check if we can cheaply rule out the possibility of not having any work to
// do.
@@ -71,19 +59,6 @@ static bool lowerGuardIntrinsic(Function &F) {
return true;
}
-bool LowerGuardIntrinsicLegacyPass::runOnFunction(Function &F) {
- return lowerGuardIntrinsic(F);
-}
-
-char LowerGuardIntrinsicLegacyPass::ID = 0;
-INITIALIZE_PASS(LowerGuardIntrinsicLegacyPass, "lower-guard-intrinsic",
- "Lower the guard intrinsic to normal control flow", false,
- false)
-
-Pass *llvm::createLowerGuardIntrinsicPass() {
- return new LowerGuardIntrinsicLegacyPass();
-}
-
PreservedAnalyses LowerGuardIntrinsicPass::run(Function &F,
FunctionAnalysisManager &AM) {
if (lowerGuardIntrinsic(F))
diff --git a/llvm/lib/Transforms/Scalar/Scalar.cpp b/llvm/lib/Transforms/Scalar/Scalar.cpp
index 37b032e4d7c7e1..4ec249e7497c09 100644
--- a/llvm/lib/Transforms/Scalar/Scalar.cpp
+++ b/llvm/lib/Transforms/Scalar/Scalar.cpp
@@ -42,7 +42,6 @@ void llvm::initializeScalarOpts(PassRegistry &Registry) {
initializeLowerAtomicLegacyPassPass(Registry);
initializeLowerConstantIntrinsicsPass(Registry);
initializeLowerExpectIntrinsicPass(Registry);
- initializeLowerGuardIntrinsicLegacyPassPass(Registry);
initializeLowerWidenableConditionLegacyPassPass(Registry);
initializeMergeICmpsLegacyPassPass(Registry);
initializeMergedLoadStoreMotionLegacyPassPass(Registry);
More information about the llvm-commits
mailing list