On 8/3/2026 8:42 PM, Wang Yaduo wrote:
> Don't the rest of the uarch tuning structure initializers need a change
> since you added new fields to the structure? For those use whatever the
> current defaults are.
Hi Jeff,
Thanks for checking. The other uarch tunings retain the existing
default reassociation widths through the default member initializers.
Only generic-ooo
and xt-c9501fdvt use larger scalar widths, since I expect out-of-order
cores
to benefit from the additional ILP.
But don't you have to fill out the initializer, even to a reasonable
default value?
ie, the initializers look like this:
/* Costs to use when optimizing for rocket. */
static const struct riscv_tune_param rocket_tune_info = {
{COSTS_N_INSNS (4), COSTS_N_INSNS (5)}, /* fp_add */
{COSTS_N_INSNS (4), COSTS_N_INSNS (5)}, /* fp_mul */
{COSTS_N_INSNS (20), COSTS_N_INSNS (20)}, /* fp_div */
{COSTS_N_INSNS (4), COSTS_N_INSNS (4)}, /* int_mul */
{COSTS_N_INSNS (33), COSTS_N_INSNS (65)}, /* int_div */
1, /* issue_rate */
3, /* branch_cost */
5, /* memory_cost */
8, /* fmv_cost */
true, /*
slow_unaligned_access */
false, /*
vector_unaligned_access */
false, /* use_divmod_expansion */
false, /* overlap_op_by_pieces */
true, /* use_zero_stride_load */
false, /*
speculative_sched_vsetvl */
RISCV_FUSE_NOTHING, /* fusible_ops */
NULL, /* vector cost */
NULL, /* function_align */
NULL, /* jump_align */
NULL, /* loop_align */
false, /* prefer-agnostic. */
};
If you add another field to riscv_tune_param, then don't you need to fix
all the instances where we initialize instances of that structure?
jeff