[PATCH] D137360: [Linker] Remove nocallback attribute while linking

Gulfem Savrun Yeniceri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 16:40:33 PST 2022


gulfem marked an inline comment as done.
gulfem added a comment.

In D137360#3998292 <https://reviews.llvm.org/D137360#3998292>, @nikic wrote:

> I'm fine with this in terms of semantics. Probably someone familiar with IR linking should also take a look at this to check that this is a reasonable place to do the adjustment.



In D137360#3998263 <https://reviews.llvm.org/D137360#3998263>, @nikic wrote:

> In D137360#3996556 <https://reviews.llvm.org/D137360#3996556>, @gulfem wrote:
>
>>>>> A nocallback intrinsic, where the attribute should never be dropped.
>>>>
>>>> Why is the case? @nikic and @jdoerfert can you explain the reason behind this? Why should we drop nocallback for user declared functions, but keep it for intrinsics?
>>>> We need to clarify 1).
>>>
>>> Intrinsic attributes are ... intrinsic to the intrinsic :) They must be legal regardless of where and how the intrinsic is used. If the intrinsic would not be nocallback in some circumstance, it cannot be nocallback at all. (This doesn't apply to call-site attributes, which raises the question of whether nocallback can be used as a call-site attribute -- if it can, then your patch would have to clear the attribute at call-sites as well, not just declarations. If it can't, then we have no problem.)
>>
>> I'm ok to keep `nocallback` on intrinsics. Is there any chance that an existing intrinsic violates the restricted module-level `nocallback` semantics?
>
> I don't think so.
>
>> `nocallback` is a `function` attribute, not a `call site` attribute.
>
> Unless there is a verifier check to the contrary, all function attributes are also accepted as call-site attributes by default.

I added support for dropping `nocallback` when it is added on a call-site.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137360



More information about the llvm-commits mailing list