* regcprop.c (copyprop_hardreg_forward_1): Remove noop moves.
From-SVN: r240365
This commit is contained in:
parent
2dbe56bdfb
commit
d6da226a1e
@ -1,3 +1,7 @@
|
|||||||
|
2016-09-22 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
|
* regcprop.c (copyprop_hardreg_forward_1): Remove noop moves.
|
||||||
|
|
||||||
2016-09-22 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
2016-09-22 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
||||||
|
|
||||||
* emit-rtl.c (next_cc0_user): Make argument type rtx_insn *.
|
* emit-rtl.c (next_cc0_user): Make argument type rtx_insn *.
|
||||||
|
@ -771,6 +771,26 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
set = single_set (insn);
|
set = single_set (insn);
|
||||||
|
|
||||||
|
/* Detect noop sets and remove them before processing side effects. */
|
||||||
|
if (set && REG_P (SET_DEST (set)) && REG_P (SET_SRC (set)))
|
||||||
|
{
|
||||||
|
unsigned int regno = REGNO (SET_SRC (set));
|
||||||
|
rtx r1 = find_oldest_value_reg (REGNO_REG_CLASS (regno),
|
||||||
|
SET_DEST (set), vd);
|
||||||
|
rtx r2 = find_oldest_value_reg (REGNO_REG_CLASS (regno),
|
||||||
|
SET_SRC (set), vd);
|
||||||
|
if (rtx_equal_p (r1 ? r1 : SET_DEST (set), r2 ? r2 : SET_SRC (set)))
|
||||||
|
{
|
||||||
|
bool last = insn == BB_END (bb);
|
||||||
|
fprintf (stderr, "Bingo\n");
|
||||||
|
delete_insn (insn);
|
||||||
|
if (last)
|
||||||
|
break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extract_constrain_insn (insn);
|
extract_constrain_insn (insn);
|
||||||
preprocess_constraints (insn);
|
preprocess_constraints (insn);
|
||||||
const operand_alternative *op_alt = which_op_alt ();
|
const operand_alternative *op_alt = which_op_alt ();
|
||||||
@ -860,7 +880,9 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
|
|||||||
register in the same class. */
|
register in the same class. */
|
||||||
if (REG_P (SET_DEST (set)))
|
if (REG_P (SET_DEST (set)))
|
||||||
{
|
{
|
||||||
new_rtx = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd);
|
new_rtx = find_oldest_value_reg (REGNO_REG_CLASS (regno),
|
||||||
|
src, vd);
|
||||||
|
|
||||||
if (new_rtx && validate_change (insn, &SET_SRC (set), new_rtx, 0))
|
if (new_rtx && validate_change (insn, &SET_SRC (set), new_rtx, 0))
|
||||||
{
|
{
|
||||||
if (dump_file)
|
if (dump_file)
|
||||||
|
Loading…
Reference in New Issue
Block a user