Commit 03e2e8c
committed
[mlir][vector] Always print the in_bounds attribute
This patch updates the printer for vector ops attributes so that the
`in_bounds` attribute, when present, is always printed (regardless of the
contents).
ATM, an attribute with all values equal `false`, e.g. `in_bounds =
{false, false}`, wouldn't be printed. This makes testing certain
behaviours impossible (i.e. to make sure that the attribute is correctly
preserved/transformed by patterns that modify it). See e.g. llvm#12345
Separately, it's not clear whether the absence of the `in_bounds`
attribute in the printed IR is meant to mean that:
* the attribute is absent,
* the attribute is present and set to all-true,
* the attribute is present and set to all-false.
By making sure that the attribute is always present, we are removing
this ambiguity.1 parent 891ec2a commit 03e2e8c
File tree
4 files changed
+6
-9
lines changed- mlir
- lib/Dialect/Vector/IR
- test
- Conversion/VectorToSCF
- Dialect
- Linalg
- Vector
4 files changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3859 | 3859 | | |
3860 | 3860 | | |
3861 | 3861 | | |
3862 | | - | |
3863 | | - | |
3864 | | - | |
3865 | 3862 | | |
3866 | 3863 | | |
3867 | 3864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
953 | | - | |
| 953 | + | |
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
987 | | - | |
| 987 | + | |
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
| 1024 | + | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments