diff --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp index e75e8d72bc2e..cfc31ded9883 100644 --- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp +++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp @@ -68,10 +68,13 @@ std::unique_ptr mlir::tosa::createTosaToLinalg() { } void mlir::tosa::addTosaToLinalgPasses(OpPassManager &pm) { + // Optional decompositions are designed to benefit linalg. pm.addNestedPass(mlir::tosa::createTosaOptionalDecompositions()); - pm.addNestedPass(createTosaMakeBroadcastablePass()); - pm.addNestedPass(createTosaToLinalgNamed()); pm.addNestedPass(mlir::createCanonicalizerPass()); - pm.addNestedPass(createTosaMakeBroadcastablePass()); - pm.addNestedPass(createTosaToLinalg()); + + pm.addNestedPass(tosa::createTosaMakeBroadcastablePass()); + pm.addNestedPass(tosa::createTosaToLinalgNamed()); + pm.addNestedPass(mlir::createCanonicalizerPass()); + pm.addNestedPass(tosa::createTosaMakeBroadcastablePass()); + pm.addNestedPass(tosa::createTosaToLinalg()); }