• 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
Re: inlining
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inlining


  • Subject: Re: inlining
  • From: David Rowland <email@hidden>
  • Date: Mon, 17 Dec 2007 10:34:09 -0800


On Dec 17, 2007, at 8:14 AM, Sanjay Patel wrote:


--- Steve Checkoway <email@hidden> wrote:


On Dec 16, 2007, at 12:39 PM, Greg Guerin wrote:

Steve Checkoway wrote:

$ gcc -Wall -O3 inline.c -S

Which suggests it's the OP's optimization-level setting that leads to the lack of inlining.


That or since the function isn't declared as static, it is being
exported and thus since there is an out of line copy, it looks like it
hasn't been inlined when in fact, it has. I'm not sure if in "produce
out of line code with jump and return instructions" the jump and
return instructions refer to the out of line copy or the calling
function.

The OP didn't say if he was expecting inlining across files. Mainstream GCC
doesn't have this ability afaik.

Thanks to all. I just wanted to inline in one module. The key was setting the optimization level of the target to any value above "none". The next question is how far the compiler will go (how many levels of function calls) to do the inlining. I assume the limit is not small.


I notice that the optimization level can be set at the target and at the project level. But the target always overrides the project, so why even have it as a project option?

David

_______________________________________________
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


  • Follow-Ups:
    • Re: inlining
      • From: "Clark Cox" <email@hidden>
    • Re: inlining
      • From: Steve Checkoway <email@hidden>
References: 
 >Re: inlining (From: Sanjay Patel <email@hidden>)

  • Prev by Date: Re: newbie to XCode
  • Next by Date: Re: Full-Text search in Doc Update 201.1 crashes Xcode
  • Previous by thread: Re: inlining
  • Next by thread: Re: inlining
  • Index(es):
    • Date
    • Thread