Skip to content

Commit

Permalink
Move AffineMapAttr into BaseOps.td
Browse files Browse the repository at this point in the history
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
  • Loading branch information
d0k committed Sep 30, 2020
1 parent 43d239d commit f33f8a2
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 38 deletions.
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#ifndef AFFINE_OPS
#define AFFINE_OPS

include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
include "mlir/Dialect/StandardOps/IR/StandardOpsBase.td"
include "mlir/Dialect/Affine/IR/AffineMemoryOpInterfaces.td"
include "mlir/Interfaces/ControlFlowInterfaces.td"
Expand Down
32 changes: 0 additions & 32 deletions mlir/include/mlir/Dialect/Affine/IR/AffineOpsBase.td

This file was deleted.

1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/GPU/ParallelLoopMapperAttr.td
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#ifndef PARALLEL_LOOP_MAPPER_ATTR
#define PARALLEL_LOOP_MAPPER_ATTR

include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
include "mlir/Dialect/GPU/GPUBase.td"

def BlockX : I64EnumAttrCase<"BlockX", 0>;
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#ifndef LINALG_OPS
#define LINALG_OPS

include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
include "mlir/Dialect/Linalg/IR/LinalgBase.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
include "mlir/Interfaces/ViewLikeInterface.td"
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#ifndef LINALG_STRUCTURED_OPS
#define LINALG_STRUCTURED_OPS

include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
include "mlir/Dialect/Linalg/IR/LinalgBase.td"
include "mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td"
include "mlir/Interfaces/CopyOpInterface.td"
Expand Down
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/Vector/VectorOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#ifndef VECTOR_OPS
#define VECTOR_OPS

include "mlir/Dialect/Affine/IR/AffineOpsBase.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
include "mlir/Interfaces/VectorInterfaces.td"

Expand Down
14 changes: 14 additions & 0 deletions mlir/include/mlir/IR/OpBase.td
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,15 @@ def StringElementsAttr : ElementsAttrBase<
let convertFromStorage = "$_self";
}

// Attributes containing affine maps.
def AffineMapAttr : Attr<
CPred<"$_self.isa<::mlir::AffineMapAttr>()">, "AffineMap attribute"> {
let storageType = [{::mlir::AffineMapAttr }];
let returnType = [{ ::mlir::AffineMap }];
let valueType = Index;
let constBuilderCall = "::mlir::AffineMapAttr::get($0)";
}

// Base class for array attributes.
class ArrayAttrBase<Pred condition, string description> :
Attr<condition, description> {
Expand Down