[tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute

Richard Biener richard.guenther@gmail.com
Tue Nov 9 07:17:34 GMT 2021


On Tue, Nov 9, 2021 at 7:34 AM Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
>
> On Mon, 8 Nov 2021 at 16:42, Richard Biener <richard.guenther@gmail.com> wrote:
> >
> > On Mon, Nov 8, 2021 at 12:06 PM Prathamesh Kulkarni via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> > >
> > > Hi,
> > > The attached patch removes redundant check for number of loops in
> > > pass_vectorize::execute,
> > > since it only calls vectorize_loops, and in vectorize_loops, we
> > > immediately bail out if no loops are present:
> > >   vect_loops_num = number_of_loops (cfun);
> > >   /* Bail out if there are no loops.  */
> > >   if (vect_loops_num <= 1)
> > >     return 0;
> > >
> > > Is the patch OK to commit ?
> >
> > Can you please merge both functions then, keeping only
> > pass_vectorize::execute (and replacing 'cfun' occurrences
> > by 'fun' as passed as argument)?
> Done in the attached patch, does it look OK ?

OK.

Thanks,
Richard.

> Thanks,
> Prathamesh
> >
> > Thanks,
> > Richard.
> >
> > >
> > > Thanks,
> > > Prathamesh


More information about the Gcc-patches mailing list