Builtins and C++ and such
Roger Sayle
roger@eyesopen.com
Tue Mar 19 15:40:00 GMT 2002
> > 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
--
More information about the Gcc
mailing list