pan/midgard: Remove mir_has_multiple_writes

We already enforce this with the SSA/register distinction in the
backend. There is no need to duplicate this logic merely for an assert.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig
2019-10-03 16:01:51 -04:00
parent 3f4be0d199
commit c59fae0fef
3 changed files with 0 additions and 18 deletions
-1
View File
@@ -604,7 +604,6 @@ void mir_lower_special_reads(compiler_context *ctx);
struct ra_graph* allocate_registers(compiler_context *ctx, bool *spilled);
void install_registers(compiler_context *ctx, struct ra_graph *g);
bool mir_is_live_after(compiler_context *ctx, midgard_block *block, midgard_instruction *start, int src);
bool mir_has_multiple_writes(compiler_context *ctx, int src);
void mir_create_pipeline_registers(compiler_context *ctx);
-1
View File
@@ -2146,7 +2146,6 @@ midgard_opt_pos_propagate(compiler_context *ctx, midgard_block *block)
/* TODO: Registers? */
unsigned src = ins->src[1];
if (src & IS_REG) continue;
assert(!mir_has_multiple_writes(ctx, src));
/* There might be a source modifier, too */
if (mir_nontrivial_source2_mod(ins)) continue;
-16
View File
@@ -90,19 +90,3 @@ mir_is_live_after(compiler_context *ctx, midgard_block *block, midgard_instructi
return succ;
}
/* Just a quick check -- is it written more than once? (I.e. are we definitely
* not SSA?) */
bool
mir_has_multiple_writes(compiler_context *ctx, int dest)
{
unsigned write_count = 0;
mir_foreach_instr_global(ctx, ins) {
if (ins->dest == dest)
write_count++;
}
return write_count > 1;
}