On killing SAVE_EXPR
Richard Henderson
rth@redhat.com
Tue Feb 13 14:53:00 GMT 2001
On Tue, Feb 13, 2001 at 05:28:37PM -0500, Richard Kenner wrote:
> The instance I'm most familiar is in tail-call elimination. Here we
> generate two code sequences -- one as a normal call and one as a
> tail-call or tail-recursion. At some point later we'll select one
> sequence or the other depending on whether the tail-call sequence is
> actually legitimate.
>
> Well that one isn't a problem since you'll only select one to generate
> code for.
Incorrect. We generate code for both cases, and discard one
sequence later. It _is_ a problem. Look near calls.c:2486
for what is done to address this problem.
> A third instance involves inlining at the tree level. In this case
> we've spliced one function into others, potentially many times.
> Naturally all copies are present in the output.
>
> Don't we *copy* trees in that case?
Apparently. I hadn't recalled that. Though apparently we go
through some effort to make sure that we dtrt with save_expr.
r~
More information about the Gcc
mailing list