Using mem_attrs to get the tree of a function being called?
Richard Henderson
rth@redhat.com
Thu May 1 00:05:00 GMT 2003
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~
More information about the Gcc
mailing list