[PATCH] D112644: [AMDGPU] Fix global isel for kernels using agprs on gfx90a

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 13:52:39 PDT 2021


rampitec added a comment.

In D112644#3097673 <https://reviews.llvm.org/D112644#3097673>, @arsenm wrote:

> In D112644#3091224 <https://reviews.llvm.org/D112644#3091224>, @rampitec wrote:
>
>> In D112644#3091209 <https://reviews.llvm.org/D112644#3091209>, @arsenm wrote:
>>
>>> In D112644#3091088 <https://reviews.llvm.org/D112644#3091088>, @rampitec wrote:
>>>
>>>> In D112644#3091054 <https://reviews.llvm.org/D112644#3091054>, @arsenm wrote:
>>>>
>>>>> How was this breaking?
>>>>
>>>> LLVM ERROR: no registers from class available to allocate
>>>>
>>>> What happens `usesAGPRs()` does not see any agprs used and then the whole register budget is allocated to vgprs.
>>>
>>> Wouldn't it work correctly after later getReservedRegs calls? I don't think we should be calling this before finalizeIsel?
>>
>> It does work correctly with a later call from `freezeReservedRegs()`. The first call though comes from `MachineVerifier::visitMachineFunctionBefore()`.
>
> But if the later call fixes it up, how is it able to break in allocation later?

I am caching this value. The first call did not find any agprs and cached it. Here I am skipping the caching until selection is finalized.


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

https://reviews.llvm.org/D112644



More information about the llvm-commits mailing list