aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorZhenqiang Chen <zhenqiang.chen@arm.com>2014-09-09 05:30:36 +0000
committerZhenqiang Chen <zqchen@gcc.gnu.org>2014-09-09 05:30:36 +0000
commita5e022d5d6b2921c5e4ca19bc366d87dd0195d01 (patch)
treefa424604153880fba58f911b58a8fd6e973ae8d9 /gcc/ifcvt.c
parent157e859ffe3b5d43db1e19475711c1a3d21ab57a (diff)
downloadgcc-a5e022d5d6b2921c5e4ca19bc366d87dd0195d01.zip
gcc-a5e022d5d6b2921c5e4ca19bc366d87dd0195d01.tar.gz
gcc-a5e022d5d6b2921c5e4ca19bc366d87dd0195d01.tar.bz2
shrink-wrap.h: #define SHRINK_WRAPPING_ENABLED.
ChangeLog: 2014-09-09 Zhenqiang Chen <zhenqiang.chen@arm.com> * shrink-wrap.h: #define SHRINK_WRAPPING_ENABLED. * ira.c: #include "shrink-wrap.h" (split_live_ranges_for_shrink_wrap): Use SHRINK_WRAPPING_ENABLED. * ifcvt.c: #include "shrink-wrap.h" (dead_or_predicable): Use SHRINK_WRAPPING_ENABLED. testsuite/ChangeLog: 2014-09-09 Zhenqiang Chen <zhenqiang.chen@arm.com> * gcc.target/arm/split-live-ranges-for-shrink-wrap.c: New test. From-SVN: r215041
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index bce9fb3..ed30a59 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -42,6 +42,7 @@
#include "df.h"
#include "vec.h"
#include "dbgcnt.h"
+#include "shrink-wrap.h"
#ifndef HAVE_conditional_move
#define HAVE_conditional_move 0
@@ -4288,14 +4289,13 @@ 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 && HAVE_simple_return && !epilogue_completed)
+ if ((SHRINK_WRAPPING_ENABLED && !epilogue_completed)
&& ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb == test_bb
&& single_succ_p (new_dest)
&& single_succ (new_dest) == EXIT_BLOCK_PTR_FOR_FN (cfun)
@@ -4342,7 +4342,6 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
}
BITMAP_FREE (return_regs);
}
-#endif
}
no_body: