diff options
| author | Sruthik P <spatibandlla@nvidia.com> | 2025-07-18 03:26:07 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-17 21:56:07 +0000 |
| commit | ed1a0b8b53c7556fbf0ccab4f3496078eea4c8a2 (patch) | |
| tree | 1af910b87dd3c05137ecc8d66090f8f12d43347c /docs/design | |
| parent | 150ec59f9081d65f523e7fe8de7a0b75c402195d (diff) | |
slang: Update ir-instruction-definition.md to reflect changes to operand specification (#7804)
This change updates ir-instruction-definition.md to reflect changes
to operand specification implemented in PR#7725
Auxiliary change meant for Issue #7185
Diffstat (limited to 'docs/design')
| -rw-r--r-- | docs/design/ir-instruction-definition.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/design/ir-instruction-definition.md b/docs/design/ir-instruction-definition.md index f06323efb..ecbbe9be3 100644 --- a/docs/design/ir-instruction-definition.md +++ b/docs/design/ir-instruction-definition.md @@ -22,7 +22,8 @@ All IR instructions are defined in `source/slang/slang-ir-insts.lua`. This file - Instruction names and their organization into categories - Struct names for the C++ representation (if different from the default) - Flags like `hoistable`, `parent`, `global`, etc. -- Minimum operand counts +- (Optionally) Minimum operand counts +- (Optionally) The operands themselves - Parent-child relationships in the instruction hierarchy Here's a simplified example of how instructions are defined: @@ -63,6 +64,9 @@ The Fiddle tool processes `slang-ir-insts.lua` and generates several outputs: - C++ struct definitions for instruction types not manually defined - `leafInst()` and `baseInst()` macros for RTTI support + - If operands of an IR are specified in `slang-ir-insts.lua` in the format `{ { "operand1_name", "operand1_type" }, {"operand2_name"} }` and so on, + Fiddle will generate getters for each of the operands as part of the IR's struct. Note that the order in which the operands are listed matters and + specification of the type of the operand is optional; defaulting to "IRInst" when the type is not specified. 3. **Instruction Info Table** (`slang-ir-insts-info.cpp`): |
