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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 5 01:50:00 PDT 2022


nikic added a comment.

I don't think this implementation is correct, but I'm also not entirely sure in which cases you want to drop the attribute and in which you want to retain it. I'd suggest to have the following test cases:

- A nocallback intrinsic, where the attribute should never be dropped.
- A nocallback definition.
- A nocallback declaration with a definition that is being linked in.
- A nocallback declaration without a definition being linked in.

Additionally, how does this interact with inference? Say we originally had a call to a nocallback declaration in a function, then inference determines that that function is nocallback as well (that would be legal, right?) In that case we might have to clear that nocallback attribute as well. So I think at point we have to drop all (non-intrinsic) nocallback attributes in the module?


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