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: cfg merge part 10 - BB duplication framework


> On Wed, Mar 06, 2002 at 07:30:52PM +0100, Jan Hubicka wrote:
> > 	* cfglayout.c (fixup_reorder_chain): Dump duplicated
> > 	(cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
> > 	cfg_layout_duplicate_bb): New global function.
> > 	(duplicate_insn_chain): New static function.
> > 	* cfglayout.h (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
> > 	cfg_layout_duplicate_bb): Declare.
> > 	(struct reorder_block_def): Add "original" field.
> > 	* emit-rtl.c (emit_copy_of_insn_after): New function.
> > 	* rtl.h (emit_copy_of_insn_after): Declare.
> 
> Ok except,
> 
> > +   int old_index = dest->index;
> > + 
> > +   /* Avoid redirect_edge_and_branch from overactive optimizing.  */
> > +   dest->index = n_basic_blocks + 1;
> 
> What in the world is this?
The basic block are in random order, but redirect_edge_and_branch may come
to idea to create fallthru edge where it wasn't.  This caused problems
in the past with the basic block boundaries, now it can work, as I get
rid of the barriers later anyway, but I would perffer the "optimization"
to not happen.

I will install the patch as it is and we may decide to do differently.

Honza
> 
> 
> r~


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