This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Proposal: adding two zeros to the integer cost to calibrate better.
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: "J.C. Pizarro" <jcpiza at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 28 Jun 2007 15:44:10 +0200
- Subject: Re: Proposal: adding two zeros to the integer cost to calibrate better.
- References: <998d0e4a0706271241m3163d71fycb9baec85d9ad13b@mail.gmail.com>
On Wed, Jun 27, 2007 at 09:41:08PM +0200, J.C. Pizarro wrote:
> I recommend to add 2 zeros to the integer costs as if those are 2 decimal
> zeros,
> for example,
>
> insn_cost 5: 1200 // it's 12.00
> insn_cost 6: 800 // it's 8.00
> insn_cost 7: 400 // it's 4.00
> insn_cost 8: 433 // it's 4.33 little costly than 7th, +x.xx%
> better calibrating.
> insn_cost 9: 466 // it's 4.66 little costly than 8th, +x.xx%
> better calibrating.
> insn_cost 10: 500 // it's 5.00
We already multiply the costs by four (COSTS_N_INSNS()), so you can
already add or subtract one to fine tune costs.
A much worse problem is that e.g. combine only passes small fragments of
an insn to rtx_cost(), which means that the back end had to guess what the
insn looked like to begin with, rather than simply looking at the rtx passed
to it. It is a garbage in, garbage out system.
--
Rask Ingemann Lambertsen