-
Notifications
You must be signed in to change notification settings - Fork 14.1k
[mlir][Interfaces] ViewLikeOpInterface
: Remove parser/printer overloads
#122436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mlir][Interfaces] ViewLikeOpInterface
: Remove parser/printer overloads
#122436
Conversation
@llvm/pr-subscribers-mlir @llvm/pr-subscribers-mlir-affine Author: Matthias Springer (matthias-springer) Changes#115808 adds additional This commit removes an overload that is not needed, to keep the parser/printer simple. Full diff: https://github.com/llvm/llvm-project/pull/122436.diff 2 Files Affected:
diff --git a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
index e2eab1fb2178e0..6cd3408e2b2e98 100644
--- a/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
+++ b/mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
@@ -1118,7 +1118,7 @@ def AffineDelinearizeIndexOp : Affine_Op<"delinearize_index", [Pure]> {
let assemblyFormat = [{
$linear_index `into`
- custom<DynamicIndexList>($dynamic_basis, $static_basis, "::mlir::AsmParser::Delimiter::Paren")
+ custom<DynamicIndexList>($dynamic_basis, $static_basis, "{}", "::mlir::AsmParser::Delimiter::Paren")
attr-dict `:` type($multi_index)
}];
@@ -1219,7 +1219,7 @@ def AffineLinearizeIndexOp : Affine_Op<"linearize_index",
let assemblyFormat = [{
(`disjoint` $disjoint^)? ` `
`[` $multi_index `]` `by`
- custom<DynamicIndexList>($dynamic_basis, $static_basis, "::mlir::AsmParser::Delimiter::Paren")
+ custom<DynamicIndexList>($dynamic_basis, $static_basis, "{}", "::mlir::AsmParser::Delimiter::Paren")
attr-dict `:` type($linear_index)
}];
diff --git a/mlir/include/mlir/Interfaces/ViewLikeInterface.h b/mlir/include/mlir/Interfaces/ViewLikeInterface.h
index 3dcbd2f1af1936..d6479143a0a50b 100644
--- a/mlir/include/mlir/Interfaces/ViewLikeInterface.h
+++ b/mlir/include/mlir/Interfaces/ViewLikeInterface.h
@@ -109,13 +109,6 @@ void printDynamicIndexList(
ArrayRef<int64_t> integers, ArrayRef<bool> scalables,
TypeRange valueTypes = TypeRange(),
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square);
-inline void printDynamicIndexList(OpAsmPrinter &printer, Operation *op,
- OperandRange values,
- ArrayRef<int64_t> integers,
- AsmParser::Delimiter delimiter) {
- return printDynamicIndexList(printer, op, values, integers, {}, TypeRange(),
- delimiter);
-}
inline void printDynamicIndexList(
OpAsmPrinter &printer, Operation *op, OperandRange values,
ArrayRef<int64_t> integers, TypeRange valueTypes = TypeRange(),
@@ -151,15 +144,6 @@ ParseResult parseDynamicIndexList(
DenseI64ArrayAttr &integers, DenseBoolArrayAttr &scalableVals,
SmallVectorImpl<Type> *valueTypes = nullptr,
AsmParser::Delimiter delimiter = AsmParser::Delimiter::Square);
-inline ParseResult
-parseDynamicIndexList(OpAsmParser &parser,
- SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
- DenseI64ArrayAttr &integers,
- AsmParser::Delimiter delimiter) {
- DenseBoolArrayAttr scalableVals = {};
- return parseDynamicIndexList(parser, values, integers, scalableVals, nullptr,
- delimiter);
-}
inline ParseResult parseDynamicIndexList(
OpAsmParser &parser,
SmallVectorImpl<OpAsmParser::UnresolvedOperand> &values,
|
ViewLikeOpInterface
: Remove parser/printer overloadsViewLikeOpInterface
: Remove parser/printer overloads (Step 1)
ViewLikeOpInterface
: Remove parser/printer overloads (Step 1)ViewLikeOpInterface
: Remove parser/printer overloads
484286d
to
d7b5c13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember having "fun" with these at some point 😂
Thanks for the clean-up, less is more, LGTM!
…oads (llvm#122436) llvm#115808 adds additional `custom<>` parser/printer variants. The overall list of overloads/variants is getting larger. This commit removes overloads that are not needed, to keep the parser/printer simple.
#115808 adds additional
custom<>
parser/printer variants. The overall list of overloads/variants is getting larger.This commit removes overloads that are not needed, to keep the parser/printer simple.