[Mlir-commits] [mlir] 250f9e0 - [mlir][spirv] Switch to kEmitAccessorPrefix_Both
Jakub Kuderski
llvmlistbot at llvm.org
Fri Sep 23 18:32:26 PDT 2022
Author: Jakub Kuderski
Date: 2022-09-23T21:31:43-04:00
New Revision: 250f9e09e481e078624261d339d7205c1b940e61
URL: https://github.com/llvm/llvm-project/commit/250f9e09e481e078624261d339d7205c1b940e61
DIFF: https://github.com/llvm/llvm-project/commit/250f9e09e481e078624261d339d7205c1b940e61.diff
LOG: [mlir][spirv] Switch to kEmitAccessorPrefix_Both
Prepare for switching to prefixed accessors.
Issue: https://github.com/llvm/llvm-project/issues/57887
Reviewed By: antiagainst, rriddle
Differential Revision: https://reviews.llvm.org/D134560
Added:
Modified:
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
index 68ebc219e078..1f5dc076ca13 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
@@ -73,9 +73,9 @@ def SPIRV_Dialect : Dialect {
Attribute attr, DialectAsmPrinter &printer) const override;
}];
- // TODO: This has overlapping accessors with generated when switched to
- // prefixed. Fix and update to _Both & then _Prefixed.
- let emitAccessorPrefix = kEmitAccessorPrefix_Raw;
+ // TODO(https://github.com/llvm/llvm-project/issues/57887): Switch to
+ // _Prefixed accessors.
+ let emitAccessorPrefix = kEmitAccessorPrefix_Both;
}
//===----------------------------------------------------------------------===//
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td
index a7f3649573b6..26fadb1c206b 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td
@@ -64,9 +64,6 @@ def SPV_BranchOp : SPV_Op<"Branch", [
let skipDefaultBuilders = 1;
let extraClassDeclaration = [{
- /// Returns the branch target block.
- Block *getTarget() { return target(); }
-
/// Returns the block arguments.
operand_range getBlockArguments() { return targetOperands(); }
}];
@@ -236,14 +233,14 @@ def SPV_FunctionCallOp : SPV_Op<"FunctionCall", [
);
let results = (outs
- Optional<SPV_Type>:$result
+ Optional<SPV_Type>:$return_value
);
let autogenSerialization = 0;
let assemblyFormat = [{
$callee `(` $arguments `)` attr-dict `:`
- functional-type($arguments, results)
+ functional-type($arguments, results)
}];
}
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
index fd94b98205a8..9675c9df6011 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
@@ -39,7 +39,7 @@ def SPV_NVCooperativeMatrixLengthOp : SPV_NvVendorOp<"CooperativeMatrixLength",
```
}];
- let assemblyFormat = "attr-dict `:` $type";
+ let assemblyFormat = "attr-dict `:` $cooperative_matrix_type";
let availability = [
MinVersion<SPV_V_1_0>,
@@ -49,7 +49,7 @@ def SPV_NVCooperativeMatrixLengthOp : SPV_NvVendorOp<"CooperativeMatrixLength",
];
let arguments = (ins
- TypeAttr:$type
+ TypeAttr:$cooperative_matrix_type
);
let results = (outs
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
index 61070885d410..0d8280d5ba01 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVJointMatrixOps.td
@@ -39,7 +39,7 @@ def SPV_INTELJointMatrixWorkItemLengthOp : SPV_IntelVendorOp<"JointMatrixWorkIte
```
}];
- let assemblyFormat = "attr-dict `:` $type";
+ let assemblyFormat = "attr-dict `:` $joint_matrix_type";
let availability = [
MinVersion<SPV_V_1_0>,
@@ -49,7 +49,7 @@ def SPV_INTELJointMatrixWorkItemLengthOp : SPV_IntelVendorOp<"JointMatrixWorkIte
];
let arguments = (ins
- TypeAttr:$type
+ TypeAttr:$joint_matrix_type
);
let results = (outs
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
index ebbce903a394..ab14a70ef822 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
@@ -311,10 +311,6 @@ def SPV_FuncOp : SPV_Op<"func", [
let autogenSerialization = 0;
let extraClassDeclaration = [{
- /// Returns the type of this function.
- /// FIXME: Remove when SPIRV uses prefixed accessors.
- FunctionType getFunctionType() { return function_type(); }
-
/// Returns the argument types of this function.
ArrayRef<Type> getArgumentTypes() { return getFunctionType().getInputs(); }
More information about the Mlir-commits
mailing list