[Mlir-commits] [mlir] b337953 - [mlir][sparse] Misc cleanup in Merger.h
wren romano
llvmlistbot at llvm.org
Fri Mar 24 15:05:54 PDT 2023
Author: wren romano
Date: 2023-03-24T15:05:45-07:00
New Revision: b3379538e8bd2ea946d0d5b463690a6b143f3471
URL: https://github.com/llvm/llvm-project/commit/b3379538e8bd2ea946d0d5b463690a6b143f3471
DIFF: https://github.com/llvm/llvm-project/commit/b3379538e8bd2ea946d0d5b463690a6b143f3471.diff
LOG: [mlir][sparse] Misc cleanup in Merger.h
* Moving the `Children` class to be nested under `TensorExp`.
* Marking `TensorExp`, `TensorExp::Children`, and `LatPoint` as final.
Depends On D146083
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D146562
Added:
Modified:
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h b/mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
index 7e83dfb6bce65..2c13ad2d9238e 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
+++ b/mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
@@ -80,16 +80,16 @@ using LatSetId = unsigned;
/// of the identifier type.
static constexpr unsigned kInvalidId = -1u;
-/// Children subexpressions of tensor operations.
-struct Children {
- ExprId e0;
- ExprId e1;
-};
-
-/// Tensor expression. Represents a MLIR expression in tensor index notation.
-struct TensorExp {
+/// Tensor expression. Represents an MLIR expression in tensor index notation.
+struct TensorExp final {
enum class Kind;
+ /// Child subexpressions for non-leaf expressions.
+ struct Children final {
+ ExprId e0;
+ ExprId e1;
+ };
+
// The `x` parameter has
diff erent types depending on the value of the
// `k` parameter. The correspondences are:
// * `kTensor` -> `TensorId`
@@ -209,7 +209,7 @@ enum class TensorExp::Kind {
/// of `TensorLoopId`s, together with the identifier of the corresponding
/// tensor expression. The formal conjunction is represented as a set of
/// `TensorLoopId`, where that set is implemented as a `BitVector`.
-struct LatPoint {
+struct LatPoint final {
/// Construct the lattice point from a given set of `TensorLoopId`s.
LatPoint(const BitVector &bits, ExprId e);
More information about the Mlir-commits
mailing list