[patch] MIPS: Size optimization costs.

Richard Sandiford richard@codesourcery.com
Mon Nov 6 19:05:00 GMT 2006


David Ung <davidu@mips.com> writes:
> +static struct mips_rtx_cost_data const mips_rtx_cost_optimize_size =
> +  {
> +      COSTS_N_INSNS (1),            /* fp_add */
> +      COSTS_N_INSNS (1),            /* fp_mult_sf */
> +      COSTS_N_INSNS (1),            /* fp_mult_df */
> +      COSTS_N_INSNS (1),            /* fp_div_sf */
> +      COSTS_N_INSNS (1),            /* fp_div_df */
> +      COSTS_N_INSNS (1),            /* int_mult_si */
> +      COSTS_N_INSNS (1),            /* int_mult_di */
> +      COSTS_N_INSNS (1),            /* int_div_si */
> +      COSTS_N_INSNS (1),            /* int_div_di */
> +                       2,           /* branch_cost */
> +                       4            /* memory_latency */
> +  };

Too much indentation: the COST_N_INSNS() lines are too indented.
OK otherwise.

I'm not a great fan of the current MIPS cost model, not least because
it fails to take things like -mhard-float and -msoft-float into account.
However, your patch is a strict improvement on what we have now.

Richard



More information about the Gcc-patches mailing list