Skip to content

Commit 6e248d5

Browse files
committed
Apply comments
1 parent e40b404 commit 6e248d5

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

sycl/doc/SpecializationConstants.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,16 @@ The SpecConstants pass in the post-link will have the following IR as input
208208
```
209209
210210
`__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.
213213
It does not need a default value, because its default value consists of default
214214
values of its leaf specialization constants (see below).
215215
216216
`__sycl_getCompositeSpecConstantValue` will be replaced with a set of
217217
`__spirv_SpecConstant` calls for each member of its return type plus one
218218
`__spirv_SpecConstantComposite` to gather members back into a single composite.
219219
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`.
221221
222222
```
223223
%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`:
241241
```
242242
243243
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.
251253
252254
##### LLVM -> SPIR-V translation
253255

0 commit comments

Comments
 (0)