This is the mail archive of the gcc@gcc.gnu.org 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]
Other format: [Raw text]

Re: accessing machine specific attributes from rtx


Actually I need both - the caller and the callee. And as I said, the symbol_ref for a direct call is insufficient as I'd need identical information on the target of an indirect call. More ideas? Jan

>>> Jan Hubicka <jh@suse.cz> 06.11.02 14:44:08 >>>
> That one I found, but this adds the attributes only to the TREE stuff, and I cannot see how I would access this information when having only rtx-es at hand (i.e. in a function called out of an expander in the .md file).

current_function_decl gives you the currently compiled function.  If you
are asking about called function, you can not fetch it from the rtx from
call insn I believe (without resolving back the symbol_ref that is
dificult).  You get it when expanding the function call, so you can save
the information shomehow.  What do you want?

Honza
> 
> Thanks again, Jan
> 
> >>> Jan Hubicka <jh@suse.cz> 06.11.02 14:09:23 >>>
> > I would like to add a couple of optmization hint attributes to function declarations (and pointers to functions) to the IA64 targets, but I seem to have difficulty to understand how these attributes can be accessed when I have only rtx elements at hand. Specifically, the information is needed at the point where the function call is being expanded (in this case this would be in ia64_expand_call). I can see that attributes like 'pure', 'const', or 'noreturn' are being converted to notes in emit_call_1, but there does not seem to be a way to extend this scheme for a given machine. If the target were only direct function calls, then perhaps I could look up the declaration from the target function's name, but this is no alternative as it is supposed to work for indirect calls, too.
> 
> You are probably looking for TARGET_ATTRIBUTE_TABLE.  You may take a
> look how it is handled on i386, that already defines some hooks for
> optimization.
> Let me know if you need more.
> 
> Honza
> > 
> > Thank you for any hints, Jan
> > 
> > 
> > i.A. Jan Beulich
> > Software Engineer Senior
> > Novell Core OS Engineering
> > 
> > Novell, the leading provider of Net business solutions.
> > http://www.novell.com/


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