From 0f31fa1b645e881e5e293193c85d66f5e7e48c9a Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 26 Oct 2020 19:22:14 +0000 Subject: aco: skip value numbering of copies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_opt_value_numbering.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/compiler/aco_opt_value_numbering.cpp b/src/amd/compiler/aco_opt_value_numbering.cpp index 11aad20a0b0..91e03eb3cc0 100644 --- a/src/amd/compiler/aco_opt_value_numbering.cpp +++ b/src/amd/compiler/aco_opt_value_numbering.cpp @@ -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; -- cgit v1.2.3