This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cfg merge part 10 - BB duplication framework
- From: Jan Hubicka <jh at suse dot cz>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org,gcc-pdo at atrey dot karlin dot mff dot cuni dot cz
- Date: Tue, 7 May 2002 12:14:45 +0200
- Subject: Re: cfg merge part 10 - BB duplication framework
- References: <20020306183052.GC8372@atrey.karlin.mff.cuni.cz> <20020506150738.E13494@redhat.com>
> 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~