This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] Factor self-referential size trees into functions
> I don't know, I guess in terms of nesting.
I'm not sure whether the language requires support for arbitrary (in the
computer field sense though) nesting levels of variant types. But you can
certainly have many cases at each nesting level and, for the time being, this
is implemented by means of nested COND_EXPRs so you can end up with gigantic
trees full of COND_EXPRs just for one level.
> I was thinking of the walk_tree patch. Of course that does not have
> anything to do with discriminated types, but I remember seeing patches
> to cure exponential cost of discriminated types because they were
> visited repeatedly.
I'm not sure we have underlying exponential behaviour for discriminated types.
We do have underlying exponential behavior in arithmetic expressions when full
checks are activated and we control that by means of artificial SAVE_EXPRs.