summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-08-13 10:06:50 -0500
committerMarge Bot <eric+marge@anholt.net>2020-08-14 20:35:37 +0000
commit202b4df4aee790bb5b9486deb7c014ed440f27ff (patch)
tree736c8d6e33e70500890605052f07562c96269a03
parentb273611bb177b1a00d292f4d7df55efdf0f4ad61 (diff)
nir/lower_goto_if: Document some data structures
Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
-rw-r--r--src/compiler/nir/nir_lower_goto_ifs.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_goto_ifs.c b/src/compiler/nir/nir_lower_goto_ifs.c
index 956371f5a1e..e0f4b100d57 100644
--- a/src/compiler/nir/nir_lower_goto_ifs.c
+++ b/src/compiler/nir/nir_lower_goto_ifs.c
@@ -25,7 +25,15 @@
#include "nir_builder.h"
struct path {
+ /** Set of blocks which this path represents
+ *
+ * It's "reachable" not in the sense that these are all the nodes reachable
+ * through this path but in the sense that, when you see one of these
+ * blocks, you know you've reached this path.
+ */
struct set *reachable;
+
+ /** Fork in the path, if reachable->entries > 1 */
struct path_fork *fork;
};
@@ -47,11 +55,23 @@ struct routes {
struct strct_lvl {
struct exec_node node;
+
+ /** Set of blocks at the current level */
struct set *blocks;
+
+ /** Path for the next level */
struct path out_path;
+
+ /** Reach set from inside_outside if irreducable */
struct set *reach;
+
+ /** True if a skip region starts with this level */
bool skip_start;
+
+ /** True if a skip region ends with this level */
bool skip_end;
+
+ /** True if this level is irreducable */
bool irreducible;
};