[PATCH] D33289: [AMDGPU] Fix incorrect register usage tracking in GCNUpwardTracker
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 03:22:50 PDT 2023
vpykhtin marked an inline comment as done.
vpykhtin added a comment.
In D33289#4654038 <https://reviews.llvm.org/D33289#4654038>, @piotr wrote:
> 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?
You're right, we should not increment pressure for early-clobbers twice in AtMIPressure
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