+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.
+
2014-09-08 Trevor Saunders <tsaunders@mozilla.com>
* common/config/picochip/picochip-common.c: Remove.
#include "df.h"
#include "vec.h"
#include "dbgcnt.h"
+#include "shrink-wrap.h"
#ifndef HAVE_conditional_move
#define HAVE_conditional_move 0
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)
}
BITMAP_FREE (return_regs);
}
-#endif
}
no_body:
#include "dce.h"
#include "dbgcnt.h"
#include "rtl-iter.h"
+#include "shrink-wrap.h"
struct target_ira default_target_ira;
struct target_ira_int default_target_ira_int;
bitmap_head need_new, reachable;
vec<basic_block> queue;
- if (!flag_shrink_wrap)
+ if (!SHRINK_WRAPPING_ENABLED)
return false;
bitmap_initialize (&need_new, 0);
bitmap_head bb_flags,
rtx_insn *returnjump,
vec<edge> unconverted_simple_returns);
+#define SHRINK_WRAPPING_ENABLED (flag_shrink_wrap && HAVE_simple_return)
+#else
+#define SHRINK_WRAPPING_ENABLED false
#endif
#endif /* GCC_SHRINK_WRAP_H */
+2014-09-09 Zhenqiang Chen <zhenqiang.chen@arm.com>
+
+ * gcc.target/arm/split-live-ranges-for-shrink-wrap.c: New test.
+
2014-09-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/60196
--- /dev/null
+/* { dg-do assemble } */
+/* { dg-options "-mthumb -Os -fdump-rtl-ira " } */
+/* { dg-require-effective-target arm_thumb1_ok } */
+
+int foo (char *, char *, int);
+int test (int d, char * out, char *in, int len)
+{
+ if (out != in)
+ foo (out, in, len);
+ return 0;
+}
+/* { dg-final { object-size text <= 20 } } */
+/* { dg-final { scan-rtl-dump-not "Split live-range of register" "ira" } } */
+/* { dg-final { cleanup-rtl-dump "ira" } } */