This is the mail archive of the
mailing list for the GCC project.
Re: Patch for builtin fputs (first stdio opt ready for install)
- To: jason at redhat dot com
- Subject: Re: Patch for builtin fputs (first stdio opt ready for install)
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Wed, 6 Sep 2000 13:31:56 -0400 (EDT)
- Cc: gcc-patches at gcc dot gnu dot org
> From: Jason Merrill <email@example.com>
> You could save a pointer to the _DECL for __builtin_fputc in
> Or you could just use emit_library_call and dispense with the _DECL
> entirely; that's probably the easiest solution.
> > Future optimizations will require expanding into other builtins,
> > regular libc calls and inline functions we'll declare behind the
> > scenes. This is why I felt the get_decl mechanism was useful as a
> > generic way to get info out of language dependent tree structures.
If I use emit_library_call(), then further opts won't get done
recursively, because it'll actually emit the call rather than lookup
other possible builtins right?
E.g. long term I want this to work:
fprintf("\n") -> fputs("\n") -> fputc('\n') -> putc_macro ('\n')
However, builtin_function() returns the _DECL, so you're right I could
cache it as long as every optimization I'd want to do involved calling
some other builtin which I declare and save. This'll handle most of
what I want I think. I'll try it out and see what happens.
Kaveh R. Ghazi Engagement Manager / Project Services
firstname.lastname@example.org Qwest Internet Solutions