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] Account for prologue spills in reg_pressure scheduling


On Oct 23, 2014, at 8:20 PM, Richard Sandiford <richard.sandiford@arm.com> wrote:

> Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> writes:
>> @@ -6701,6 +6753,24 @@ alloc_global_sched_pressure_data (void)
>> 	  saved_reg_live = BITMAP_ALLOC (NULL);
>> 	  region_ref_regs = BITMAP_ALLOC (NULL);
>> 	}
>> +
>> +      /* Calculate number of CALL_USED_REGS in register classes that
>> +	 we calculate register pressure for.  */
>> +      for (int c = 0; c < ira_pressure_classes_num; ++c)
>> +	{
>> +	  enum reg_class cl = ira_pressure_classes[c];
>> +
>> +	  call_used_regs_num[cl] = 0;
>> +
>> +	  for (int i = 0; i < ira_class_hard_regs_num[cl]; ++i)
>> +	    if (call_used_regs[ira_class_hard_regs[cl][i]])
>> +	      {
>> +		/* Register I belongs to pressure class CL.  Pressure
>> +		   classes do not intersect, so don't look further.  */
>> +		++call_used_regs_num[cl];
>> +		break;
>> +	      }
>> +	}
> 
> I don't think we want the break here.  The effect would be to count
> at most one call-used register per pressure class.

You make me feel dumb :-)

Thank you,

--
Maxim Kuvyrkov
www.linaro.org


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