C++ delayed folding branch review

Jason Merrill jason@redhat.com
Fri Jul 31 16:53:00 GMT 2015


On 07/31/2015 12:46 PM, Jakub Jelinek wrote:
> 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.
>>
>> 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?

That certainly sounds simpler.

Jason




More information about the Gcc-patches mailing list