Skip to content

Commit c1eb3db

Browse files
committed
[LoopFuse] Remove legacy pass
Following recent changes to remove non-core legacy passes.
1 parent 30d542f commit c1eb3db

File tree

4 files changed

+0
-69
lines changed

4 files changed

+0
-69
lines changed

llvm/include/llvm/InitializePasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ void initializeLoopDataPrefetchLegacyPassPass(PassRegistry&);
209209
void initializeLoopDeletionLegacyPassPass(PassRegistry&);
210210
void initializeLoopExtractorLegacyPassPass(PassRegistry &);
211211
void initializeLoopGuardWideningLegacyPassPass(PassRegistry&);
212-
void initializeLoopFuseLegacyPass(PassRegistry&);
213212
void initializeLoopIdiomRecognizeLegacyPassPass(PassRegistry&);
214213
void initializeLoopInfoWrapperPassPass(PassRegistry&);
215214
void initializeLoopInstSimplifyLegacyPassPass(PassRegistry&);

llvm/include/llvm/Transforms/Scalar.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,12 +466,6 @@ FunctionPass *createFloat2IntPass();
466466
//
467467
FunctionPass *createNaryReassociatePass();
468468

469-
//===----------------------------------------------------------------------===//
470-
//
471-
// LoopFuse - Fuse loops.
472-
//
473-
FunctionPass *createLoopFusePass();
474-
475469
//===----------------------------------------------------------------------===//
476470
//
477471
// LoopDataPrefetch - Perform data prefetching in loops.

llvm/lib/Transforms/Scalar/LoopFuse.cpp

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,51 +2061,6 @@ struct LoopFuser {
20612061
return FC0.L;
20622062
}
20632063
};
2064-
2065-
struct LoopFuseLegacy : public FunctionPass {
2066-
2067-
static char ID;
2068-
2069-
LoopFuseLegacy() : FunctionPass(ID) {
2070-
initializeLoopFuseLegacyPass(*PassRegistry::getPassRegistry());
2071-
}
2072-
2073-
void getAnalysisUsage(AnalysisUsage &AU) const override {
2074-
AU.addRequiredID(LoopSimplifyID);
2075-
AU.addRequired<ScalarEvolutionWrapperPass>();
2076-
AU.addRequired<LoopInfoWrapperPass>();
2077-
AU.addRequired<DominatorTreeWrapperPass>();
2078-
AU.addRequired<PostDominatorTreeWrapperPass>();
2079-
AU.addRequired<OptimizationRemarkEmitterWrapperPass>();
2080-
AU.addRequired<DependenceAnalysisWrapperPass>();
2081-
AU.addRequired<AssumptionCacheTracker>();
2082-
AU.addRequired<TargetTransformInfoWrapperPass>();
2083-
2084-
AU.addPreserved<ScalarEvolutionWrapperPass>();
2085-
AU.addPreserved<LoopInfoWrapperPass>();
2086-
AU.addPreserved<DominatorTreeWrapperPass>();
2087-
AU.addPreserved<PostDominatorTreeWrapperPass>();
2088-
}
2089-
2090-
bool runOnFunction(Function &F) override {
2091-
if (skipFunction(F))
2092-
return false;
2093-
2094-
auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
2095-
auto &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
2096-
auto &DI = getAnalysis<DependenceAnalysisWrapperPass>().getDI();
2097-
auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE();
2098-
auto &PDT = getAnalysis<PostDominatorTreeWrapperPass>().getPostDomTree();
2099-
auto &ORE = getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE();
2100-
auto &AC = getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
2101-
const TargetTransformInfo &TTI =
2102-
getAnalysis<TargetTransformInfoWrapperPass>().getTTI(F);
2103-
const DataLayout &DL = F.getParent()->getDataLayout();
2104-
2105-
LoopFuser LF(LI, DT, DI, SE, PDT, ORE, DL, AC, TTI);
2106-
return LF.fuseLoops(F);
2107-
}
2108-
};
21092064
} // namespace
21102065

21112066
PreservedAnalyses LoopFusePass::run(Function &F, FunctionAnalysisManager &AM) {
@@ -2142,19 +2097,3 @@ PreservedAnalyses LoopFusePass::run(Function &F, FunctionAnalysisManager &AM) {
21422097
PA.preserve<LoopAnalysis>();
21432098
return PA;
21442099
}
2145-
2146-
char LoopFuseLegacy::ID = 0;
2147-
2148-
INITIALIZE_PASS_BEGIN(LoopFuseLegacy, "loop-fusion", "Loop Fusion", false,
2149-
false)
2150-
INITIALIZE_PASS_DEPENDENCY(PostDominatorTreeWrapperPass)
2151-
INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass)
2152-
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
2153-
INITIALIZE_PASS_DEPENDENCY(DependenceAnalysisWrapperPass)
2154-
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
2155-
INITIALIZE_PASS_DEPENDENCY(OptimizationRemarkEmitterWrapperPass)
2156-
INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
2157-
INITIALIZE_PASS_DEPENDENCY(TargetTransformInfoWrapperPass)
2158-
INITIALIZE_PASS_END(LoopFuseLegacy, "loop-fusion", "Loop Fusion", false, false)
2159-
2160-
FunctionPass *llvm::createLoopFusePass() { return new LoopFuseLegacy(); }

llvm/lib/Transforms/Scalar/Scalar.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ void llvm::initializeScalarOpts(PassRegistry &Registry) {
5858
initializeDFAJumpThreadingLegacyPassPass(Registry);
5959
initializeLegacyLICMPassPass(Registry);
6060
initializeLegacyLoopSinkPassPass(Registry);
61-
initializeLoopFuseLegacyPass(Registry);
6261
initializeLoopDataPrefetchLegacyPassPass(Registry);
6362
initializeLoopDeletionLegacyPassPass(Registry);
6463
initializeLoopAccessLegacyAnalysisPass(Registry);

0 commit comments

Comments
 (0)