[PATCH] D119013: [ArgPromotion][AMDGPU] New MSSA-based function argument promotion pass with input/output argument support
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 13:28:15 PST 2022
rampitec added a comment.
In D119013#3300842 <https://reviews.llvm.org/D119013#3300842>, @arsenm wrote:
> In D119013#3297983 <https://reviews.llvm.org/D119013#3297983>, @rampitec wrote:
>
>> In D119013#3297939 <https://reviews.llvm.org/D119013#3297939>, @arsenm wrote:
>>
>>> In D119013#3297857 <https://reviews.llvm.org/D119013#3297857>, @rampitec wrote:
>>>
>>>> This probably needs to be limited to only private and flat pointers in case of the AMDGPU. A target callback may be needed to check if a pointer argument is beneficial to promote.
>>>
>>> I don't see why the type matters at all
>>
>> The idea is to allow SROA in a caller, what's the point of doing it on a non-alloca pointers?
>
> For return values, we can support way more values returned in registers than in pointer passed parameters. The same applies to passed parameters, we could pull more arguments into registers
Hm... That makes sense. We have discussed it offline with Valery, likely we do not need a target check for profitability. We would however want to limit a number of such promotions so that we do not accidentally turn a global store into a private store if we ran out of output registers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119013/new/
https://reviews.llvm.org/D119013
More information about the llvm-commits
mailing list