[3.4-BIB] fix handling of empty functions for Athlon
Jan Hubicka
jh@suse.cz
Fri Nov 8 04:28:00 GMT 2002
Hi,
I've installed the patch as obivous.
For some reason empty functions are performance critical for DRI and few
other low level stuff.
Honza
Fri Nov 8 13:23:17 CET 2002 Jan Hubicka <jh@suse.cz>
* i386.c (x86_machine_dependent_reorg): Fix handling of empty functions.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.446.2.4
diff -c -3 -p -r1.446.2.4 i386.c
*** i386.c 1 Nov 2002 01:12:28 -0000 1.446.2.4
--- i386.c 8 Nov 2002 12:21:36 -0000
*************** x86_machine_dependent_reorg (first)
*** 14432,14438 ****
if (!returnjump_p (ret) || !maybe_hot_bb_p (bb))
continue;
! prev = prev_nonnote_insn (ret);
if (prev && GET_CODE (prev) == CODE_LABEL)
{
edge e;
--- 14451,14461 ----
if (!returnjump_p (ret) || !maybe_hot_bb_p (bb))
continue;
! prev = prev_active_insn (ret);
! /* Empty functions get branch misspredict even when the jump destination
! is not visible to us. */
! if (!prev && cfun->function_frequency > FUNCTION_FREQUENCY_UNLIKELY_EXECUTED)
! insert = 1;
if (prev && GET_CODE (prev) == CODE_LABEL)
{
edge e;
More information about the Gcc-patches
mailing list