[PATCH] D149775: [AMDGPU] Reserve SGPR pair when long branches are present
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 04:21:41 PDT 2023
vpykhtin added a comment.
In D149775#4364811 <https://reviews.llvm.org/D149775#4364811>, @crobeck wrote:
> In D149775#4338257 <https://reviews.llvm.org/D149775#4338257>, @vpykhtin wrote:
>
>> What if we always reserve a register for long jumps?
>
> I think we still want the ability to not reserve them in cases where they might not actually be needed and would waste resources. The amdgpu-long-branch-factor initialized default has been reset higher so that we lean toward always reserving them now - if this value is 0 the long branch registers are never reserved. As this value grows the great chance the branch distance will fall within the threshold and the registers will be marked to be reserved.
Maybe we can reserve a register if the overall number of SGPRs is close to some threshold?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149775/new/
https://reviews.llvm.org/D149775
More information about the llvm-commits
mailing list