This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unnecessary call to mark_temp_addr_taken in calls.c (related to pr25505)?


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]