From 72dee68184996fac1fe5088e74890db0cd783a95 Mon Sep 17 00:00:00 2001 From: Arun Thangamani Date: Wed, 4 Dec 2024 19:42:10 -0800 Subject: [PATCH] moving hoisting and canonicalizer pass into VectorToKernal.cpp --- lib/TPP/DefaultTppPasses.cpp | 2 -- lib/TPP/PassBundles/VectorToKernel.cpp | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/TPP/DefaultTppPasses.cpp b/lib/TPP/DefaultTppPasses.cpp index 70f2cd8b3..ffd44e88c 100644 --- a/lib/TPP/DefaultTppPasses.cpp +++ b/lib/TPP/DefaultTppPasses.cpp @@ -140,8 +140,6 @@ struct DefaultTppPasses BrgemmLinalgTilingOptions{lhsTile, rhsTile})); pm.addNestedPass(createLoopInvariantCodeMotionPass()); pm.addNestedPass(createVectorizationPass()); - pm.addNestedPass(createHoistVectorTransfers()); - pm.addNestedPass(createCanonicalizerPass()); if (vectorToXSMM) { pm.addPass(createVectorToXSMM()); diff --git a/lib/TPP/PassBundles/VectorToKernel.cpp b/lib/TPP/PassBundles/VectorToKernel.cpp index aacdb2004..8335b3c46 100644 --- a/lib/TPP/PassBundles/VectorToKernel.cpp +++ b/lib/TPP/PassBundles/VectorToKernel.cpp @@ -13,6 +13,7 @@ #include "mlir/Pass/Pass.h" #include "mlir/Pass/PassManager.h" #include "llvm/Support/Debug.h" +#include "mlir/Transforms/Passes.h" #include "TPP/PassBundles.h" #include "TPP/PassUtils.h" @@ -48,6 +49,8 @@ struct VectorToKernel : public tpp::impl::VectorToKernelBase, private: void constructPipeline() override { + pm.addNestedPass(createHoistVectorTransfers()); + pm.addNestedPass(createCanonicalizerPass()); pm.addNestedPass(createVectorContractToFMA()); } };