This is the mail archive of the 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]

Re: Mapping calls to declarations

On Mon, 13 Aug 2001, James Montgomerie wrote:

> Since I've had no on-list responses to my mail of last week
> (, 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
> work*.
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,
it's trivial.
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

> Jamie.
> * I tried using lookup_name directly, but the information I require is
> either not in the symbol table - see

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