On Wed, Nov 02, 2011 at 02:03:40AM +1030, Alan Modra wrote:
> Bootstrapped and regression tested powerpc-linux. OK to apply?
> (And I won't be posting any more versions of the patch until this is
> reviewed. Please excuse me for spamming the list.)
Looks reasonable to me, appart from
> * function.c (bb_active_p): Delete.
> (dup_block_and_redirect, active_insn_between): New functions.
> (convert_jumps_to_returns, emit_return_for_exit): New functions,
> split out from..
> (thread_prologue_and_epilogue_insns): ..here. Delete
> shadowing variables. Don't do prologue register clobber tests
> when shrink wrapping already failed. Delete all last_bb_active
> code. Instead compute tail block candidates for duplicating
> exit path. Remove these from antic set. Duplicate tails when
> reached from both blocks needing a prologue/epilogue and
> blocks not needing such.
> * ifcvt.c (dead_or_predicable): Test both flag_shrink_wrap and
> HAVE_simple_return.
> * bb-reorder.c (get_uncond_jump_length): Make global.
> * bb-reorder.h (get_uncond_jump_length): Declare.
> * cfgrtl.c (rtl_create_basic_block): Comment typo fix.
> (rtl_split_edge): Likewise. Warning fix.
> (rtl_duplicate_bb): New function.
> (rtl_cfg_hooks): Enable can_duplicate_block_p and duplicate_block.
>
> Index: gcc/function.c
> ===================================================================
> --- gcc/function.c (revision 180588)
> +++ gcc/function.c (working copy)
> @@ -65,6 +65,8 @@ along with GCC; see the file COPYING3.
> #include "df.h"
> #include "timevar.h"
> #include "vecprim.h"
> +#include "params.h"
> +#include "bb-reorder.h"
This needs corresponding change in Makefile.in, function.o
needs $(PARAMS_H) bb-reorder.h dependencies added.
Ok for trunk with that change if no maintainer objects within 24 hours.
Jakub