This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: On killing SAVE_EXPR
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: On killing SAVE_EXPR
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 13 Feb 2001 14:52:54 -0800
- Cc: gcc at gcc dot gnu dot org
- References: <10102132228.AA22219@vlsi1.ultra.nyu.edu>
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~