This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dynamic FUNCTION_OUTGOING_VALUE?
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Alexandre Courbot <Alexandre dot Courbot at lifl dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 17 Sep 2003 11:13:33 -0700
- Subject: Re: Dynamic FUNCTION_OUTGOING_VALUE?
- References: <200309171520.17556.Alexandre.Courbot@lifl.fr>
Alexandre Courbot wrote:
Is it possible to get FUNCTION_OUTGOING_VALUE to return something else than a
fixed value based on the type of the return operand? I'd like to have all
functions returning their value into a pseudo-register instead of a fixed
hard one.
Using a pseudo for the return value makes no sense. The only way to
find the value after the function exits is to make sure it is in a known
fixed location. A pseudo is not a known fixed location.
There is also an optimization problem here. A store into a pseudo will
be deleted as dead if it isn't used, so if you put the return value in a
pseudo, the optimizer will delete it as dead.
Internally, gcc will use a pseudo for return values during optimization,
and then copy the pseudo to FUNCTION_OUTGOING_VALUE if it didn't end up
there due to register allocation.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com