Re: inlining
Re: inlining
- Subject: Re: inlining
- From: "Clark Cox" <email@hidden>
- Date: Mon, 17 Dec 2007 11:53:15 -0800
Every build setting in Xcode is handled in this manner. It is quote
helpful when you have a project that has many targets that mostly
share identical settings. This allows one to set the common settings
once (at the project level), and only use the target-level settings
for the exceptions that are actually target-specific.
On 12/17/07, David Rowland <email@hidden> wrote:
>
> 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
>
--
Clark S. Cox III
email@hidden
_______________________________________________
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