Skip to content

Commit 4671f18

Browse files
[NewPM] Remove LowerWidenableConditionLegacyPass (#72818)
This legacy pass isn't used anywhere upstream and thus has no test coverage, so remove it.
1 parent 72ab995 commit 4671f18

File tree

4 files changed

+0
-35
lines changed

4 files changed

+0
-35
lines changed

llvm/include/llvm/InitializePasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ void initializeLowerAtomicLegacyPassPass(PassRegistry&);
185185
void initializeLowerConstantIntrinsicsPass(PassRegistry&);
186186
void initializeLowerEmuTLSPass(PassRegistry&);
187187
void initializeLowerGlobalDtorsLegacyPassPass(PassRegistry &);
188-
void initializeLowerWidenableConditionLegacyPassPass(PassRegistry&);
189188
void initializeLowerIntrinsicsPass(PassRegistry&);
190189
void initializeLowerInvokeLegacyPassPass(PassRegistry&);
191190
void initializeLowerSwitchLegacyPassPass(PassRegistry &);

llvm/include/llvm/Transforms/Scalar.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ FunctionPass *createSinkingPass();
165165
//
166166
Pass *createLowerAtomicPass();
167167

168-
//===----------------------------------------------------------------------===//
169-
//
170-
// LowerWidenableCondition - Lower widenable condition to i1 true.
171-
//
172-
Pass *createLowerWidenableConditionPass();
173-
174168
//===----------------------------------------------------------------------===//
175169
//
176170
// MergeICmps - Merge integer comparison chains into a memcmp

llvm/lib/Transforms/Scalar/LowerWidenableCondition.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,10 @@
1919
#include "llvm/IR/Intrinsics.h"
2020
#include "llvm/IR/Module.h"
2121
#include "llvm/IR/PatternMatch.h"
22-
#include "llvm/InitializePasses.h"
23-
#include "llvm/Pass.h"
2422
#include "llvm/Transforms/Scalar.h"
2523

2624
using namespace llvm;
2725

28-
namespace {
29-
struct LowerWidenableConditionLegacyPass : public FunctionPass {
30-
static char ID;
31-
LowerWidenableConditionLegacyPass() : FunctionPass(ID) {
32-
initializeLowerWidenableConditionLegacyPassPass(
33-
*PassRegistry::getPassRegistry());
34-
}
35-
36-
bool runOnFunction(Function &F) override;
37-
};
38-
}
39-
4026
static bool lowerWidenableCondition(Function &F) {
4127
// Check if we can cheaply rule out the possibility of not having any work to
4228
// do.
@@ -65,19 +51,6 @@ static bool lowerWidenableCondition(Function &F) {
6551
return true;
6652
}
6753

68-
bool LowerWidenableConditionLegacyPass::runOnFunction(Function &F) {
69-
return lowerWidenableCondition(F);
70-
}
71-
72-
char LowerWidenableConditionLegacyPass::ID = 0;
73-
INITIALIZE_PASS(LowerWidenableConditionLegacyPass, "lower-widenable-condition",
74-
"Lower the widenable condition to default true value", false,
75-
false)
76-
77-
Pass *llvm::createLowerWidenableConditionPass() {
78-
return new LowerWidenableConditionLegacyPass();
79-
}
80-
8154
PreservedAnalyses LowerWidenableConditionPass::run(Function &F,
8255
FunctionAnalysisManager &AM) {
8356
if (lowerWidenableCondition(F))

llvm/lib/Transforms/Scalar/Scalar.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ void llvm::initializeScalarOpts(PassRegistry &Registry) {
3838
initializeLoopUnrollPass(Registry);
3939
initializeLowerAtomicLegacyPassPass(Registry);
4040
initializeLowerConstantIntrinsicsPass(Registry);
41-
initializeLowerWidenableConditionLegacyPassPass(Registry);
4241
initializeMergeICmpsLegacyPassPass(Registry);
4342
initializeNaryReassociateLegacyPassPass(Registry);
4443
initializePartiallyInlineLibCallsLegacyPassPass(Registry);

0 commit comments

Comments
 (0)