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