[PATCH] D131628: [LangRef] Add description for nocallback attribute

Gulfem Savrun Yeniceri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 16:41:50 PDT 2022


gulfem added a comment.



> That shows the linker already drops the nocallback attribute. However, it seems the linker only drops the attribute when linking in the definition. But I don't think this is sufficient. nocallback means you don't call any function in that file. Once you bring in more functions you can't ensure you won't call those extra functions. You'll get the call graph potentially wrong.

I don't think `nocallback` means you don't call any function in that file. Functions with `leaf` attributes can still call other functions, even functions in other translation units based on GCC spec.

  Leaf functions might still call functions from other compilation units and thus they are not necessarily leaf in the sense that they contain no function calls at all. 

Are we on the same page on that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131628



More information about the llvm-commits mailing list