OSDN Git Service

pan/midgard: Implement per-byte liveness tracking
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 16 Oct 2019 16:30:13 +0000 (12:30 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sun, 20 Oct 2019 12:02:31 +0000 (12:02 +0000)
Now that we have notion of byte masks, liveness tracking can be updated
to reflect this extra granularity without loss of correctness.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_liveness.c

index 1aa4158..08f8a07 100644 (file)
@@ -60,14 +60,13 @@ mir_liveness_ins_update(uint16_t *live, midgard_instruction *ins, unsigned max)
 {
         /* live_in[s] = GEN[s] + (live_out[s] - KILL[s]) */
 
-        liveness_kill(live, ins->dest, max, ins->mask);
+        liveness_kill(live, ins->dest, max, mir_bytemask(ins));
 
         mir_foreach_src(ins, src) {
                 unsigned node = ins->src[src];
                 unsigned bytemask = mir_bytemask_of_read_components(ins, node);
-                unsigned mask = mir_from_bytemask(bytemask, midgard_reg_mode_32);
 
-                liveness_gen(live, node, max, mask);
+                liveness_gen(live, node, max, bytemask);
         }
 }