diff options
author | Zhenqiang Chen <zhenqiang.chen@linaro.org> | 2014-05-15 06:54:48 +0000 |
---|---|---|
committer | Zhenqiang Chen <zqchen@gcc.gnu.org> | 2014-05-15 06:54:48 +0000 |
commit | a2e6c10cbd7ff6f51052d5a550b4bf999189aa31 (patch) | |
tree | 7b099524607ef851d55ab807f10d94713196c9d1 /gcc/shrink-wrap.c | |
parent | e974b93b6cb75eb6828918fb4bb8454ed8249096 (diff) | |
download | gcc-a2e6c10cbd7ff6f51052d5a550b4bf999189aa31.zip gcc-a2e6c10cbd7ff6f51052d5a550b4bf999189aa31.tar.gz gcc-a2e6c10cbd7ff6f51052d5a550b4bf999189aa31.tar.bz2 |
regcprop.h: New file.
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.
From-SVN: r210458
Diffstat (limited to 'gcc/shrink-wrap.c')
-rw-r--r-- | gcc/shrink-wrap.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c index 6f0cd0c..f09cfe7 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) |