Mesa (staging/20.3): aco/optimizer: don't copy-prop logical phis

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 26 17:53:54 UTC 2021


Module: Mesa
Branch: staging/20.3
Commit: 6e1c91eb68e257e9d796ebfcfc32264cf8e39e5e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e1c91eb68e257e9d796ebfcfc32264cf8e39e5e

Author: Daniel Schürmann <daniel at schuermann.dev>
Date:   Fri Jan 15 18:54:01 2021 +0100

aco/optimizer: don't copy-prop logical phis

This is dangerous w.r.t. LCSSA-phis.

Totals from 746 (0.54% of 139391) affected shaders (Navi10):
CodeSize: 8592160 -> 8568156 (-0.28%); split: -0.30%, +0.02%
MaxWaves: 5172 -> 5171 (-0.02%); split: +0.02%, -0.04%
Instrs: 1653949 -> 1648489 (-0.33%); split: -0.36%, +0.03%
Cycles: 49474892 -> 49329224 (-0.29%); split: -0.33%, +0.03%
VMEM: 137574 -> 137421 (-0.11%); split: +0.18%, -0.29%
SMEM: 42391 -> 42439 (+0.11%); split: +0.12%, -0.01%
VClause: 26946 -> 26943 (-0.01%)
Copies: 130902 -> 126176 (-3.61%); split: -4.05%, +0.43%
Branches: 54891 -> 54556 (-0.61%); split: -0.64%, +0.03%
PreVGPRs: 53941 -> 53939 (-0.00%)

This has a slight effect on RA due to affinity changes.

Cc: 20.3
Cc: 21.0

Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8260>
(cherry picked from commit cd870d1b6aa43daa65f1e6c9763e5bdd7139acc9)

---

 .pick_status.json                  | 2 +-
 src/amd/compiler/aco_optimizer.cpp | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index ecd3cf8647b..32aa7952236 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2506,7 +2506,7 @@
         "description": "aco/optimizer: don't copy-prop logical phis",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index 33310f2ea83..e1388ac0cf8 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -1373,7 +1373,6 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
           instr->operands[1].isTemp() && ctx.info[instr->operands[1].tempId()].is_vcc())
          ctx.info[instr->definitions[0].tempId()].set_temp(ctx.info[instr->operands[1].tempId()].temp);
       break;
-   case aco_opcode::p_phi:
    case aco_opcode::p_linear_phi: {
       /* lower_bool_phis() can create phis like this */
       bool all_same_temp = instr->operands[0].isTemp();



More information about the mesa-commit mailing list