This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, committed] Function specific option changes (IA-64, hot/cold, scheduling)


On Mon, Jul 28, 2008 at 5:23 PM, Michael Meissner <gnu@the-meissners.org> wrote:
> On Sun, Jul 27, 2008 at 08:10:17PM -0400, Daniel Berlin wrote:
>> On Sun, Jul 27, 2008 at 8: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 would agree with this.
>>
>> At Google we have seen some serious performance regressions because
>> the definition of cold function seems mildly broken in some way
>> (haven't analyzed yet) and marked *some of the hottest functions we
>> have* as cold.
>
> One of the things Honza mentioned was cold functions inlining hot functions
> (presumably this should turn the cold function into a hot function).  Note, if
> ports need to change the rtl timings for optimize space, the
> TARGET_SET_CURRENT_FUNCTION hook is the place to do this.

Sorry, but you want to switch this per basic-block instead, not on a
function level.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]