summaryrefslogtreecommitdiff
path: root/gcc/shrink-wrap.c
diff options
context:
space:
mode:
authorzqchen <zqchen@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-15 06:54:48 +0000
committerzqchen <zqchen@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-15 06:54:48 +0000
commit59483f68e3dc09f4ce9ac070be4b7c57fc1e5e18 (patch)
tree7b099524607ef851d55ab807f10d94713196c9d1 /gcc/shrink-wrap.c
parent808bdd173056b18aa4d8a0ffd5071dbf1ad5892c (diff)
downloadgcc-59483f68e3dc09f4ce9ac070be4b7c57fc1e5e18.tar.gz
2014-05-15 Zhenqiang Chen <zhenqiang.chen@linaro.org>
* regcprop.h: New file. * regcprop.c (skip_debug_insn_p): New decl. (replace_oldest_value_reg): Check skip_debug_insn_p. (copyprop_hardreg_forward_bb_without_debug_insn.): New function. * shrink-wrap.c: include regcprop.h (prepare_shrink_wrap): Call copyprop_hardreg_forward_bb_without_debug_insn. testsuite/ChangeLog: 2014-05-15 Zhenqiang Chen <zhenqiang.chen@linaro.org> * shrink-wrap-loop.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210458 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/shrink-wrap.c')
-rw-r--r--gcc/shrink-wrap.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index 6f0cd0c99d2..f09cfe7b1f9 100644
--- a/gcc/shrink-wrap.c
+++ b/gcc/shrink-wrap.c
@@ -52,7 +52,7 @@ along with GCC; see the file COPYING3. If not see
#include "params.h"
#include "bb-reorder.h"
#include "shrink-wrap.h"
-
+#include "regcprop.h"
#ifdef HAVE_simple_return
@@ -320,6 +320,15 @@ prepare_shrink_wrap (basic_block entry_block)
df_ref *ref;
bool split_p = false;
+ if (JUMP_P (BB_END (entry_block)))
+ {
+ /* To have more shrink-wrapping opportunities, prepare_shrink_wrap tries
+ to sink the copies from parameter to callee saved register out of
+ entry block. copyprop_hardreg_forward_bb_without_debug_insn is called
+ to release some dependences. */
+ copyprop_hardreg_forward_bb_without_debug_insn (entry_block);
+ }
+
CLEAR_HARD_REG_SET (uses);
CLEAR_HARD_REG_SET (defs);
FOR_BB_INSNS_REVERSE_SAFE (entry_block, insn, curr)