[NewPM][Hexagon] Fix HexagonVectorLoopCarriedReusePass position in pipeline
authorArthur Eubanks <aeubanks@google.com>
Wed, 30 Dec 2020 03:54:32 +0000 (19:54 -0800)
committerArthur Eubanks <aeubanks@google.com>
Thu, 7 Jan 2021 23:04:28 +0000 (15:04 -0800)
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

index 23c047e..ba0f45f 100644 (file)
@@ -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)));
       });
 }