Commit 4492dda
authored
[DT] Add support for materializing func.func and func.return op. (#21582)
The revision implements the materialization pattern for `func.return`
ops and a method that sets function signatures with converted types. If
the type is not configured in the type converter, e.g.,
`!hal.buffer_view`, it uses the same type.
The function signature is not updated with a pattern because the
`MaterializeDeviceEncoding` pass is a `FunctionOpInterface` interface
pass.
It is a step towards #20825
---------
Signed-off-by: hanhanW <[email protected]>1 parent 66b2f33 commit 4492dda
File tree
3 files changed
+59
-28
lines changed- compiler/src/iree/compiler/Codegen/Common
- test
3 files changed
+59
-28
lines changedLines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
| |||
113 | 128 | | |
114 | 129 | | |
115 | 130 | | |
116 | | - | |
117 | | - | |
| 131 | + | |
118 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
119 | 137 | | |
120 | 138 | | |
121 | 139 | | |
| |||
146 | 164 | | |
147 | 165 | | |
148 | 166 | | |
149 | | - | |
150 | | - | |
| 167 | + | |
151 | 168 | | |
152 | 169 | | |
153 | 170 | | |
| |||
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
878 | 877 | | |
879 | 878 | | |
880 | 879 | | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
881 | 899 | | |
882 | 900 | | |
883 | 901 | | |
| |||
913 | 931 | | |
914 | 932 | | |
915 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
916 | 938 | | |
917 | 939 | | |
918 | 940 | | |
| |||
922 | 944 | | |
923 | 945 | | |
924 | 946 | | |
925 | | - | |
| 947 | + | |
| 948 | + | |
926 | 949 | | |
927 | 950 | | |
928 | 951 | | |
Lines changed: 11 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
21 | 15 | | |
22 | 16 | | |
23 | 17 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 18 | + | |
28 | 19 | | |
29 | 20 | | |
30 | 21 | | |
31 | 22 | | |
32 | 23 | | |
33 | 24 | | |
34 | | - | |
| 25 | + | |
35 | 26 | | |
36 | 27 | | |
37 | 28 | | |
| |||
0 commit comments