summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authornemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-15 22:18:34 +0000
committernemet <nemet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-15 22:18:34 +0000
commit47730c87d86d5cbaf98c9dfc492367522f471948 (patch)
tree0befb5f9dc236afbc37fa0753d23a2b5c9ee9a08 /gcc/reorg.c
parentcac0aa5ae50ff1c27722586c2febc15e44b9752e (diff)
downloadgcc-47730c87d86d5cbaf98c9dfc492367522f471948.tar.gz
PR bootstrap/41349
* reorg.c (redundant_insn): Don't count notes or DEBUG_INSNs when trying to limit the extent of searches in the insn stream. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151731 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index 4453ccabca6..4871b0e8c29 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -1630,13 +1630,14 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
for (trial = PREV_INSN (target),
insns_to_search = MAX_DELAY_SLOT_INSN_SEARCH;
trial && insns_to_search > 0;
- trial = PREV_INSN (trial), --insns_to_search)
+ trial = PREV_INSN (trial))
{
if (LABEL_P (trial))
return 0;
- if (! INSN_P (trial))
+ if (!NONDEBUG_INSN_P (trial))
continue;
+ --insns_to_search;
pat = PATTERN (trial);
if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
@@ -1735,10 +1736,11 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
for (trial = PREV_INSN (target),
insns_to_search = MAX_DELAY_SLOT_INSN_SEARCH;
trial && !LABEL_P (trial) && insns_to_search > 0;
- trial = PREV_INSN (trial), --insns_to_search)
+ trial = PREV_INSN (trial))
{
- if (!INSN_P (trial))
+ if (!NONDEBUG_INSN_P (trial))
continue;
+ --insns_to_search;
pat = PATTERN (trial);
if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)