This is the mail archive of the gcc-patches@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: [PATCH] Constant fold <string.h> library functions


In message <Pine.LNX.4.44.0310151408580.14310-100000@www.eyesopen.com>, Roger S
ayle writes:
 >
 >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.
[ ... ]
Cool.

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


Jeff


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