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: Builtins and C++ and such



> > 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.

We also already perform several built-in optimizations at the tree
level.  For example, strlen("foo") and "strlen(ptr) > 0" are
transformed by fold().  Eventually, many more could be handled at
the tree level, "qsort" where n is zero or one, or transforming
STL container.size() == 0 calls into container.empty().

Roger
--


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