Skip to content

Commit 8f38f54

Browse files
committed
Add sub-section title and an example for additional clarification of
multiple constraint specification.
1 parent 101489d commit 8f38f54

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

llvm/docs/DirectX/DXILOpTableGenDesign.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ is supported in all DXIL versions and all stages it is required to be specified
292292
stages = [VersionedStages<DXIL1_0, [all_stages]>];
293293
294294
295-
296295
Attribute Specification
297296
-----------------------
298297

@@ -314,11 +313,27 @@ Following is an example specification of valid attributes for ``DXIL1_0``.
314313
315314
A null list of ``attributes`` signifies no operation attributes.
316315

316+
Interpretation of Multiple Constraint Specification
317+
---------------------------------------------------
318+
317319
Each of the constraints states that the specified overload type, stage or
318320
attribute records are valid for the predicated DXIL version. Only
319321
the constraints corresponding to latest minimal DXIL version is applicable.
320322
Note as in the above example, any overload types, stages or attributes,
321323
that remain valid in a later DXIL version need to be specified in full.
324+
For example, consider the following specification of valid overload types:
325+
326+
.. code-block::
327+
328+
overloads = [
329+
VersionedOverloads<DXIL1_0, [halfTy, floatTy]>,
330+
VersionedOverloads<DXIL1_2, [halfTy, floatTy, doubleTy]>
331+
];
332+
333+
It specifies that the overload types ``halfTy`` and ``floatTy`` are valid for DXIL
334+
version 1.0 and later. It also specifies that ``doubleTy`` is additionally supported
335+
in DXIL version 1.2 and later.
336+
322337
This provides the flexibility to specify constraints independent
323338
of others in the list.
324339

0 commit comments

Comments
 (0)