This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Constant fold <string.h> library functions
- From: law at redhat dot com
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Eric Botcazou <ebotcazou at libertysurf dot fr>, Richard Henderson <rth at redhat dot com>
- Date: Fri, 17 Oct 2003 10:15:02 -0600
- Subject: Re: [PATCH] Constant fold <string.h> library functions
- Reply-to: law at redhat dot com
In message <Pine.LNX.firstname.lastname@example.org>, Roger S
>The following patch implements Richard Henderson's suggestion that
>many of tree-level optimizations of strcmp, memcpy, et al. that currently
>are performed during RTL expansion could/should be performed during
>constant folding. This allows these transformations to be visible to
>the tree-ssa optimizers, and may enable further optimization
>opportunities. For example, tree-ssa should now be able to determine
>that strcmp("foo","bar") > 0 is a compile-time constant.
[ ... ]
Did you happen to look at builtins::simplify_builtin_XXX? We do a goodly
amount of this kind of stuff already on the tree-ssa branch (though we
certainly punted some of the nastier cases like memcpy expanded to a
series of simple loads/stores).