Commit 15e62c2
Erich Keane
[SYCL] Implement no-decomposition for kernel types that don't need it. (#2477)
Kernel arguments don't need to be decomposed unless they contain a
pointer or a special type, so we don't want to decompose structs/arrays
containing these. This patch accomplishes that.
First, we add a new attribute without a spelling that is added during the
'checking' stage, that the later vistiors can then check to see if
decomposition is necessary.
Next, we add a new checker to run during the checking stage that applies
the attribute based on logic. Basically, a container doesn't need to be
decomposed if all of its 'children' are acceptable, so we simply hold a
stack of the containers to tell which need to be decomposed. This, of
course, works recursively.
Finally, we add some new calls to the visitor that handle the case of a
'simple array' and a 'simple struct', which are ones that don't require
decomposition.1 parent 97bec24 commit 15e62c2
12 files changed
Lines changed: 824 additions & 319 deletions
File tree
- clang
- include/clang/Basic
- lib/Sema
- test
- CodeGenSYCL
- SemaSYCL
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1198 | 1198 | | |
1199 | 1199 | | |
1200 | 1200 | | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
1201 | 1209 | | |
1202 | 1210 | | |
1203 | 1211 | | |
| |||
0 commit comments