This is the mail archive of the
mailing list for the GCC project.
Re: Unnecessary call to mark_temp_addr_taken in calls.c (related to pr25505)?
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: jconner at apple dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 21 Aug 2006 18:53:52 EDT
- Subject: Re: Unnecessary call to mark_temp_addr_taken in calls.c (related to pr25505)?
- References: <44EA29D7.email@example.com>
> So, my question is: is it really necessary to mark this location as
> having its address taken? Yes, the address of the slot is passed to a
> function, however I can't imagine any instances where the function
> retaining that address after the call would be valid.
Your tracing below confirms my recollection that I was the one who added that
code. Unfortunately, it came in as a merge from another tree, so it's going
to be hard to do the archeology to figure out what it was added for, but the
history certainly suggests to me that there *was* some test case when it did
have a longer life and that's why it was added. Remember that all this stuff
is very sensitive to calling sequences so you may not be able to find it on
one or two machines (e.g., try Sparc). I suspect the test case involved
something like two calls to the same function (that returns a structure)
within the parameter list to a third function.
My strong suggestion is to leave this alone. The benefits in terms of
increased optimization opportunities is small and the costs if it
*does* cause wrong code to be generated is large because we know it'll
be an obscure and hard-to-find case.