ARCH_rtx_costs

Eric Christopher echristo@redhat.com
Thu Oct 7 19:17:00 GMT 2004


On Thu, 2004-10-07 at 04:46, Shinpei Kato wrote:
> Hi there,
> 
> When porting gcc to own arch, we need to prepare $ARCH_rtx_costs, like mips_rtx_costs.
> I don't know how to calculate these costs.
> How could I achieve it? 
> Which reference do I need to refer to? I think there are few helps about it in GCC internals.
> I need your help.

http://gcc.gnu.org/onlinedocs/gccint/Costs.html#Costs

Has most of the cost information you need, looking at a similar existing
port could help.  What you want to remember in particular is that it's a
set of relative costs. For example, if your "fast" instruction is an
add, e.g. add $2, $3, $4, and takes one cycle and a multiply takes 12
cycles then you'd want to have a MULT cost COST_N_INSNS (12).

Good luck.

-eric

-- 
Eric Christopher <echristo@redhat.com>



More information about the Gcc mailing list