pan/bi: Add bi_layout.c for clause layout helpers
[mesa.git] / src / panfrost / bifrost / compiler.h
index e4d37a8d52bc5bd16fd00a8c48fd259b252d697c..eda8694079fed0a3efb0d0cc7a1a2bc5e2f03656 100644 (file)
@@ -339,17 +339,10 @@ typedef struct {
         struct list_head link;
 
         /* A clause can have 8 instructions in bundled FMA/ADD sense, so there
-         * can be 8 bundles. But each bundle can have both an FMA and an ADD,
-         * so a clause can have up to 16 bi_instructions. Whether bundles or
-         * instructions are used depends on where in scheduling we are. */
+         * can be 8 bundles. */
 
-        unsigned instruction_count;
         unsigned bundle_count;
-
-        union {
-                bi_instruction *instructions[16];
-                bi_bundle bundles[8];
-        };
+        bi_bundle bundles[8];
 
         /* For scoreboarding -- the clause ID (this is not globally unique!)
          * and its dependencies in terms of other clauses, computed during
@@ -588,6 +581,10 @@ void bi_liveness_ins_update(uint16_t *live, bi_instruction *ins, unsigned max);
 void bi_invalidate_liveness(bi_context *ctx);
 bool bi_is_live_after(bi_context *ctx, bi_block *block, bi_instruction *start, int src);
 
+/* Layout */
+
+bool bi_can_insert_bundle(bi_clause *clause, bool constant);
+
 /* Code emit */
 
 void bi_pack(bi_context *ctx, struct util_dynarray *emission);