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] Superscalar tweaks to synth_mult


On Fri, Aug 20, 2004 at 11:15:19AM -0600, Roger Sayle wrote:
> The following patch is an improvement to GCC's synth_mult to improve
> performance on superscalar and pipelined processors.  In the current
> implementation, expmed.c's synth_mult evaluates/scores sequences of
> shifts and adds based purely on their total rtx_cost.  When two or
> more alternate sequences have exactly the same total rtx_cost, the
> current implementation arbitrarily chooses the first.

While at a high level this seems a fantastic idea, it's not clear to
me how you're computing latency.

> ! 	  op_cost = add_cost[mode] + shift_cost[mode][m];
> ! 	  if (shiftadd_cost[mode][m] < op_cost)
> ! 	    {
> ! 	      op_cost = shiftadd_cost[mode][m];
> ! 	      op_latency = op_cost;
> ! 	    }
> ! 	  else
> ! 	    op_latency = add_cost[mode];

This, for instance, seems ... off ... somehow.

And most of the rest of the places seem to use the same value for
cost and latency.



r~


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