This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
On Sun, Jul 27, 2008 at 5:01 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Sun, Jul 27, 2008 at 4:55 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> How about a switch to apply a specific set of optimization to all cold
>> functions, like -Os -mpreferred-stack-boundary=2? Of cause, it should
>> be off by default.
>
> Why not just better tune the compiler? Seriously what is happening is
> that are marking functions which are not really cold. I don't see it
> is better to turn this off by default or even have a switch. The
> compiler should be smart enough to figure out if a function is cold or
> not. I don't see why we should turn this off by default at all. I
> guess you don't understand what this is good for really. I think the
> issue is what is a cold function and what is a hot function. A cold
> function to me means it will almost never be called or only called
> during startup time so the time it takes is no use really compared in
> the size savings that I would get. Most developers don't care if you
> supply the compiler with -O2 or -Os, they really want the best
> optimizations out of the compiler including code size reduction for
> the coldest functions.
>
> What is the definition of a cold function to you?
>
You don't know how often a function will be called unless you do
profile guided optimization.
--
H.J.
- References:
- [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
- Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
- Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
- Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
- Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
- Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
- Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)
- Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)