[PATCH] D121157: [AMDGPU] always use underlying object in the pointsToConstantMemory

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 14:25:44 PST 2022


arsenm added a comment.

In D121157#3365557 <https://reviews.llvm.org/D121157#3365557>, @rampitec wrote:

> In D121157#3365555 <https://reviews.llvm.org/D121157#3365555>, @arsenm wrote:
>
>> In D121157#3365553 <https://reviews.llvm.org/D121157#3365553>, @rampitec wrote:
>>
>>> In D121157#3365531 <https://reviews.llvm.org/D121157#3365531>, @arsenm wrote:
>>>
>>>> In D121157#3365530 <https://reviews.llvm.org/D121157#3365530>, @rampitec wrote:
>>>>
>>>>> @arsenm Do you think it makes sense to check if getUnderlyingObject actually brought one of: Argument, GlobalValue, or ConstantAggregate?
>>>>
>>>> I would assume the base implementation handles that, but we're already checking for GlobalValue
>>>
>>> isConstant is not the same as constant address space though. Then for argument a qualifier const also does not replace constant.
>>
>> The point of the method is to return if the memory is modified, not if it's constant address space
>
> Right, but people use constant address space to tell it is not modified.

Which is redundant with the constant modifier on a global variable. The address space is superfluous here. Loads can be marked with invariant metadata too


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

https://reviews.llvm.org/D121157



More information about the llvm-commits mailing list