diff options
author | Alan Modra <amodra@gmail.com> | 2011-11-09 11:50:14 +1030 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2011-11-09 11:50:14 +1030 |
commit | ffe1468659b160f34f296a3879a0894e45e644ba (patch) | |
tree | baff6cd042f250e9fc891b81960ba3c328cc11eb /gcc/ifcvt.c | |
parent | dce5eb107dfddc1c8bcd04d4f12f34fb7b72964e (diff) | |
download | gcc-ffe1468659b160f34f296a3879a0894e45e644ba.zip gcc-ffe1468659b160f34f296a3879a0894e45e644ba.tar.gz gcc-ffe1468659b160f34f296a3879a0894e45e644ba.tar.bz2 |
function.c (bb_active_p): Delete.
* 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.
* Makefile.in (function.o): Update dependencies.
From-SVN: r181188
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index e8fa0bd..ce60ce2 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -4167,13 +4167,14 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb, if (NONDEBUG_INSN_P (insn)) df_simulate_find_defs (insn, merge_set); +#ifdef HAVE_simple_return /* If shrink-wrapping, disable this optimization when test_bb is the first basic block and merge_bb exits. The idea is to not move code setting up a return register as that may clobber a register used to pass function parameters, which then must be saved in caller-saved regs. A caller-saved reg requires the prologue, killing a shrink-wrap opportunity. */ - if ((flag_shrink_wrap && !epilogue_completed) + if ((flag_shrink_wrap && HAVE_simple_return && !epilogue_completed) && ENTRY_BLOCK_PTR->next_bb == test_bb && single_succ_p (new_dest) && single_succ (new_dest) == EXIT_BLOCK_PTR @@ -4224,6 +4225,7 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb, } BITMAP_FREE (return_regs); } +#endif } no_body: |