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] genrecog: simplify jumps around case DT_const_int


On Mon, Aug 27, 2007 at 11:32:56PM +0200, Rask Ingemann Lambertsen wrote:
>On Wed, Aug 22, 2007 at 11:16:51PM +0200, Bernhard Fischer wrote:
>
>> Index: gcc-4.3/gcc/genrecog.c
>> ===================================================================
>> --- gcc-4.3/gcc/genrecog.c	(revision 127717)
>> +++ gcc-4.3/gcc/genrecog.c	(working copy)
>> @@ -2110,8 +2110,11 @@ write_cond (struct decision_test *p, int
>>        break;
>>  
>>      case DT_const_int:
>> -      printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
>> -	      depth, (int) p->u.intval);
>> +      if ((int) p->u.intval)
>> +	printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
>> +		depth, (int) p->u.intval);
>> +      else
>> +	printf ("x%d == const_int_rtx[MAX_SAVED_CONST_INT]", depth);
>>        break;
>>  
>>      case DT_veclen_ge:
>
>   Just wondering: How much does this improve in terms of code size or
>execution speed?

Not too much, i assume. The generated code has just one jump less, at
most. It's just a cosmetic correction, AFAIC.


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