[PATCH] D137360: [Linker] Remove nocallback attribute while linking
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 10:02:26 PST 2022
nikic added a comment.
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.
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