This is the mail archive of the
mailing list for the GCC project.
Re: Mapping calls to declarations
- To: James Montgomerie <jrmg at dcs dot ed dot ac dot uk>
- Subject: Re: Mapping calls to declarations
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Mon, 13 Aug 2001 11:54:13 -0400 (EDT)
- cc: <gcc at gcc dot gnu dot org>
On Mon, 13 Aug 2001, James Montgomerie wrote:
> Since I've had no on-list responses to my mail of last week
> (http://gcc.gnu.org/ml/gcc/2001-08/msg00407.html), I thought I'd phrase my
> question in vauger terms in the hope of provoking a suggestion :-)
> I need to be able to, in the function call instruction patterns (or
> functions called by them), map from a function call to a declaration. I
> first tried looking up the SYMBOL_REF in the symbol table, but this does not
I can do what you said in the message, and the function decls i get
correspond exactly to the function in question, as they should.
> My next thought was to get the declaration via get_callee_fndecl,
> somehow getting the tree for the call expression first, but I can't see a
> way to do that.
How early do you need to be able to do this?
If you want to do it when creating the call instruction pattern itself,
You'll be passed all the info you need.
> If none of this is possible, some other way of deducing the register modes
> for the arguments in the call would also suffice.
> Does anyone have any suggestions? Is anyone prepared to stick their neck
> out and say it actually can't be done within the current framework?
I know it can, because i've spent a little time on tracking various
things functions do so we can do better register allocation/memory
> * I tried using lookup_name directly, but the information I require is
> either not in the symbol table - see