1 Apr 2005 01:01
Re: What is ccp_fold_builtin() for vs. fold_builtin_1() ?
Andrew Pinski <pinskia <at> physics.uc.edu>
2005-03-31 23:01:14 GMT
2005-03-31 23:01:14 GMT
On Mar 31, 2005, at 5:46 PM, Kaveh R. Ghazi wrote:
> I'm wondering what ccp_fold_builtin() is for, and particularly why it
> only handles BUILT_IN_STRLEN, BUILT_IN_FPUTS, BUILT_IN_FPUTS_UNLOCKED,
> BUILT_IN_STRCPY and BUILT_IN_STRNCPY.
>
> Why were these builtins chosen to live in this function and not
> others?
>
> And what is the place of fold_builtin_1() given we have
> ccp_fold_builtin() ?
>
> Would someone please enlighten me?
ccp_fold_builtin handles converting some of the string builtins to
other builtins if the string length are the same for two strings
for an example:
#include <stdio.h>
void f(int i)
{
const char *a;
if (i)
a = "aa";
else
a = "bb";
__builtin_fputs(a,stdout);
}
We convert it to:
(Continue reading)
RSS Feed