This is the mail archive of the 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: [tree-ssa-branch] Optimizing non-SIMPLE trees

On Fri, Aug 09, 2002 at 10:09:37AM -0400, Diego Novillo wrote:
> The simplifier refuses to simplify the call to strncmp() because
> it contains at least one constant argument.  It does this to
> avoid tricking the code generator into not outputting a builtin
> call when all the arguments are constant.

This is bogus.

> Clearly, the simplifier could be a bit smarter in this case, but
> the point remains that we will many times refuse to simplify a
> builtin or other special trees.  The question is now, how do we
> tell the optimizers to keep their hands off these trees?

No, this is not clear.  You'd be complicating the optimizers for
no reason whatsoever.

The correct solution here is to expand builtin functions *after*
constant propagation.  Then we get nice builtin expansion when
the user hasn't written something convenient up front.

Of course afterwards you get to re-do the propagation, since we
may well have generated new constants.


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