This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Tree inlining for the C front end (part 1 of 3)
On Oct 5, 2001, Richard Henderson <rth@redhat.com> wrote:
>> And where would it be defined, so that all languages to which it applies
>> get it?
> Well, it's tree inlining related, so how about tree-inline.c?
There's a reason I'm trying not to introduce artificial dependencies
on tree-inline.c. I believe it references functions that are only
defined in the C-alike front-ends, so bringing tree-inline.o into
other front-ends would cause link errors in front-ends that don't
define those functions.
Of course, these dependencies should be further factored into
additional hooks, but I don't have time to do this now.
langhooks.c, suggested by Mark, is probably the best option to avoid
this potential problem.
I'll revise my patch, or check in what I have already posted (base on
Mark's approval) and write a new patch building upon it to introduce
langhooks.c and remove the ugly macros from tree-inline.h and adjust
the callers.
Would it be acceptable to have something like:
#define TREE_INLINING_LANG_HOOK(fn) (*lang_hooks.tree_inlining.fn)
to abstract away the name of the member of lang_hooks, or do you
consider this unnecessary, or perhaps even undesirable?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me