• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Any way to control C++ inlining when using link-time optimization?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Any way to control C++ inlining when using link-time optimization?


  • Subject: Any way to control C++ inlining when using link-time optimization?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 21 Oct 2016 11:59:40 -0700

Link-Time Optimization (LTO) looks pretty great overall, but sometimes I want control over whether a particular C++ function/method gets inlined, and LTO seems to take that away. Anyone know how to get it back?

I know the ‘inline’ keyword doesn’t actually mean “inline this” anymore (instead the compiler uses heuristics to decide on its own), but pre-LTO you could at least disable inlining by omitting the method's implementation from the header file. With LTO, that no longer has an effect, because LTO can inline functions no matter where they’re defined.

Today I tried using __attribute((noinline)) — this appeared to work in regular functions but didn’t work with function templates.

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Where are the Xcode 8 editor extensions?
  • Next by Date: Re: Where are the Xcode 8 editor extensions?
  • Previous by thread: Re: Where are the Xcode 8 editor extensions?
  • Next by thread: C++ lambdas more expensive than blocks?
  • Index(es):
    • Date
    • Thread