summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_liveness.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-02 15:25:02 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-02 16:48:54 -0700
commitd4bcca19dacfac53ffbad0dddd8f5919adb508c3 (patch)
treec12e370bd6b98520d271e2e8bdd121537d3ca83e /src/panfrost/midgard/midgard_liveness.c
parent513d02cfeb9cd42d8ed41a6999bcab08bb5e239d (diff)
pan/midgard: Switch sources to an array for trinary sources
We need three independent sources to support indirect SSBO writes (as well as textures with both LOD/bias and offsets). Now is a good time to make sources just an array so we don't have to rewrite a ton of code if we ever needed a fourth source for some reason. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_liveness.c')
-rw-r--r--src/panfrost/midgard/midgard_liveness.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/panfrost/midgard/midgard_liveness.c b/src/panfrost/midgard/midgard_liveness.c
index 7da62cf1c28..5fbab196d33 100644
--- a/src/panfrost/midgard/midgard_liveness.c
+++ b/src/panfrost/midgard/midgard_liveness.c
@@ -28,18 +28,6 @@
#include "compiler.h"
-static bool
-midgard_is_live_in_instr(midgard_instruction *ins, int src)
-{
- if (ins->ssa_args.src0 == src)
- return true;
-
- if (ins->ssa_args.src1 == src)
- return true;
-
- return false;
-}
-
/* Determine if a variable is live in the successors of a block */
static bool
is_live_after_successors(compiler_context *ctx, midgard_block *bl, int src)
@@ -61,7 +49,7 @@ is_live_after_successors(compiler_context *ctx, midgard_block *bl, int src)
bool block_done = false;
mir_foreach_instr_in_block(succ, ins) {
- if (midgard_is_live_in_instr(ins, src))
+ if (mir_has_arg(ins, src))
return true;
/* If written-before-use, we're gone */
@@ -92,7 +80,7 @@ mir_is_live_after(compiler_context *ctx, midgard_block *block, midgard_instructi
/* Check the rest of the block for liveness */
mir_foreach_instr_in_block_from(block, ins, mir_next_op(start)) {
- if (midgard_is_live_in_instr(ins, src))
+ if (mir_has_arg(ins, src))
return true;
}