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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 04:05:24 PST 2022


foad added a comment.

>> As for RA not sinking defs back into the loop, I guess this is because RA does not know about occupancy? So here's a radical idea: after (pre-RA) scheduling, when we know what occupancy we //want// to achieve, why not make that occupancy a hard requirement, marking all other vgprs reserved? Then RA would have to stick to the budget, spilling if necessary. And yes spilling can be really bad, but just failing to meet your occupancy target can also be really bad.
>
> I think we don't know the occupancy we want to achieve unless there is a user requirement. In general its hard to say what is more beneficial: to have larger occupancy or less spills

Yes it is hard, but what alternative do we have? I think having the compiler make **a** decision about what occupancy it is trying to achieve, is better than not making any decision at all. And the scheduler already makes that decision, it is just not enforced.


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