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

--- Comment #11 from Roman Zhuykov <zhroma at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #9)

Thank you, I'm glad to see new ideas and some discussion.

> On the testcase itself
> 
> diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
> index 77254b31b42..66260fa34f1 100644
> --- a/gcc/modulo-sched.c
> +++ b/gcc/modulo-sched.c
> @@ -1347,8 +1347,7 @@ sms_schedule (void)
>    edge latch_edge;
>    HOST_WIDE_INT trip_count, max_trip_count;
>  
> -  loop_optimizer_init (LOOPS_HAVE_PREHEADERS
> -                      | LOOPS_HAVE_RECORDED_EXITS);
> +  loop_optimizer_init (AVOID_CFG_MODIFICATIONS);
>    if (number_of_loops (cfun) <= 1)
>      {
>        loop_optimizer_finalize ();
> 
> works.
Unfortunately, this brokes the whole SMS workflow.  See e.g. loop_canon_p
function and a call to single_exit inside.  I've actually tried only improved
(with all my patches) master version and only few examples, but with
AVOID_CFG_MODIFICATIONS some of them bailout with "SMS loop many exits" instead
of succesfully passing analysis and transformation phases with "SMS succeeded".

Reply via email to