2015-09-18 18:31 GMT+02:00 Jason Merrill <ja...@redhat.com>:
> On 09/18/2015 02:19 AM, Kai Tietz wrote:
>>
>> Hi Jason,
>>
>> Sounds like an interesting idea.  Do have already a specific approach in
>> mind?
>>
>> My idea might be just hard to model, as we aren't sure we walked
>> before the complete chain.  Due cp_fold is caching, we won't try to
>> fold an expression a second time, but we don't cover all EXPRs in
>> cp_fold, which makes it hard to tell, if we ended up walking the
>> complete expression-tree, or ended on an unknown expression.
>> So we could add to cp_fold an additional return-value, which indicates
>> if we ended with an unknown expression (means default statement).
>> This we could use later on to decided if we need to walk sub-tree, or
>> not.  Not sure if that is best approach, but it could help to avoid
>> some double runs.
>
>
> That makes sense, but maybe cp_fold should handle all expressions?

This is for sure an option, but something to be checked with successor
of this task.

>
>> 2015-09-17 8:10 GMT+02:00 Jason Merrill <ja...@redhat.com>:
>>>
>>> I think we want to clear *walk_subtrees a lot more often in cp_fold_r; as
>>> it
>>> is, for most expressions we end up calling cp_fold on the
>>> full-expression,
>>> then uselessly on the subexpressions after we already folded the
>>> containing
>>> expression.
>
>

Reply via email to