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

--- Comment #20 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 28 Jul 2023, hubicka at ucw dot cz wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106293
> 
> --- Comment #19 from Jan Hubicka <hubicka at ucw dot cz> ---
> > This heuristic wants to catch
> > 
> >   <sink stmt>
> >   if (foo) abort ();
> >   <place to sink>
> > 
> > and avoid sinking "too far" across a path with "similar enough"
> > execution count (I think the original motivation was to fix some
> > spilling / register pressure issue).  The loop depth test
> > should be !(bb_loop_depth (best_bb) < bb_loop_depth (early_bb))
> 
> I am still concenred that loop_depth (bb1) < loop_depth (bb2)
> does not really imply that bb1 is not in different loop nest with
> loop with significantly higher iteration count than bb2...

True, so it probably should be instead

  !flow_loop_nested_p (early_bb->loop_father, best_bb->loop_father)

Reply via email to