mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
aco/optimizer_postRA: Don't try to optimize dead instructions.
Also delete them when they are already dead in process_instruction(). No Fossil DB changes. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16266>
This commit is contained in:
parent
4a4e5320a1
commit
b0ef7c7c82
1 changed files with 7 additions and 0 deletions
|
|
@ -450,6 +450,13 @@ try_combine_dpp(pr_opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
|||
void
|
||||
process_instruction(pr_opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
||||
{
|
||||
/* Don't try to optimize instructions which are already dead. */
|
||||
if (!instr || is_dead(ctx.uses, instr.get())) {
|
||||
instr.reset();
|
||||
ctx.current_instr_idx++;
|
||||
return;
|
||||
}
|
||||
|
||||
try_apply_branch_vcc(ctx, instr);
|
||||
|
||||
try_optimize_scc_nocompare(ctx, instr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue