Commit 6bf2009
authored
Prevent copy-elision pass for CudaDeviceExport (#8941)
The copy-elision optimization pass was incorrectly transforming struct
parameters in functions marked with [CudaDeviceExport] from
pass-by-value to pass-by-pointer, breaking the externally visible
function signatures that clients depend on.
This fix adds CudaDeviceExportDecoration to the exclusion list in
shouldProcessFunction(), ensuring that exported CUDA device functions
preserve their original signatures.
Fixes: #88741 parent 286bd05 commit 6bf2009
2 files changed
Lines changed: 32 additions & 0 deletions
File tree
- source/slang
- tests/autodiff
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
225 | 230 | | |
226 | 231 | | |
227 | 232 | | |
| |||
| 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 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments