Skip to content

Commit 8319e22

Browse files
[NewPM] Remove MergedLoadStoreMotionLegacyPass (#72813)
This pass isn't used anywhere and thus isn't tested anywhere. Because of these reasons, remove it.
1 parent cd11a7f commit 8319e22

File tree

5 files changed

+0
-57
lines changed

5 files changed

+0
-57
lines changed

llvm/include/llvm/InitializePasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ void initializeMachineVerifierPassPass(PassRegistry&);
228228
void initializeMemoryDependenceWrapperPassPass(PassRegistry&);
229229
void initializeMemorySSAWrapperPassPass(PassRegistry&);
230230
void initializeMergeICmpsLegacyPassPass(PassRegistry &);
231-
void initializeMergedLoadStoreMotionLegacyPassPass(PassRegistry&);
232231
void initializeModuleSummaryIndexWrapperPassPass(PassRegistry&);
233232
void initializeModuloScheduleTestPass(PassRegistry&);
234233
void initializeNaryReassociateLegacyPassPass(PassRegistry&);

llvm/include/llvm/LinkAllPasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ namespace {
124124
(void) llvm::createConstantHoistingPass();
125125
(void) llvm::createCodeGenPreparePass();
126126
(void) llvm::createEarlyCSEPass();
127-
(void) llvm::createMergedLoadStoreMotionPass();
128127
(void) llvm::createGVNPass();
129128
(void) llvm::createPostDomTree();
130129
(void) llvm::createMergeICmpsLegacyPass();

llvm/include/llvm/Transforms/Scalar.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ FunctionPass *createTailCallEliminationPass();
147147
//
148148
FunctionPass *createEarlyCSEPass(bool UseMemorySSA = false);
149149

150-
//===----------------------------------------------------------------------===//
151-
//
152-
// MergedLoadStoreMotion - This pass merges loads and stores in diamonds. Loads
153-
// are hoisted into the header, while stores sink into the footer.
154-
//
155-
FunctionPass *createMergedLoadStoreMotionPass(bool SplitFooterBB = false);
156-
157150
//===----------------------------------------------------------------------===//
158151
//
159152
// ConstantHoisting - This pass prepares a function for expensive constants.

llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
#include "llvm/Analysis/GlobalsModRef.h"
8181
#include "llvm/IR/IRBuilder.h"
8282
#include "llvm/IR/Instructions.h"
83-
#include "llvm/InitializePasses.h"
8483
#include "llvm/Support/Debug.h"
8584
#include "llvm/Support/raw_ostream.h"
8685
#include "llvm/Transforms/Scalar.h"
@@ -378,52 +377,6 @@ bool MergedLoadStoreMotion::run(Function &F, AliasAnalysis &AA) {
378377
return Changed;
379378
}
380379

381-
namespace {
382-
class MergedLoadStoreMotionLegacyPass : public FunctionPass {
383-
const bool SplitFooterBB;
384-
public:
385-
static char ID; // Pass identification, replacement for typeid
386-
MergedLoadStoreMotionLegacyPass(bool SplitFooterBB = false)
387-
: FunctionPass(ID), SplitFooterBB(SplitFooterBB) {
388-
initializeMergedLoadStoreMotionLegacyPassPass(
389-
*PassRegistry::getPassRegistry());
390-
}
391-
392-
///
393-
/// Run the transformation for each function
394-
///
395-
bool runOnFunction(Function &F) override {
396-
if (skipFunction(F))
397-
return false;
398-
MergedLoadStoreMotion Impl(SplitFooterBB);
399-
return Impl.run(F, getAnalysis<AAResultsWrapperPass>().getAAResults());
400-
}
401-
402-
private:
403-
void getAnalysisUsage(AnalysisUsage &AU) const override {
404-
if (!SplitFooterBB)
405-
AU.setPreservesCFG();
406-
AU.addRequired<AAResultsWrapperPass>();
407-
AU.addPreserved<GlobalsAAWrapperPass>();
408-
}
409-
};
410-
411-
char MergedLoadStoreMotionLegacyPass::ID = 0;
412-
} // anonymous namespace
413-
414-
///
415-
/// createMergedLoadStoreMotionPass - The public interface to this file.
416-
///
417-
FunctionPass *llvm::createMergedLoadStoreMotionPass(bool SplitFooterBB) {
418-
return new MergedLoadStoreMotionLegacyPass(SplitFooterBB);
419-
}
420-
421-
INITIALIZE_PASS_BEGIN(MergedLoadStoreMotionLegacyPass, "mldst-motion",
422-
"MergedLoadStoreMotion", false, false)
423-
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
424-
INITIALIZE_PASS_END(MergedLoadStoreMotionLegacyPass, "mldst-motion",
425-
"MergedLoadStoreMotion", false, false)
426-
427380
PreservedAnalyses
428381
MergedLoadStoreMotionPass::run(Function &F, FunctionAnalysisManager &AM) {
429382
MergedLoadStoreMotion Impl(Options.SplitFooterBB);

llvm/lib/Transforms/Scalar/Scalar.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ void llvm::initializeScalarOpts(PassRegistry &Registry) {
4040
initializeLowerConstantIntrinsicsPass(Registry);
4141
initializeLowerWidenableConditionLegacyPassPass(Registry);
4242
initializeMergeICmpsLegacyPassPass(Registry);
43-
initializeMergedLoadStoreMotionLegacyPassPass(Registry);
4443
initializeNaryReassociateLegacyPassPass(Registry);
4544
initializePartiallyInlineLibCallsLegacyPassPass(Registry);
4645
initializeReassociateLegacyPassPass(Registry);

0 commit comments

Comments
 (0)