jump.c (delete_related_insns): Keep (use (insn))s.

gcc/
	* jump.c (delete_related_insns): Keep (use (insn))s.
	* reorg.c (redundant_insn): Check for barriers too.

From-SVN: r206749
This commit is contained in:
Richard Sandiford 2014-01-18 10:12:22 +00:00 committed by Richard Sandiford
parent 1e99bee598
commit 04da56800d
3 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-01-18 Richard Sandiford <rdsandiford@googlemail.com>
* jump.c (delete_related_insns): Keep (use (insn))s.
* reorg.c (redundant_insn): Check for barriers too.
2014-01-17 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_split_lea_for_addr): Fix a comment

View File

@ -1355,6 +1355,13 @@ delete_related_insns (rtx insn)
/* Keep going past other deleted labels to delete what follows. */
else if (code == CODE_LABEL && INSN_DELETED_P (next))
next = NEXT_INSN (next);
/* Keep the (use (insn))s created by dbr_schedule, which needs
them in order to track liveness relative to a previous
barrier. */
else if (INSN_P (next)
&& GET_CODE (PATTERN (next)) == USE
&& INSN_P (XEXP (PATTERN (next), 0)))
next = NEXT_INSN (next);
else if (code == BARRIER || INSN_P (next))
/* Note: if this deletes a jump, it can cause more
deletion of unreachable code, after a different label.

View File

@ -1512,7 +1512,10 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
trial && insns_to_search > 0;
trial = PREV_INSN (trial))
{
if (LABEL_P (trial))
/* (use (insn))s can come immediately after a barrier if the
label that used to precede them has been deleted as dead.
See delete_related_insns. */
if (LABEL_P (trial) || BARRIER_P (trial))
return 0;
if (!INSN_P (trial))