diff options
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r-- | gcc/sched-rgn.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 6df5c33..0ca1a47 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -315,24 +315,20 @@ is_cfg_nonregular (void) if (current_function_has_exception_handlers ()) return 1; - /* If we have non-jumping insns which refer to labels, then we consider - the cfg not well structured. */ + /* If we have insns which refer to labels as non-jumped-to operands, + then we consider the cfg not well structured. */ FOR_EACH_BB (b) FOR_BB_INSNS (b, insn) { - /* Check for labels referred by non-jump insns. */ - if (NONJUMP_INSN_P (insn) || CALL_P (insn)) - { - rtx note = find_reg_note (insn, REG_LABEL, NULL_RTX); - if (note - && ! (JUMP_P (NEXT_INSN (insn)) - && find_reg_note (NEXT_INSN (insn), REG_LABEL, - XEXP (note, 0)))) - return 1; - } + /* Check for labels referred to but (at least not directly) as + jump targets. */ + if (INSN_P (insn) + && find_reg_note (insn, REG_LABEL_OPERAND, NULL_RTX)) + return 1; + /* If this function has a computed jump, then we consider the cfg not well structured. */ - else if (JUMP_P (insn) && computed_jump_p (insn)) + if (JUMP_P (insn) && computed_jump_p (insn)) return 1; } |