Commit 6d542aa
authored
[SYCL][ESIMD] Fix propagation of ESIMD attribute for inlined functions (#16193)
The internal compiler uses aggressive inlining, and we have a case where
a wrapper function that calls an ESIMD function has had the ESIMD
functions body inlined into it. The parent function does not have the
ESIMD attribute, so this causes the pass that propagates the ESIMD
attribute to fail, which ends up causing `sycl-post-link` to do the
wrong thing. It works fine when the inlining does not happen because
this pass propagates the attribute. Extend the ESIMD attribute
propagation pass to also consider functions that call ESIMD intrinsics
as ESIMD functions.
---------
Signed-off-by: Sarnie, Nick <[email protected]>1 parent 93635e6 commit 6d542aa
File tree
5 files changed
+55
-11
lines changed- llvm
- include/llvm/SYCLLowerIR/ESIMD
- lib/SYCLLowerIR/ESIMD
- test/SYCLLowerIR/ESIMD
5 files changed
+55
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
136 | 144 | | |
137 | 145 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
132 | 142 | | |
133 | 143 | | |
134 | 144 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
| |||
2178 | 2174 | | |
2179 | 2175 | | |
2180 | 2176 | | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
2184 | 2181 | | |
2185 | | - | |
2186 | | - | |
2187 | 2182 | | |
2188 | 2183 | | |
2189 | 2184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
38 | 52 | | |
39 | 53 | | |
40 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments