This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [mainline/tree-profiling] CFG transparend finish_eh_generation
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 2 Sep 2005 18:28:08 +0930
- Subject: Re: [mainline/tree-profiling] CFG transparend finish_eh_generation
- References: <20040222230041.GD2638@kam.mff.cuni.cz>
Jan, the following change of yours is responsible for PR21460. Can you
remember why you wanted to look for NOTE_INSN_BASIC_BLOCK?
I propose using this instead:
for (fn_begin = get_insns (); ; fn_begin = NEXT_INSN (fn_begin))
if (NOTE_P (fn_begin)
&& NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_FUNCTION_BEG)
break;
insert_insn_on_edge (seq, single_succ_edge (BLOCK_FOR_INSN (fn_begin)));
On Mon, Feb 23, 2004 at 12:00:41AM +0100, Jan Hubicka wrote:
> 2004-02-22 Jan Hubicka <jh@suse.cz>
> * basic-block.h (make_eh_edge, break_superblocks): Declare.
> * cfgbuild.c (make_eh_edge): Make global.
> * cfglayout.c (break_superblocks): Likewise; fix memory leak.
> * except.c (build_post_landing_pads, connect_post_landing_pads,
> dw2_build_landing_pads, sjlj_emit_function_enter,
> sjlj_emit_function_exit, sjlj_emit_dispatch_table,
> sjlj_build_landing_pads): Update CFG.
> (finish_eh_generation): Do not rebuild the CFG.
[snip]
> *************** sjlj_emit_function_enter (rtx dispatch_l
> *** 2107,2115 ****
>
> for (fn_begin = get_insns (); ; fn_begin = NEXT_INSN (fn_begin))
> if (GET_CODE (fn_begin) == NOTE
> ! && NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_FUNCTION_BEG)
> break;
> ! emit_insn_after (seq, fn_begin);
> }
>
> /* Call back from expand_function_end to know where we should put
> --- 2146,2164 ----
>
> for (fn_begin = get_insns (); ; fn_begin = NEXT_INSN (fn_begin))
> if (GET_CODE (fn_begin) == NOTE
> ! && (NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_FUNCTION_BEG
> ! || NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_BASIC_BLOCK))
> break;
> ! if (NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_FUNCTION_BEG)
> ! insert_insn_on_edge (seq, ENTRY_BLOCK_PTR->succ);
> ! else
> ! {
> ! for (; ; fn_begin = NEXT_INSN (fn_begin))
> ! if (GET_CODE (fn_begin) == NOTE
> ! && NOTE_LINE_NUMBER (fn_begin) == NOTE_INSN_FUNCTION_BEG)
> ! break;
> ! emit_insn_after (seq, fn_begin);
> ! }
> }
>
> /* Call back from expand_function_end to know where we should put
--
Alan Modra
IBM OzLabs - Linux Technology Centre