From 86a053f7b903225b0a7992dd8d5e80c6f0360700 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 9 May 2023 17:15:47 -0400 Subject: [PATCH] docs: Include ALU opcode descriptions If we have a description for an ALU opcode in NIR, include it with our generated HTML documentation so people don't need to go to nir_opcodes.py anyway because the documentation is missing the documentation ;-) Signed-off-by: Alyssa Rosenzweig Acked-by: Jesse Natalie Tested-by: Jesse Natalie Part-of: --- docs/_exts/nir.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_exts/nir.py b/docs/_exts/nir.py index f7f6baf..7d641d7 100644 --- a/docs/_exts/nir.py +++ b/docs/_exts/nir.py @@ -58,6 +58,8 @@ def to_yn(b): - ${to_yn('associative' in op.algebraic_properties)} - ${to_yn('2src_commutative' in op.algebraic_properties)} +${("**Description:** " + op.description) if op.description != "" else ""} + **Constant-folding:** .. code-block:: c -- 2.7.4