This is the mail archive of the
mailing list for the GCC project.
Re: Patch expand_builtin_stpcpy to only expand for string constants
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 4 May 2003 14:28:04 -0400 (EDT)
- Subject: Re: Patch expand_builtin_stpcpy to only expand for string constants
- References: <200305041822.OAA06669@caip.rutgers.edu>
> As mentioned by Jakub here:
> expanding stpcpy can pessimize code when calculating the return value
> if the src string is a runtime expression. This patch limits the
oops sorry I jumped the gun, it should have continued:
... to expressions whose length we can evaluate at compile-time.
Tested on sparc-sun-solaris2.7, ok for mainline?
> 2003-05-04 Kaveh R. Ghazi <email@example.com>
> * builtins.c (expand_builtin_stpcpy): Only expand when the
> length of the source string can be evaluated at compile-time.
Kaveh R. Ghazi firstname.lastname@example.org