This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Superscalar tweaks to synth_mult
- From: Richard Henderson <rth at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 Aug 2004 15:53:57 -0700
- Subject: Re: [PATCH] Superscalar tweaks to synth_mult
- References: <Pine.LNX.4.44.0408201007160.21034-100000@www.eyesopen.com>
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~