This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using mem_attrs to get the tree of a function being called?
- From: Richard Henderson <rth at redhat dot com>
- To: Alexandre Courbot <Alexandre dot Courbot at lifl dot fr>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 30 Apr 2003 17:03:17 -0700
- Subject: Re: Using mem_attrs to get the tree of a function being called?
- References: <200304301652.08784.Alexandre.Courbot@lifl.fr>
On Wed, Apr 30, 2003 at 04:52:08PM +0200, Alexandre Courbot wrote:
> Are mem_attrs not used when dealing with functions?
No.
> If so, is there any good reason why this is so or shall I go ahead
> and try to implement it?
No, there's no good reason for the MEM at all. If I were
going to change anything, it'd be removing that silly bit
of history.
On gcc mainline you can get back to the DECL for a direct
function call via SYMBOL_REF_DECL. There is no way to do
this for indirect function calls.
Normally in these cases the port generates a cookie for
what it needs to know during FUNCTION_ARG. There's a
final call to that hook with VOIDmode. Return a CONST_INT
containing whatever bits you need, and it'll be given to
the call expander, which can then tuck it away somewhere.
See the ARM port for an example of this.
r~