https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96015

--- Comment #34 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Eric, thoughts?

Another possibility would be to remove the problematic barriers during the
barriers pass that is run just before reorg:

/* Some old code expects exactly one BARRIER as the NEXT_INSN of a
   non-fallthru insn.  This is not generally true, as multiple barriers
   may have crept in, or the BARRIER may be separated from the last
   real insn by one or more NOTEs.

   This simple pass moves barriers and removes duplicates so that the
   old code is happy.
 */
static unsigned int
cleanup_barriers (void)

but this may void the fix for PR rtl-optimization/81025.

In the end I think that the safest route is indeed probably to patch the hot
spot in relax_delay_slots.  There is already a similar guard for text section
switches by means of switch_text_sections_between_p.  The condition would be
LABEL_NUSES of 
JUMP_LABEL equal to 1 and presence of a BARRIER between the jump and next
insns.

Reply via email to