pan/bi: Add no_spill flag to IR
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 14 Oct 2020 22:57:20 +0000 (18:57 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 23 Oct 2020 14:48:23 +0000 (14:48 +0000)
Will be used to prevent double spills.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>

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

index 00644cc..447f899 100644 (file)
@@ -285,6 +285,9 @@ bi_print_instruction(bi_instruction *ins, FILE *fp)
         if (ins->skip)
                 fprintf(fp, ".skip");
 
+        if (ins->no_spill)
+                fprintf(fp, ".no_spill");
+
         if (ins->vector_channels)
                 fprintf(fp, ".v%u", ins->vector_channels);
 
index 1debc43..65be6d0 100644 (file)
@@ -314,6 +314,10 @@ typedef struct {
         /* For memory ops, base address */
         enum bi_segment segment;
 
+        /* Can we spill the value written here? Used to prevent
+         * useless double fills */
+        bool no_spill;
+
         /* A class-specific op from which the actual opcode can be derived
          * (along with the above information) */