pan/bi: Link clauses back to their blocks
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 28 May 2020 17:48:46 +0000 (13:48 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 May 2020 20:34:55 +0000 (20:34 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>

src/panfrost/bifrost/bi_schedule.c
src/panfrost/bifrost/compiler.h

index f6652aa11352551efbb5ba01affa14ce51935a09..47444b87ce05df378a8432cc0bc8e65dcd9e02b0 100644 (file)
@@ -204,6 +204,7 @@ bi_schedule(bi_context *ctx)
                                 u->branch_constant = true;
 
                         u->clause_type = bi_clause_type_for_ins(ins);
+                        u->block = (struct bi_block *) block;
 
                         list_addtail(&u->link, &bblock->clauses);
                 }
index fb95c6d83df8350153feda0a3b1f0ade45210f65..a283f3fed60a55962b15e720f6be7de58955778e 100644 (file)
@@ -335,9 +335,14 @@ typedef struct {
         bi_instruction *add;
 } bi_bundle;
 
+struct bi_block;
+
 typedef struct {
         struct list_head link;
 
+        /* Link back up for branch calculations */
+        struct bi_block *block;
+
         /* A clause can have 8 instructions in bundled FMA/ADD sense, so there
          * can be 8 bundles. */