Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inline Woes




On May 26, 2006, at 12:45 AM, Eric Albert wrote:

On May 26, 2006, at 12:26 AM, Ben Weiss wrote:

When I remove -fkeep-inline-functions from that one source file, everything links fine. But I still haven't figured out how to generate an optimized but non-inlined version of my code, for profiling purposes. Any suggestions? (This is all happening with x86 code on a MacBook Pro. XCode 2.3, Shark 4.3.3 (4).)

Tag the function with __attribute__((noinline)), as described at <http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/ gcc/Function-Attributes.html>.

Brilliant; thanks!

Oddly, this requires that static functions be prototyped separately; these attributes cannot be incorporated into the static function definitions. Small price to pay.

Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Inline Woes (From: Ben Weiss <email@hidden>)
 >Re: Inline Woes (From: Eric Albert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.