nir: Add documentation for each jump instruction type
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 18 May 2020 19:26:30 +0000 (14:26 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 17:21:23 +0000 (17:21 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5101>

src/compiler/nir/nir.h

index dec20d33fd33e1ece7b9ea6e80648fd21b66d6e2..ca799c540a1702f495d2ed3ed24ee7a97c4cb708 100644 (file)
@@ -2223,8 +2223,26 @@ typedef struct {
 } nir_load_const_instr;
 
 typedef enum {
+   /** Return from a function
+    *
+    * This instruction is a classic function return.  It jumps to
+    * nir_function_impl::end_block.  No return value is provided in this
+    * instruction.  Instead, the function is expected to write any return
+    * data to a deref passed in from the caller.
+    */
    nir_jump_return,
+
+   /** Break out of the inner-most loop
+    *
+    * This has the same semantics as C's "break" statement.
+    */
    nir_jump_break,
+
+   /** Jump back to the top of the inner-most loop
+    *
+    * This has the same semantics as C's "continue" statement assuming that a
+    * NIR loop is implemented as "while (1) { body }".
+    */
    nir_jump_continue,
 } nir_jump_type;