Commit 7f1d7b2
committed
[MLIR][TableGen] Add gen-attrdef-list
This adds a new mlir-tblgen option (-gen-attrdef-list) to generate a list
of AttrDefs from a .td file in a format suitable for use in patterns where
a macro is defined to expand various repeated code snippets for each item
in the list. Specifically, the file will contain a list in this format
ATTRDEF(MyAttr)
This will be used in ClangIR to create an attribute visitor.1 parent 3e2afe5 commit 7f1d7b2
File tree
2 files changed
+31
-1
lines changed- mlir
- test/mlir-tblgen
- tools/mlir-tblgen
2 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| 693 | + | |
693 | 694 | | |
694 | 695 | | |
695 | 696 | | |
| |||
1025 | 1026 | | |
1026 | 1027 | | |
1027 | 1028 | | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
1028 | 1046 | | |
1029 | 1047 | | |
1030 | 1048 | | |
| |||
1099 | 1117 | | |
1100 | 1118 | | |
1101 | 1119 | | |
1102 | | - | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1103 | 1126 | | |
1104 | 1127 | | |
1105 | 1128 | | |
| |||
0 commit comments