@@ -38,7 +38,7 @@ the first one with integration footer and another one with modification of the
38
38
host compiler.
39
39
40
40
Both approaches have their pros and cons and they are expected to be implemented
41
- and exists in the implementation at the same time, but only one of them will be
41
+ and exist in the implementation at the same time, but only one of them will be
42
42
used at a time depending on whether 3rd-party host compiler is used or not.
43
43
44
44
Integration footer can be used with 3rd-party host compilers, but it requires
@@ -77,7 +77,7 @@ things:
77
77
unique string identifier of a variable it is attached to. The rules for
78
78
creating this string are the same as for ` __builtin_sycl_unique_stable_id ` and
79
79
the same algorithm can be used when generating the string for the attribute
80
- - emit ` sycl-uid-type ` LLVM IR attribute alongside ` sycl-unique-id ` , which
80
+ - emit ` sycl-uid-kind ` LLVM IR attribute alongside ` sycl-unique-id ` , which
81
81
contains the ` kind ` string passed to
82
82
` [[__sycl_detail__::uniquely_identifiable_object(kind)]] ` attribute
83
83
@@ -99,10 +99,14 @@ attributes should appear in LLVM IR for both host and device code. When DPC++
99
99
compiler is only used as a device compiler, then we don't expect the attribute
100
100
to be handled on host, apparently.
101
101
102
- Another thing we need from DPC++ FE compiler is to define a special macro, which
103
- will allow to distinguish it from other compilers. That is needed to apply the
104
- aforementioned attribute conditionally to avoid spamming users with warnings
105
- about unknown attributes.
102
+ Another thing we need from DPC++ FE host compiler is to define a special macro,
103
+ which will allow to distinguish it from other host compilers. That is needed to
104
+ apply the aforementioned attribute conditionally to avoid spamming users with
105
+ warnings about unknown attributes.
106
+
107
+ ** NOTE:** Alternatively we could simply set a macro which tells us whether or
108
+ not integration footer is enabled in the compiler driver instead of creating
109
+ a special macro for differentiating our own host compiler.
106
110
107
111
The suggested macro name is ` __INTEL_SYCL_HOST_COMPILER__ ` . It should be defined
108
112
when the compiler is invoked in SYCL host mode (` -fsycl-is-host ` ` -cc1 ` flag).
0 commit comments