ir3: Stop inserting nops during scheduling

Not necessary since nothing uses it anymore. This might have a slight
effect on spilling with multiple blocks, but no shader-db difference
because nothing spills.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13722>
This commit is contained in:
Connor Abbott 2021-11-08 19:36:36 +01:00 committed by Marge Bot
parent e0eeba6cbb
commit 23a5f1a5ac
5 changed files with 0 additions and 38 deletions

View File

@ -1637,7 +1637,6 @@ unsigned ir3_delayslots_with_repeat(struct ir3_instruction *assigner,
unsigned assigner_n, unsigned consumer_n);
unsigned ir3_delay_calc(struct ir3_block *block,
struct ir3_instruction *instr, bool mergedregs);
void ir3_remove_nops(struct ir3 *ir);
/* unreachable block elimination: */
bool ir3_remove_unreachable(struct ir3 *ir);

View File

@ -348,23 +348,3 @@ ir3_delay_calc(struct ir3_block *block, struct ir3_instruction *instr,
return delay_calc(block, NULL, instr, 0, &mask, mergedregs);
}
/**
* Remove nop instructions. The scheduler can insert placeholder nop's
* so that ir3_delay_calc() can account for nop's that won't be needed
* due to nop's triggered by a previous instruction. However, before
* legalize, we want to remove these. The legalize pass can insert
* some nop's if needed to hold (for example) sync flags. This final
* remaining nops are inserted by legalize after this.
*/
void
ir3_remove_nops(struct ir3 *ir)
{
foreach_block (block, &ir->block_list) {
foreach_instr_safe (instr, &block->instr_list) {
if (instr->opc == OPC_NOP) {
list_del(&instr->node);
}
}
}
}

View File

@ -862,8 +862,6 @@ ir3_legalize(struct ir3 *ir, struct ir3_shader_variant *so, int *max_bary)
block->data = bd;
}
ir3_remove_nops(ir);
/* We may have failed to pull all input loads into the first block.
* In such case at the moment we aren't able to find a better place
* to for (ei) than the end of the program.

View File

@ -687,14 +687,7 @@ sched_block(struct ir3_postsched_ctx *ctx, struct ir3_block *block)
unsigned delay = node_delay(ctx, instr->data);
d("delay=%u", delay);
/* and if we run out of instructions that can be scheduled,
* then it is time for nop's:
*/
debug_assert(delay <= 6);
while (delay > 0) {
ir3_NOP(block);
delay--;
}
schedule(ctx, instr);
}
@ -756,7 +749,6 @@ ir3_postsched(struct ir3 *ir, struct ir3_shader_variant *v)
.v = v,
};
ir3_remove_nops(ir);
cleanup_self_movs(ir);
foreach_block (block, &ir->block_list) {

View File

@ -1211,14 +1211,7 @@ sched_block(struct ir3_sched_ctx *ctx, struct ir3_block *block)
unsigned delay = node_delay(ctx, instr->data);
d("delay=%u", delay);
/* and if we run out of instructions that can be scheduled,
* then it is time for nop's:
*/
debug_assert(delay <= 6);
while (delay > 0) {
ir3_NOP(block);
delay--;
}
schedule(ctx, instr);