[Mlir-commits] [mlir] f40475c - [mlir] Move SCF utils implementations to SCF/Utils.
Adrian Kuegel
llvmlistbot at llvm.org
Fri Jan 28 02:54:41 PST 2022
Author: Adrian Kuegel
Date: 2022-01-28T11:54:27+01:00
New Revision: f40475c7fd71d8b525d04536191c70ae0c87cc22
URL: https://github.com/llvm/llvm-project/commit/f40475c7fd71d8b525d04536191c70ae0c87cc22
DIFF: https://github.com/llvm/llvm-project/commit/f40475c7fd71d8b525d04536191c70ae0c87cc22.diff
LOG: [mlir] Move SCF utils implementations to SCF/Utils.
BEGIN_PUBLIC
[mlir] Move SCF utils implementations to SCF/Utils.
END_PUBLIC
Added:
mlir/include/mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h
mlir/include/mlir/Dialect/SCF/Utils/Utils.h
mlir/lib/Dialect/SCF/Utils/AffineCanonicalizationUtils.cpp
mlir/lib/Dialect/SCF/Utils/CMakeLists.txt
mlir/lib/Dialect/SCF/Utils/Utils.cpp
Modified:
mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/include/mlir/Dialect/SCF/Transforms.h
mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp
mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
mlir/lib/Dialect/SCF/CMakeLists.txt
mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
mlir/lib/Dialect/SCF/Transforms/LoopCanonicalization.cpp
mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
mlir/lib/Dialect/SCF/Transforms/ParallelLoopCollapsing.cpp
mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
mlir/test/lib/Dialect/SCF/CMakeLists.txt
mlir/test/lib/Dialect/SCF/TestLoopParametricTiling.cpp
mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
Removed:
mlir/include/mlir/Dialect/SCF/AffineCanonicalizationUtils.h
mlir/include/mlir/Dialect/SCF/Utils.h
mlir/lib/Dialect/SCF/Transforms/AffineCanonicalizationUtils.cpp
mlir/lib/Dialect/SCF/Transforms/Utils.cpp
################################################################################
diff --git a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
index bd258f44476b..644ce1b169bf 100644
--- a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
+++ b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
@@ -14,7 +14,7 @@
#include "mlir/Conversion/VectorToSCF/VectorToSCF.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/Dialect/Vector/VectorTransforms.h"
diff --git a/mlir/include/mlir/Dialect/SCF/Transforms.h b/mlir/include/mlir/Dialect/SCF/Transforms.h
index 5ad7f7a1b782..391812641c68 100644
--- a/mlir/include/mlir/Dialect/SCF/Transforms.h
+++ b/mlir/include/mlir/Dialect/SCF/Transforms.h
@@ -13,7 +13,7 @@
#ifndef MLIR_DIALECT_SCF_TRANSFORMS_H_
#define MLIR_DIALECT_SCF_TRANSFORMS_H_
-#include "mlir/Dialect/SCF/AffineCanonicalizationUtils.h"
+#include "mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
diff --git a/mlir/include/mlir/Dialect/SCF/AffineCanonicalizationUtils.h b/mlir/include/mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h
similarity index 93%
rename from mlir/include/mlir/Dialect/SCF/AffineCanonicalizationUtils.h
rename to mlir/include/mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h
index 6288d19520fb..7e775c5e9062 100644
--- a/mlir/include/mlir/Dialect/SCF/AffineCanonicalizationUtils.h
+++ b/mlir/include/mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef MLIR_DIALECT_SCF_AFFINECANONICALIZATIONUTILS_H_
-#define MLIR_DIALECT_SCF_AFFINECANONICALIZATIONUTILS_H_
+#ifndef MLIR_DIALECT_SCF_UTILS_AFFINECANONICALIZATIONUTILS_H_
+#define MLIR_DIALECT_SCF_UTILS_AFFINECANONICALIZATIONUTILS_H_
#include "mlir/Support/LLVM.h"
@@ -71,4 +71,4 @@ LogicalResult rewritePeeledMinMaxOp(RewriterBase &rewriter, Operation *op,
} // namespace scf
} // namespace mlir
-#endif // MLIR_DIALECT_SCF_AFFINECANONICALIZATIONUTILS_H_
+#endif // MLIR_DIALECT_SCF_UTILS_AFFINECANONICALIZATIONUTILS_H_
diff --git a/mlir/include/mlir/Dialect/SCF/Utils.h b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
similarity index 98%
rename from mlir/include/mlir/Dialect/SCF/Utils.h
rename to mlir/include/mlir/Dialect/SCF/Utils/Utils.h
index 38d80a0826dc..6f700b484574 100644
--- a/mlir/include/mlir/Dialect/SCF/Utils.h
+++ b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef MLIR_DIALECT_SCF_UTILS_H_
-#define MLIR_DIALECT_SCF_UTILS_H_
+#ifndef MLIR_DIALECT_SCF_UTILS_UTILS_H_
+#define MLIR_DIALECT_SCF_UTILS_UTILS_H_
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LLVM.h"
@@ -159,4 +159,4 @@ void getPerfectlyNestedLoops(SmallVectorImpl<scf::ForOp> &nestedLoops,
} // namespace mlir
-#endif // MLIR_DIALECT_SCF_UTILS_H_
+#endif // MLIR_DIALECT_SCF_UTILS_UTILS_H_
diff --git a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
index 94456c2bb405..462da4c72eac 100644
--- a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
@@ -29,7 +29,7 @@ add_mlir_dialect_library(MLIRAffineTransforms
MLIRIR
MLIRMemRef
MLIRPass
- MLIRSCFTransforms
+ MLIRSCFUtils
MLIRSideEffectInterfaces
MLIRStandard
MLIRTransformUtils
diff --git a/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp b/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp
index 75f57c0d947d..d03594321430 100644
--- a/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/LoopCoalescing.cpp
@@ -11,7 +11,7 @@
#include "mlir/Dialect/Affine/LoopUtils.h"
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Transforms/Passes.h"
#include "mlir/Transforms/RegionUtils.h"
#include "llvm/Support/Debug.h"
diff --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
index cecb586b3c20..0d1874938c5f 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
@@ -49,6 +49,7 @@ add_mlir_dialect_library(MLIRLinalgTransforms
MLIRSCF
MLIRSCFBufferizableOpInterfaceImpl
MLIRSCFTransforms
+ MLIRSCFUtils
MLIRStdBufferizableOpInterfaceImpl
MLIRPass
MLIRStandard
diff --git a/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp b/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
index 8e863ab0c80e..2f92fcfd3548 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
@@ -15,7 +15,7 @@
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Vector/VectorOps.h"
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
index 33b70c0dc95f..e5059771480c 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
@@ -18,7 +18,7 @@
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Vector/VectorOps.h"
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp b/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
index 52d60b20f2b9..9c8cac0c69e7 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
@@ -12,8 +12,8 @@
#include "mlir/Dialect/Linalg/Passes.h"
#include "mlir/Dialect/Linalg/Transforms/Transforms.h"
#include "mlir/Dialect/Linalg/Utils/Utils.h"
-#include "mlir/Dialect/SCF/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/SCF/Transforms.h"
+#include "mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/StandardOps/Utils/Utils.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/AffineMap.h"
diff --git a/mlir/lib/Dialect/SCF/CMakeLists.txt b/mlir/lib/Dialect/SCF/CMakeLists.txt
index 0af9b77709c1..4288c0cc8022 100644
--- a/mlir/lib/Dialect/SCF/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/CMakeLists.txt
@@ -17,3 +17,4 @@ add_mlir_dialect_library(MLIRSCF
)
add_subdirectory(Transforms)
+add_subdirectory(Utils)
diff --git a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
index ef4dbb4ffc8e..95483b140d3f 100644
--- a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
@@ -1,5 +1,4 @@
add_mlir_dialect_library(MLIRSCFTransforms
- AffineCanonicalizationUtils.cpp
Bufferize.cpp
ForToWhile.cpp
LoopCanonicalization.cpp
@@ -10,7 +9,6 @@ add_mlir_dialect_library(MLIRSCFTransforms
ParallelLoopFusion.cpp
ParallelLoopTiling.cpp
StructuralTypeConversions.cpp
- Utils.cpp
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SCF
@@ -23,10 +21,12 @@ add_mlir_dialect_library(MLIRSCFTransforms
MLIRAffineAnalysis
MLIRArithmetic
MLIRBufferizationTransforms
+ MLIRDialectUtils
MLIRIR
MLIRMemRef
MLIRPass
MLIRSCF
+ MLIRSCFUtils
MLIRStandard
MLIRSupport
MLIRTensor
diff --git a/mlir/lib/Dialect/SCF/Transforms/LoopCanonicalization.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopCanonicalization.cpp
index a0cdb41a2d4d..4bfbd617cbd0 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopCanonicalization.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopCanonicalization.cpp
@@ -14,10 +14,10 @@
#include "PassDetail.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/SCF/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/SCF/Passes.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/Transforms.h"
+#include "mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
diff --git a/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
index 3ef508275a76..795c342e9026 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
@@ -14,7 +14,7 @@
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/BlockAndValueMapping.h"
#include "mlir/IR/PatternMatch.h"
diff --git a/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
index bca5abdd9bce..34e79c775053 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
@@ -15,7 +15,7 @@
#include "mlir/Dialect/SCF/Passes.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/BlockAndValueMapping.h"
diff --git a/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
index 103dbac12125..503c9b05c483 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
@@ -15,10 +15,10 @@
#include "mlir/Dialect/Affine/Analysis/AffineStructures.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
-#include "mlir/Dialect/SCF/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/SCF/Passes.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/Transforms.h"
+#include "mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/AffineExpr.h"
diff --git a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopCollapsing.cpp b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopCollapsing.cpp
index 0e5d4da310bd..6885a2e93ac7 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopCollapsing.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopCollapsing.cpp
@@ -9,7 +9,7 @@
#include "PassDetail.h"
#include "mlir/Dialect/SCF/Passes.h"
#include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Transforms/RegionUtils.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
diff --git a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
index 0bf4917bfee1..8e35efa852d5 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
@@ -16,7 +16,7 @@
#include "mlir/Dialect/SCF/Passes.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
using namespace mlir;
diff --git a/mlir/lib/Dialect/SCF/Transforms/AffineCanonicalizationUtils.cpp b/mlir/lib/Dialect/SCF/Utils/AffineCanonicalizationUtils.cpp
similarity index 99%
rename from mlir/lib/Dialect/SCF/Transforms/AffineCanonicalizationUtils.cpp
rename to mlir/lib/Dialect/SCF/Utils/AffineCanonicalizationUtils.cpp
index 513c8afd6106..31f0bd534559 100644
--- a/mlir/lib/Dialect/SCF/Transforms/AffineCanonicalizationUtils.cpp
+++ b/mlir/lib/Dialect/SCF/Utils/AffineCanonicalizationUtils.cpp
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "mlir/Dialect/SCF/AffineCanonicalizationUtils.h"
+#include "mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h"
#include "mlir/Dialect/Affine/Analysis/AffineStructures.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/SCF/SCF.h"
diff --git a/mlir/lib/Dialect/SCF/Utils/CMakeLists.txt b/mlir/lib/Dialect/SCF/Utils/CMakeLists.txt
new file mode 100644
index 000000000000..bad518fe8acf
--- /dev/null
+++ b/mlir/lib/Dialect/SCF/Utils/CMakeLists.txt
@@ -0,0 +1,19 @@
+add_mlir_dialect_library(MLIRSCFUtils
+ AffineCanonicalizationUtils.cpp
+ Utils.cpp
+
+ ADDITIONAL_HEADER_DIRS
+ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SCF
+
+ LINK_LIBS PUBLIC
+ MLIRAffine
+ MLIRAffineAnalysis
+ MLIRAnalysis
+ MLIRArithmetic
+ MLIRDialectUtils
+ MLIRIR
+ MLIRSCF
+ MLIRStandard
+ MLIRSupport
+ MLIRTransforms
+ )
diff --git a/mlir/lib/Dialect/SCF/Transforms/Utils.cpp b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
similarity index 99%
rename from mlir/lib/Dialect/SCF/Transforms/Utils.cpp
rename to mlir/lib/Dialect/SCF/Utils/Utils.cpp
index 04b41306c6da..148acd16762d 100644
--- a/mlir/lib/Dialect/SCF/Transforms/Utils.cpp
+++ b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
@@ -1,4 +1,4 @@
-//===- LoopUtils.cpp ---- Misc utilities for loop transformation ----------===//
+//===- Utils.cpp ---- Misc utilities for loop transformation ----------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/SCF/SCF.h"
diff --git a/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt b/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
index 0c04e729e4cb..15d57bc0fc73 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
@@ -20,6 +20,8 @@ add_mlir_dialect_library(MLIRSparseTensorTransforms
MLIRMemRef
MLIRPass
MLIRSCF
+ MLIRSCFTransforms
+ MLIRSCFUtils
MLIRStandard
MLIRSparseTensor
MLIRSparseTensorUtils
diff --git a/mlir/test/lib/Dialect/SCF/CMakeLists.txt b/mlir/test/lib/Dialect/SCF/CMakeLists.txt
index f2cd9db3d3fe..8cd43cd2ee49 100644
--- a/mlir/test/lib/Dialect/SCF/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/SCF/CMakeLists.txt
@@ -10,5 +10,6 @@ add_mlir_library(MLIRSCFTestPasses
MLIRPass
MLIRSCF
MLIRSCFTransforms
+ MLIRSCFUtils
MLIRTransformUtils
)
diff --git a/mlir/test/lib/Dialect/SCF/TestLoopParametricTiling.cpp b/mlir/test/lib/Dialect/SCF/TestLoopParametricTiling.cpp
index 9a6bbad3bc52..7a05ba9c71ed 100644
--- a/mlir/test/lib/Dialect/SCF/TestLoopParametricTiling.cpp
+++ b/mlir/test/lib/Dialect/SCF/TestLoopParametricTiling.cpp
@@ -11,7 +11,7 @@
//===----------------------------------------------------------------------===//
#include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/IR/Builders.h"
#include "mlir/Pass/Pass.h"
diff --git a/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp b/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
index 5749bd99074c..120c44edbc78 100644
--- a/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
+++ b/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
@@ -12,7 +12,7 @@
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/Builders.h"
#include "mlir/Pass/Pass.h"
diff --git a/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp b/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
index 7c438ebf8221..b6723ceb44a6 100644
--- a/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
+++ b/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
@@ -13,7 +13,7 @@
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/SCF/Utils.h"
+#include "mlir/Dialect/SCF/Utils/Utils.h"
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/PatternMatch.h"
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index 64ffdac5c476..97781be8deaf 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -1799,6 +1799,7 @@ cc_library(
":Pass",
":SCFDialect",
":SCFPassIncGen",
+ ":SCFUtils",
":StandardOps",
":Support",
":TensorDialect",
@@ -1962,6 +1963,8 @@ cc_library(
":MemRefDialect",
":Pass",
":SCFDialect",
+ ":SCFTransforms",
+ ":SCFUtils",
":SparseTensor",
":SparseTensorPassIncGen",
":SparseTensorUtils",
@@ -2237,6 +2240,7 @@ cc_library(
":MemRefDialect",
":Pass",
":SCFDialect",
+ ":SCFUtils",
":StandardOps",
":Support",
":Transforms",
@@ -2408,9 +2412,14 @@ cc_library(
"lib/Dialect/SCF/*.h",
],
),
- hdrs = glob([
- "include/mlir/Dialect/SCF/*.h",
- ]),
+ hdrs = glob(
+ [
+ "include/mlir/Dialect/SCF/*.h",
+ ],
+ exclude = [
+ "include/mlir/Dialect/SCF/Transforms.h",
+ ],
+ ),
includes = ["include"],
deps = [
":ArithmeticDialect",
@@ -2427,6 +2436,34 @@ cc_library(
],
)
+cc_library(
+ name = "SCFUtils",
+ srcs = glob(
+ [
+ "lib/Dialect/SCF/Utils/*.cpp",
+ ],
+ ),
+ hdrs = glob(
+ [
+ "include/mlir/Dialect/SCF/Utils/*.h",
+ ],
+ ),
+ includes = ["include"],
+ deps = [
+ ":Affine",
+ ":AffineAnalysis",
+ ":Analysis",
+ ":ArithmeticDialect",
+ ":DialectUtils",
+ ":IR",
+ ":SCFDialect",
+ ":StandardOps",
+ ":Support",
+ ":Transforms",
+ "//llvm:Support",
+ ],
+)
+
cc_library(
name = "LinalgInterfaces",
srcs = ["lib/Dialect/Linalg/IR/LinalgInterfaces.cpp"],
@@ -6875,6 +6912,7 @@ cc_library(
":SCFBufferizableOpInterfaceImpl",
":SCFDialect",
":SCFTransforms",
+ ":SCFUtils",
":StandardOps",
":StandardOpsTransforms",
":StdBufferizableOpInterfaceImpl",
diff --git a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
index bbe3d84d0f1c..6345343440c3 100644
--- a/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
@@ -457,6 +457,7 @@ cc_library(
"//mlir:Pass",
"//mlir:SCFDialect",
"//mlir:SCFTransforms",
+ "//mlir:SCFUtils",
"//mlir:StandardOps",
"//mlir:TransformUtils",
],
More information about the Mlir-commits
mailing list