This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Builtins and C++ and such
--On Tuesday, March 19, 2002 03:14:53 PM -0800 Richard Henderson
<rth@redhat.com> wrote:
> On Tue, Mar 19, 2002 at 03:06:48PM -0800, Mark Mitchell wrote:
>> My present suggestion is allegedgly good because it uses a little
>> hook that all languages can take advantage of in whatever
>> way they want, it delays the optimization until RTL expansion so
>> that tree-based optimizations don't get confused, and it is pretty
>> demonstrably safe by looking at the body of the hook and nothing
>> else.
>
> You don't want to delay things that long. You want e.g.
> __builtin_abs to turn in to the ABS_EXPR tree code.
OK. So, let's apply my suggestion to expand_tree_builtin and/or
build_function_call as well: rather than checking DECL_... just
call some language-dependent hook that decides what to do. There's
still no reason to have actually had to create some weird magic DECL
that potentially confuses you in other places.
Agree?
(Somebody still has to tell me we can't just do this in headers for C++,
which is the language with the performance regression...)
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com