mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
i965/fs: Eliminate null-dst instructions without side-effects.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
7452f18b22
commit
3759a89ad3
1 changed files with 11 additions and 0 deletions
|
|
@ -85,6 +85,17 @@ fs_visitor::dead_code_eliminate()
|
|||
}
|
||||
}
|
||||
|
||||
if ((inst->opcode != BRW_OPCODE_IF &&
|
||||
inst->opcode != BRW_OPCODE_WHILE) &&
|
||||
inst->dst.is_null() &&
|
||||
!inst->has_side_effects() &&
|
||||
!inst->writes_flag() &&
|
||||
!inst->writes_accumulator) {
|
||||
inst->opcode = BRW_OPCODE_NOP;
|
||||
progress = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (inst->dst.file == GRF) {
|
||||
if (!inst->is_partial_write()) {
|
||||
int var = live_intervals->var_from_reg(inst->dst);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue