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 <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9196>
This commit is contained in:
Daniel Schürmann
2021-03-04 16:31:22 +01:00
committed by Marge Bot
parent 13e4fed01f
commit d75c73e6a6

View File

@@ -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--;
}