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] Test arm_tune_xscale, not arm_arch_xscale


On 14 Dec 2004, Ian Lance Taylor wrote:
> +  if (undobuf.other_insn)
> +    {
> +      int old_other_cost, new_other_cost;
> +
> +      old_other_cost = (INSN_UID (undobuf.other_insn) <= last_insn_cost
> +			? uid_insn_cost[INSN_UID (undobuf.other_insn)] : 0);
> +      new_other_cost = insn_rtx_cost (PATTERN (undobuf.other_insn));
> +      if (old_other_cost > 0 && new_other_cost > 0)
> +	{
> +	  old_cost += old_other_cost;
> +	  new_cost += new_other_cost;
> +	}
> +    }
> +

It's admittedly a border line case, but could you bootstrap and regression
test a minor tweak to the final clause above?

	if (old_other_cost > 0 && new_other_cost > 0)
	  {
	    old_cost += old_other_cost;
	    new_cost += new_other_cost;
	  }
+	else
+	  old_cost = 0;

This should have the effect of preserving the current behaviour if
the instruction cost of the undobuf.other_insn can't be determined;
i.e. if the cost of the other_insn can't be calculated before or
after this combination attempt, allow the recombination to go ahead.

Thanks in advance,

Roger
--


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