Commit 8c8fe663 by Tom de Vries Committed by Tom de Vries

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
parent 5dad1619
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment