> From: Eric Botcazou <botca...@adacore.com>
> CC: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
> Date: Fri, 11 Sep 2020 13:09:48 +0200
> received-spf: None (smtp1.axis.com: no sender authenticity  information
>  available from domain of  postmas...@mail-wr1-f54.google.com) identity=helo;
>   client-ip=209.85.221.54; receiver=smtp1.axis.com;
>   envelope-from="botca...@adacore.com";
>   x-sender="postmas...@mail-wr1-f54.google.com";
>   x-conformance=sidf_compatible
> Old-Content-Type: multipart/alternative;
>       boundary="_000_2479570Ksvo8Q1nxZfomalhaut_"
> Content-Type: text/plain; charset=iso-8859-1
> 
> > @@ -2618,6 +2643,16 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx
> > condition, lose = 1;
> >        mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL);
> >        mark_referenced_resources (trial, &needed, true);
> > +      if (filter_flags)
> > +   {
> > +     mark_set_resources (trial, &fset, 0, MARK_SRC_DEST_CALL);
> > +
> > +     /* Groups of flags-register setters with users should not
> > +        affect opportunities to move flags-register-setting insns
> > +        (clobbers) into the delay-slot.  */
> > +     CLEAR_HARD_REG_BIT (needed.regs, targetm.flags_regnum);
> > +     CLEAR_HARD_REG_BIT (fset.regs, targetm.flags_regnum);
> > +   }
> 
> Don't you need to put the new block before mark_referenced_resources (as I 
> did 
> in fill_simple_delay_slots) in case the needed insn reads the flags register?

It can't be needed, as the flags register is dead in the insn with the
delay-slot, as part of the filter_flags condition.

brgds, H-P

Reply via email to