[PATCH] D33289: [AMDGPU] Fix incorrect register usage tracking in GCNUpwardTracker

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 06:46:59 PDT 2023


foad added subscribers: piotr, critson, foad.
foad added a comment.
Herald added subscribers: llvm-commits, kerbowa, jvesely.
Herald added projects: LLVM, All.

> This change fixes incorrect maximum register pressure calculation in GCNUpwardRPTracker: it reduced pressure of defs before incrementing pressure on uses losing the possible maximum pressure of defs + uses at the machine instruction.

Hi @vpykhtin! I don't understand the reason for this change. Why should max pressure include both the uses and the defs of one instruction? The uses and defs are not live at the same time and can be allocated to overlapping physical registers (assuming the uses are killed by the instruction). There should be an exception for early-clobber def operands but they are not very common.

+ @piotr @critson


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D33289/new/

https://reviews.llvm.org/D33289



More information about the llvm-commits mailing list