Commit 5462e21
committed
[SYCL] Do not emit const sdm initializers
Const static variables need to be either zero-initialized or
constant-initialized. We were emitting initializers for all const
static variables before, which needed invalid address space casts
from constant-space to private-space. We now diagnose when they
are neither zero- nor constant-initialized and used in device code.
This change also reverts the address-space cast introduced in
intel#1774
Signed-off-by: Premanand M Rao <premanand.m.rao@intel.com>1 parent fedfdd3 commit 5462e21
7 files changed
Lines changed: 19 additions & 95 deletions
File tree
- clang
- include/clang
- Basic
- Sema
- lib/Sema
- test
- CodeGenSYCL
- SemaSYCL
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10850 | 10850 | | |
10851 | 10851 | | |
10852 | 10852 | | |
10853 | | - | |
| 10853 | + | |
10854 | 10854 | | |
10855 | 10855 | | |
10856 | 10856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12662 | 12662 | | |
12663 | 12663 | | |
12664 | 12664 | | |
12665 | | - | |
| 12665 | + | |
12666 | 12666 | | |
12667 | 12667 | | |
12668 | 12668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 228 | + | |
| 229 | + | |
231 | 230 | | |
232 | | - | |
| 231 | + | |
233 | 232 | | |
234 | 233 | | |
235 | 234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1854 | 1854 | | |
1855 | 1855 | | |
1856 | 1856 | | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
1860 | 1857 | | |
1861 | 1858 | | |
1862 | | - | |
1863 | | - | |
| 1859 | + | |
1864 | 1860 | | |
1865 | 1861 | | |
1866 | 1862 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5104 | 5104 | | |
5105 | 5105 | | |
5106 | 5106 | | |
5107 | | - | |
| 5107 | + | |
5108 | 5108 | | |
5109 | 5109 | | |
5110 | 5110 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
0 commit comments