This is the mail archive of the 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 - updated] New Optimization: Partitioning hot & cold basic blocks

> >The following patch implements an optimization we have had in the 
> >Apple version of gcc for
> >the past 6 months, and which we would like the FSF gcc community to 
> >adopt.  This

This is something I was thinking about for a while.  How do you deal
with debug info and unwind tables?
> Index: gcc/cfgcleanup.c
> ===================================================================
> RCS file: /cvsroot/gcc/gcc/gcc/cfgcleanup.c,v
> retrieving revision 1.95
> diff -c -3 -p -r1.95 cfgcleanup.c
> *** gcc/cfgcleanup.c	16 Sep 2003 21:14:41 -0000	1.95
> --- gcc/cfgcleanup.c	9 Oct 2003 22:47:14 -0000
> *************** static bool mark_effect (rtx, bitmap);
> *** 85,90 ****
> --- 85,92 ----
>   static void notice_new_block (basic_block);
>   static void update_forwarder_flag (basic_block);
>   static int mentions_nonequal_regs (rtx *, void *);
> + bool has_section_boundary_note (basic_block);
> + bool has_dont_shorten_note (basic_block);

I would much preffer to store this in cfg datastructure and emit this
note just before we destroy the CFG.  In general I would like to remove
use for INSN_NOTES from any cfg aware code.

> + 
> + static void update_unlikely_executed_notes (basic_block);
> + extern bool has_dont_shorten_branch (basic_block);

Doing that all this fun would go away I would guess.
All you need is to modify make_nonfallthru_and_redirect to keep new
basic block in the same section.

SGI-pro has notion of regions of functions, we probably can imitate
similar design in this.


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