@@ -208,16 +208,16 @@ The SpecConstants pass in the post-link will have the following IR as input
208
208
```
209
209
210
210
`__sycl_getCompositeSpecConstantValue` is a new "intrinsic" (in addition to
211
- `__sycl_getSpecConstantValue`) recognized by `SpecConstants` pass, which creates
212
- a value of a composite (of non-primitive type) specialization constant.
211
+ `__sycl_getSpecConstantValue`) recognized by the `SpecConstants` pass, which
212
+ creates a value of a composite (of non-primitive type) specialization constant.
213
213
It does not need a default value, because its default value consists of default
214
214
values of its leaf specialization constants (see below).
215
215
216
216
`__sycl_getCompositeSpecConstantValue` will be replaced with a set of
217
217
`__spirv_SpecConstant` calls for each member of its return type plus one
218
218
`__spirv_SpecConstantComposite` to gather members back into a single composite.
219
219
If any composite member is another composite, then it will be also represented
220
- by number of `__spirv_SpecConstant` plus one `__spirv_SpecConstantComposite`:
220
+ by number of `__spirv_SpecConstant` plus one `__spirv_SpecConstantComposite`.
221
221
222
222
```
223
223
%gold_POD_A0_x = call i32 __ spirv_SpecConstant(i32 10, i32 0)
@@ -241,13 +241,15 @@ by number of `__spirv_SpecConstant` plus one `__spirv_SpecConstantComposite`:
241
241
```
242
242
243
243
Spec ID for the composite spec constant is not needed, as runtime will never use
244
- it - it will use IDs of the leaves instead.
245
- Yet, the SPIR-V specification does not allow `SpecID` decoration for composite
246
- spec constants, because its defined by its members instead.
247
-
248
- `__spirv_SpecConstantComposite` is a new "intrinsic", which represents composite
249
- specialization constant. Its arguments are LLVM IR valures corresponding to
250
- elements of composite type of the constant.
244
+ it - it will use IDs of the leaves instead, which are being assigned by the
245
+ `SpecConstants` pass during replacement of SYCL intrinsics with SPIR-V
246
+ intrinsics.
247
+ Besides, the SPIR-V specification does not allow `SpecID` decoration for
248
+ composite spec constants, because its defined by its members instead.
249
+
250
+ `__spirv_SpecConstantComposite` is a new SPIR-V intrinsic, which represents
251
+ composite specialization constant. Its arguments are LLVM IR valures
252
+ corresponding to elements of composite type of the constant.
251
253
252
254
##### LLVM -> SPIR-V translation
253
255
0 commit comments