[PATCH] D72429: [mlir] Change the syntax of AffineMapAttr and IntegerSetAttr to avoid conflicts with function types.
Alex Zinenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 01:40:23 PST 2020
ftynse added a comment.
I support the reasoning for having delimiters around the actual map. I've always found the cases of immediate inline application confusing, especially for maps: `(d0)[s0] -> (d0,s0)(%0)[%1]`.
I am also supportive of keeping the `affine_` prefix in the name, since it clearly indicates the affine-ness of the attribute, e.g. the kind of sets/maps that can be expressed. We may eventually consider other similar attributes, like permutation-only maps, that could be clearly denoted now. I don't think repetition is a big problem, we are doing an IR after all, and we repeat types for all uses of a value, for example. If it proves to be annoying, we could consider having a special syntax for affine loops and branches that supports "inline" maps and sets without the `affine_map` token at all. We already have special syntax for affine loads and stores anyway, so it can be adapted and reused.
================
Comment at: mlir/docs/Dialects/Affine.md:302
```
operation ::= ssa-id `=` `affine.apply` affine-map dim-and-symbol-use-list
```
----------------
This looks like it would take an unprefixed affine map. There may be other places that say they consume "affine-map" rather than "affine-map-attribute".
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72429/new/
https://reviews.llvm.org/D72429
More information about the llvm-commits
mailing list