This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ delayed folding branch review
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Jeff Law <law at redhat dot com>, Kai Tietz <ktietz at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 31 Jul 2015 18:46:38 +0200
- Subject: Re: C++ delayed folding branch review
- Authentication-results: sourceware.org; auth=none
- References: <557BAE5A dot 7030309 at redhat dot com> <55B661A1 dot 6090308 at redhat dot com> <CAEwic4ZQomb_en7o4=n40j8cHU6-TXmhoSOZZOshiw1Pkgi0Bg at mail dot gmail dot com> <CAEwic4YufFNkdjaXxW0e1ExaGJk0xWwT8FJfiekJWa_mzVsxOQ at mail dot gmail dot com> <55B911DD dot 30105 at redhat dot com> <CAEwic4Z-MgOwdyY_GTP+hGrK6qHgRoys8d4Tj_kHMri7oGuqHQ at mail dot gmail dot com> <55BA5667 dot 9040200 at redhat dot com> <55BAE20A dot 1070400 at redhat dot com> <55BB9EDB dot 8030305 at redhat dot com> <CAEwic4ZS-MafrM-OQaNOm-N1+kzUaLm-FUTp6s_90YE_7b6gAA at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jul 31, 2015 at 06:25:57PM +0200, Kai Tietz wrote:
> 2015-07-31 18:14 GMT+02:00 Jason Merrill <jason@redhat.com>:
> > On 07/30/2015 10:48 PM, Jeff Law wrote:
> >>
> >> Note, anything outside of the C/C++ front-ends depending on that
> >> canonicalization done by shorten_compare is, IMHO, broken.
> >
> >
> > I think the OMP code isn't relying on it being done by shorten_compare; it's
> > trying to do it itself in c_finish_omp_for but is somehow thwarted by
> > delayed folding.
> >
> > Jason
> >
>
> Well, this seems to be reasoned by finish_omp_for (), which gets
> invoked in parser.c cp_parser_omp_for_loop, and/or pt.c: tsubst_expr.
> In all those cases arguments aren't folded anymore. So
> c_finish_omp_for's patterns don't match anymore. I guess we might
> want to do this cannonical form in genericize-pass?
Or just fold in finish_omp_for before calling c_finish_omp_for, so that it
is in the expected form?
Jakub