On Wed, Dec 1, 2021 at 2:36 PM Richard Biener
<richard.guent...@gmail.com> wrote:
>
> On Tue, Nov 30, 2021 at 4:48 PM Aldy Hernandez via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> >
> > We are currently restricting loop crossing paths in the generic copier
> > used by the back threader, but we should be able to handle them after
> > loop_done has completed.
>
> But this isn't a cost thing but a correctness (as in, can we update
> loops properly)
> thing.  We are passing 'loop' down to copy_bbs and very much rely on
> seeing either BBs of that loop or copying complete subloops of it.
>
> You will likely see excess loop fixup caused by this or ICEs in case the
> caller of this function will not always set LOOPS_NEED_FIXUP
> (not that copy_bbs handling of loops is perfect).

Ughh, fair enough.

In which case at least I've commented in the PR what the problem is
here.  Perhaps we could benefit from a BB copier that could handle
loops, which is way above my circle of competence ;-).

Aldy

Reply via email to