[libc-commits] [PATCH] D72102: [libc] Add __attribute__((always_inline)) to x86_64 syscall functions.

Fangrui Song via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jan 6 12:14:47 PST 2020


MaskRay accepted this revision.
MaskRay added inline comments.


================
Comment at: libc/config/linux/x86_64/syscall.h.inc:17
 
-inline long syscall(long __number) {
+__attribute__((always_inline)) inline long syscall(long __number) {
   long retcode;
----------------
abrachet wrote:
> sivachandra wrote:
> > abrachet wrote:
> > > I guess `inline` isn't necessary to keep anymore?
> > I do not know if its unnecessary. I have looked at examples in glibc and they seem to be using the inline keyword along with the inline attribute. But, there are also a small number of examples which only use the attribute and no keyword.
> > 
> > If you are confident the keyword is not necessary anymore, I will remove it :)
> We should just keep it then. It doesn't hurt certainly.
We should keep it. The inline specifier allows it to have more than one definition in all translation units. always_inline does not have the semantic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72102





More information about the libc-commits mailing list