Module: Mesa Branch: master Commit: d75c73e6a6fc09da5275e080f6afc90be8ed2860 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d75c73e6a6fc09da5275e080f6afc90be8ed2860
Author: Daniel Schürmann <[email protected]> Date: Thu Mar 4 16:31:22 2021 +0100 aco: fix kill flags on phi operands Fossil-db changes are likely due to how the CSSA pass works. Totals from 1782 (1.31% of 136546) affected shaders (Raven): CodeSize: 25333292 -> 25294020 (-0.16%); split: -0.16%, +0.00% Instrs: 4916059 -> 4908218 (-0.16%); split: -0.16%, +0.00% Latency: 282860167 -> 282707176 (-0.05%); split: -0.08%, +0.03% InvThroughput: 136487564 -> 136394958 (-0.07%); split: -0.12%, +0.05% VClause: 74791 -> 74795 (+0.01%) Copies: 542115 -> 534280 (-1.45%); split: -1.48%, +0.04% Branches: 168977 -> 168966 (-0.01%); split: -0.01%, +0.01% Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196> --- src/amd/compiler/aco_live_var_analysis.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_live_var_analysis.cpp b/src/amd/compiler/aco_live_var_analysis.cpp index 25933bfe8d6..6dd81398b9d 100644 --- a/src/amd/compiler/aco_live_var_analysis.cpp +++ b/src/amd/compiler/aco_live_var_analysis.cpp @@ -226,11 +226,13 @@ void process_live_temps_per_block(Program *program, live& lives, Block* block, /* check if we changed an already processed block */ const bool inserted = lives.live_out[preds[i]].insert(operand.tempId()).second; if (inserted) { - operand.setKill(true); worklist.insert(preds[i]); if (insn->opcode == aco_opcode::p_phi && operand.getTemp().type() == RegType::sgpr) phi_sgpr_ops[preds[i]] += operand.size(); } + + /* set if the operand is killed by this (or another) phi instruction */ + operand.setKill(!live.count(operand.tempId())); } phi_idx--; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
