ping some of my patches

Andrew Pinski pinskia@physics.uc.edu
Tue Nov 30 15:35:00 GMT 2004


On Sep 12, 2004, at 7:08 PM, Richard Henderson wrote:

> On Sun, Sep 12, 2004 at 03:19:28PM -0700, Andrew Pinski wrote:
>> @@ -946,8 +945,12 @@ make_decl_rtl (tree decl)
>>    /* Now handle ordinary static variables and functions (in memory).
>>       Also handle vars declared register invalidly.  */
>>
>> -  if (name[0] == '*' && (reg_number >= 0 || reg_number == -3))
>> -    error ("%Jregister name given for non-register variable '%D'",
>> decl, decl);
>> +  if (name[0] == '*')
>
> There should be no fallthru from the previous if.
>
>> +    {
>> +      reg_number = decode_reg_name (name);
>> +      if (reg_number >= 0 || reg_number == -3)
>
> And, as I was saying, I believe this error should be disabled
> if REGISTER_PREFIX is non-empty.

Sorry if this late coming back to this patch but I did not see any use
full for it until just recently. I noticed that small C testcases
are slowed down because each time we add a new builtin because a
call to decode_reg_name shows up even though we know that they cannot
be register names at all.
Here is the new patch which fixes based on your comments.

OK? Bootstrapped and tested on ppc-darwin.

Thanks,
Andrew Pinski

ChangeLog:
	* varasm.c (decode_reg_name): Revert change to check for zero
	length strings.
	(make_decl_rtl): Make sure that we call decode_reg_name only
	when needed.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: speedupReg_decode.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041130/4a85b2c4/attachment.txt>


More information about the Gcc-patches mailing list