diff options
| author | Nicolas Vasilache <ntv@google.com> | 2019-12-03 17:51:34 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-03 17:52:10 -0800 |
| commit | 5c0c51a9979ffaf1eb57be061bed56a05ae6ddd4 (patch) | |
| tree | 7e5b29c1472df39a5040dc8ecc625e51ee93781b /mlir/test/lib/Transforms | |
| parent | 50b2b26e70fd904c44b4e80788e1cb64ce2b7c9d (diff) | |
| download | bcm5719-llvm-5c0c51a9979ffaf1eb57be061bed56a05ae6ddd4.tar.gz bcm5719-llvm-5c0c51a9979ffaf1eb57be061bed56a05ae6ddd4.zip | |
Refactor dependencies to expose Vector transformations as patterns - NFC
This CL refactors some of the MLIR vector dependencies to allow decoupling VectorOps, vector analysis, vector transformations and vector conversions from each other.
This makes the system more modular and allows extracting VectorToVector into VectorTransforms that do not depend on vector conversions.
This refactoring exhibited a bunch of cyclic library dependencies that have been cleaned up.
PiperOrigin-RevId: 283660308
Diffstat (limited to 'mlir/test/lib/Transforms')
| -rw-r--r-- | mlir/test/lib/Transforms/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp (renamed from mlir/test/lib/Transforms/TestLowerVectorTransfers.cpp) | 15 | ||||
| -rw-r--r-- | mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp | 2 | ||||
| -rw-r--r-- | mlir/test/lib/Transforms/TestVectorizationUtils.cpp | 2 |
4 files changed, 10 insertions, 11 deletions
diff --git a/mlir/test/lib/Transforms/CMakeLists.txt b/mlir/test/lib/Transforms/CMakeLists.txt index 2d482e5f1a5..8bc9c736187 100644 --- a/mlir/test/lib/Transforms/CMakeLists.txt +++ b/mlir/test/lib/Transforms/CMakeLists.txt @@ -6,9 +6,9 @@ add_llvm_library(MLIRTestTransforms TestLinalgTransforms.cpp TestLoopMapping.cpp TestLoopParametricTiling.cpp - TestLowerVectorTransfers.cpp TestOpaqueLoc.cpp TestMemRefStrideCalculation.cpp + TestVectorToLoopsConversion.cpp TestVectorToVectorConversion.cpp TestVectorizationUtils.cpp diff --git a/mlir/test/lib/Transforms/TestLowerVectorTransfers.cpp b/mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp index 8341777f6a4..e5f5f749bd0 100644 --- a/mlir/test/lib/Transforms/TestLowerVectorTransfers.cpp +++ b/mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp @@ -1,4 +1,4 @@ -//===- TestLowerVectorTransfers.cpp - Test VectorTransfers lowering -------===// +//===- TestVectorToLoopsConversion.cpp - Test VectorTransfers lowering ----===// // // Copyright 2019 The MLIR Authors. // @@ -17,7 +17,7 @@ #include <type_traits> -#include "mlir/Conversion/VectorConversions/VectorConversions.h" +#include "mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h" #include "mlir/IR/PatternMatch.h" #include "mlir/Pass/Pass.h" #include "mlir/Transforms/Passes.h" @@ -26,8 +26,8 @@ using namespace mlir; namespace { -struct TestLowerVectorTransfersPass - : public FunctionPass<TestLowerVectorTransfersPass> { +struct TestVectorToLoopsPass + : public FunctionPass<TestVectorToLoopsPass> { void runOnFunction() override { OwningRewritePatternList patterns; auto *context = &getContext(); @@ -38,7 +38,6 @@ struct TestLowerVectorTransfersPass } // end anonymous namespace -static PassRegistration<TestLowerVectorTransfersPass> - pass("test-affine-lower-vector-transfers", - "Materializes vector transfer ops to a " - "proper abstraction for the hardware"); +static PassRegistration<TestVectorToLoopsPass> + pass("test-convert-vector-to-loops", + "Converts vector transfer ops to loops over scalars and vector casts"); diff --git a/mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp b/mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp index 2550796ade2..9f9b8a554fe 100644 --- a/mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp +++ b/mlir/test/lib/Transforms/TestVectorToVectorConversion.cpp @@ -18,7 +18,7 @@ #include <type_traits> -#include "mlir/Conversion/VectorConversions/VectorConversions.h" +#include "mlir/Dialect/VectorOps/VectorTransforms.h" #include "mlir/IR/PatternMatch.h" #include "mlir/Pass/Pass.h" #include "mlir/Transforms/Passes.h" diff --git a/mlir/test/lib/Transforms/TestVectorizationUtils.cpp b/mlir/test/lib/Transforms/TestVectorizationUtils.cpp index f0f1f6b0b23..7efc74f2304 100644 --- a/mlir/test/lib/Transforms/TestVectorizationUtils.cpp +++ b/mlir/test/lib/Transforms/TestVectorizationUtils.cpp @@ -22,8 +22,8 @@ #include "mlir/Analysis/AffineAnalysis.h" #include "mlir/Analysis/NestedMatcher.h" #include "mlir/Analysis/SliceAnalysis.h" -#include "mlir/Analysis/VectorAnalysis.h" #include "mlir/Dialect/AffineOps/AffineOps.h" +#include "mlir/Dialect/VectorOps/Utils.h" #include "mlir/IR/Builders.h" #include "mlir/IR/Diagnostics.h" #include "mlir/IR/StandardTypes.h" |

