From b2dafd44ca7a975e3d58d68f3a24e36b2ceb2e1e Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 29 Dec 2020 19:54:32 -0800 Subject: [PATCH] [NewPM][Hexagon] Fix HexagonVectorLoopCarriedReusePass position in pipeline In https://reviews.llvm.org/D88138 this was incorrectly added with registerOptimizerLastEPCallback(), when it should be registerLoopOptimizerEndEPCallback(), matching the legacy PM's EP_LoopOptimizerEnd. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D93929 --- llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp index 23c047e..ba0f45f 100644 --- a/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp +++ b/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp @@ -287,13 +287,9 @@ void HexagonTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB, [=](LoopPassManager &LPM, PassBuilder::OptimizationLevel Level) { LPM.addPass(HexagonLoopIdiomRecognitionPass()); }); - PB.registerOptimizerLastEPCallback( - [=](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) { - LoopPassManager LPM(DebugPassManager); - FunctionPassManager FPM(DebugPassManager); + PB.registerLoopOptimizerEndEPCallback( + [=](LoopPassManager &LPM, PassBuilder::OptimizationLevel Level) { LPM.addPass(HexagonVectorLoopCarriedReusePass()); - FPM.addPass(createFunctionToLoopPassAdaptor(std::move(LPM))); - MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); }); } -- 2.7.4