Skip to content

Commit f33f8a2

Browse files
committed
Move AffineMapAttr into BaseOps.td
AffineMapAttr is already part of base, it's just impossible to refer to it from ODS without pulling in the definition from Affine dialect. Differential Revision: https://reviews.llvm.org/D88555
1 parent 43d239d commit f33f8a2

File tree

8 files changed

+14
-38
lines changed

8 files changed

+14
-38
lines changed

mlir/include/mlir/Dialect/Affine/IR/AffineOps.td

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#ifndef AFFINE_OPS
1414
#define AFFINE_OPS
1515

16-
include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
1716
include "mlir/Dialect/StandardOps/IR/StandardOpsBase.td"
1817
include "mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td"
1918
include "mlir/Interfaces/ControlFlowInterfaces.td"

mlir/include/mlir/Dialect/Affine/IR/AffineOpsBase.td

-32
This file was deleted.

mlir/include/mlir/Dialect/GPU/ParallelLoopMapperAttr.td

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#ifndef PARALLEL_LOOP_MAPPER_ATTR
1515
#define PARALLEL_LOOP_MAPPER_ATTR
1616

17-
include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
1817
include "mlir/Dialect/GPU/GPUBase.td"
1918

2019
def BlockX : I64EnumAttrCase<"BlockX", 0>;

mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#ifndef LINALG_OPS
1414
#define LINALG_OPS
1515

16-
include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
1716
include "mlir/Dialect/Linalg/IR/LinalgBase.td"
1817
include "mlir/Interfaces/SideEffectInterfaces.td"
1918
include "mlir/Interfaces/ViewLikeInterface.td"

mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#ifndef LINALG_STRUCTURED_OPS
1515
#define LINALG_STRUCTURED_OPS
1616

17-
include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
1817
include "mlir/Dialect/Linalg/IR/LinalgBase.td"
1918
include "mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td"
2019
include "mlir/Interfaces/CopyOpInterface.td"

mlir/include/mlir/Dialect/Vector/VectorOps.td

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#ifndef VECTOR_OPS
1414
#define VECTOR_OPS
1515

16-
include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
1716
include "mlir/Interfaces/SideEffectInterfaces.td"
1817
include "mlir/Interfaces/VectorInterfaces.td"
1918

mlir/include/mlir/IR/OpBase.td

+14
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,15 @@ def StringElementsAttr : ElementsAttrBase<
13811381
let convertFromStorage = "$_self";
13821382
}
13831383

1384+
// Attributes containing affine maps.
1385+
def AffineMapAttr : Attr<
1386+
CPred<"$_self.isa<::mlir::AffineMapAttr>()">, "AffineMap attribute"> {
1387+
let storageType = [{::mlir::AffineMapAttr }];
1388+
let returnType = [{ ::mlir::AffineMap }];
1389+
let valueType = Index;
1390+
let constBuilderCall = "::mlir::AffineMapAttr::get($0)";
1391+
}
1392+
13841393
// Base class for array attributes.
13851394
class ArrayAttrBase<Pred condition, string description> :
13861395
Attr<condition, description> {
@@ -1410,6 +1419,11 @@ class TypedArrayAttrBase<Attr element, string description>: ArrayAttrBase<
14101419
Attr elementAttr = element;
14111420
}
14121421

1422+
def AffineMapArrayAttr : TypedArrayAttrBase<AffineMapAttr,
1423+
"AffineMap array attribute"> {
1424+
let constBuilderCall = "$_builder.getAffineMapArrayAttr($0)";
1425+
}
1426+
14131427
def BoolArrayAttr : TypedArrayAttrBase<BoolAttr,
14141428
"1-bit boolean array attribute"> {
14151429
let constBuilderCall = "$_builder.getBoolArrayAttr($0)";

mlir/test/lib/Dialect/Test/TestOps.td

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef TEST_OPS
1010
#define TEST_OPS
1111

12-
include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
1312
include "mlir/IR/OpBase.td"
1413
include "mlir/IR/OpAsmInterface.td"
1514
include "mlir/IR/RegionKindInterface.td"

0 commit comments

Comments
 (0)