summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_opt_value_numbering.cpp
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2020-10-26 19:22:14 +0000
committerMarge Bot <eric+marge@anholt.net>2020-10-27 15:24:38 +0000
commit0f31fa1b645e881e5e293193c85d66f5e7e48c9a (patch)
tree8c10faedff0fe20473bb519b0445ade4ea0a22bb /src/amd/compiler/aco_opt_value_numbering.cpp
parent72b307a3389b8940ec639c3086fcef79f778b7e5 (diff)
downloadmesa-0f31fa1b645e881e5e293193c85d66f5e7e48c9a.tar.gz
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>
Diffstat (limited to 'src/amd/compiler/aco_opt_value_numbering.cpp')
-rw-r--r--src/amd/compiler/aco_opt_value_numbering.cpp1
1 files changed, 1 insertions, 0 deletions
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;