[PATCH] D117562: [AMDGPU] Sink immediate VGPR defs if high RP

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 09:24:41 PST 2022


vangthao added a comment.

In D117562#3272847 <https://reviews.llvm.org/D117562#3272847>, @vpykhtin wrote:

>> In D117562#3272690 <https://reviews.llvm.org/D117562#3272690>, @vangthao wrote:
>> Right, by the time we hit pre-ra scheduler, occupany may already be decreased by MachineLICM and since the scheduler does not currently have any way to decrease register pressure of live-throughs, it would not have any ability to increase occupancy if it was decreased by MachineLICM hoisting from loops. Enforcing an occupancy target for RA will **not** help in this case. Another issue is I believe the scheduler will allow for more VGPR usage as long as it does not decrease occupancy. This may hide some achievable occupancy if we do not handle this before scheduler or make scheduler aware that it can increase occupancy by sinking. I am not sure if disabling MachineLICM altogether in high RP situations would be the best solution here.
>
> So, the idea is to enforce occupancy achieved after scheduling?
>
> BTW, I saw another kind of VGPR usage which can be rematerialized: CSEd addresses "Base + Offset" in some cases can be register consuming.

Sorry I made a typo. I meant it will not help to enforce occupancy if we do not increase occupancy before scheduling or make the scheduler aware that sinking can be done to increase occupancy.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117562



More information about the llvm-commits mailing list