On Sat, Sep 6, 2025 at 3:46 PM Jakub Jelinek <[email protected]> wrote:
>
> On Sat, Sep 06, 2025 at 03:27:53PM -0700, Andrew Pinski wrote:
> > This new pass will ICE if the target does not define the macro_fusion_pair_p
> > pass. The pass will not be useful in that case so it is best to return
> > early.
> >
> > Pushed as obvious after a bootstrap on x86_64-linux-gnu.
> >
> >       PR rtl-optimization/121835
> > gcc/ChangeLog:
> >
> >       * dep-fusion.cc (pass_dep_fusion::execute): Return early if
> >       macro_fusion_pair_p is null.
>
> Why not add
>   && targetm.sched.macro_fusion_pair_p
> to pass_dep_fusion::gate() instead?
> You wouldn't get a useless dump file then.

I was thinking about that too, the problem with that is the way
-fdump-passes works that if a target conditionally defines
macro_fusion_pair_p based on options, -fdump-passes will not be
correct. Maybe the problem is with how -fdump-passes figures out if a
dump is enabled/disabled though.

Thanks,
Andrew

>
>         Jakub
>

Reply via email to