mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 20:41:10 +08:00
Handle copy cycles in pass_cprop_hardreg
2014-10-17 Tom de Vries <tom@codesourcery.com> PR rtl-optimization/61605 * regcprop.c (copyprop_hardreg_forward_1): Add copy_p and noop_p. Don't notice stores for noops. Don't regard noops as copies. From-SVN: r216364
This commit is contained in:
parent
5dad161975
commit
8c8fe66309
@ -1,3 +1,9 @@
|
||||
2014-10-17 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
PR rtl-optimization/61605
|
||||
* regcprop.c (copyprop_hardreg_forward_1): Add copy_p and noop_p. Don't
|
||||
notice stores for noops. Don't regard noops as copies.
|
||||
|
||||
2014-10-17 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/cpuid.h (__cpuid): Remove definitions that handle %ebx
|
||||
|
@ -1047,12 +1047,21 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
|
||||
}
|
||||
}
|
||||
|
||||
/* Notice stores. */
|
||||
note_stores (PATTERN (insn), kill_set_value, &ksvd);
|
||||
bool copy_p = (set
|
||||
&& REG_P (SET_DEST (set))
|
||||
&& REG_P (SET_SRC (set)));
|
||||
bool noop_p = (copy_p
|
||||
&& rtx_equal_p (SET_DEST (set), SET_SRC (set)));
|
||||
|
||||
/* Notice copies. */
|
||||
if (set && REG_P (SET_DEST (set)) && REG_P (SET_SRC (set)))
|
||||
copy_value (SET_DEST (set), SET_SRC (set), vd);
|
||||
if (!noop_p)
|
||||
{
|
||||
/* Notice stores. */
|
||||
note_stores (PATTERN (insn), kill_set_value, &ksvd);
|
||||
|
||||
/* Notice copies. */
|
||||
if (copy_p)
|
||||
copy_value (SET_DEST (set), SET_SRC (set), vd);
|
||||
}
|
||||
|
||||
if (insn == BB_END (bb))
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user