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

Piotr Sobczak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 07:29:16 PDT 2023


piotr added a comment.

In D33289#4654033 <https://reviews.llvm.org/D33289#4654033>, @foad wrote:

>> 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

Would it make sense to only do the `AtMIPressure` part for instructions with early clobber?


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