aco: skip value numbering of copies

Instead, copy-propagate through and remove them.

This improves value numbering in this situation:
a = ...
b = copy a
c = copy a
use(b)
use(c)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7216>
This commit is contained in:
Rhys Perry 2020-10-26 19:22:14 +00:00 committed by Marge Bot
parent 72b307a338
commit 0f31fa1b64
1 changed files with 1 additions and 0 deletions

View File

@ -393,6 +393,7 @@ void process_block(vn_ctx& ctx, Block& block)
!instr->definitions[0].isFixed() && instr->operands[0].isTemp() && instr->operands[0].regClass() == instr->definitions[0].regClass() &&
!instr->isDPP() && !((int)instr->format & (int)Format::SDWA)) {
ctx.renames[instr->definitions[0].tempId()] = instr->operands[0].getTemp();
continue;
}
instr->pass_flags = ctx.exec_id;