have at most a very minor effect on SVE2 cores. */
(AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params cortexa35_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params cortexa53_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params cortexa57_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_RENAME_FMA_REGS), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params cortexa72_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params cortexa73_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
-
-
static const struct tune_params exynosm1_tunings =
{
&exynosm1_extra_costs,
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&exynosm1_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params thunderxt88_tunings =
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&thunderxt88_prefetch_tune,
- tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */
};
static const struct tune_params thunderx_tunings =
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND), /* tune_flags. */
&thunderx_prefetch_tune,
- tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */
};
static const struct tune_params tsv110_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&tsv110_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params xgene1_tunings =
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS), /* tune_flags. */
&xgene1_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params emag_tunings =
tune_params::AUTOPREFETCHER_OFF, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS), /* tune_flags. */
&xgene1_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params qdf24xx_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS, /* tune_flags. */
&qdf24xx_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
/* Tuning structure for the Qualcomm Saphira core. Default to falkor values
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params thunderx2t99_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&thunderx2t99_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params thunderx3t110_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&thunderx3t110_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params neoversen1_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params ampere1_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&ere1_prefetch_tune,
- tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */
};
static const struct tune_params ampere1a_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&ere1_prefetch_tune,
- tune_params::LDP_POLICY_ALIGNED, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALIGNED /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALIGNED /* stp_policy_model. */
};
static const advsimd_vec_cost neoversev1_advsimd_vector_cost =
| AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT
| AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const sve_vec_cost neoverse512tvb_sve_vector_cost =
| AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS
| AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const advsimd_vec_cost neoversen2_advsimd_vector_cost =
| AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS
| AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const advsimd_vec_cost neoversev2_advsimd_vector_cost =
| AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS
| AARCH64_EXTRA_TUNE_MATCHED_VECTOR_THROUGHPUT), /* tune_flags. */
&generic_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
static const struct tune_params a64fx_tunings =
tune_params::AUTOPREFETCHER_WEAK, /* autoprefetcher_model. */
(AARCH64_EXTRA_TUNE_NONE), /* tune_flags. */
&a64fx_prefetch_tune,
- tune_params::LDP_POLICY_ALWAYS, /* ldp_policy_model. */
- tune_params::STP_POLICY_ALWAYS /* stp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS, /* ldp_policy_model. */
+ AARCH64_LDP_STP_POLICY_ALWAYS /* stp_policy_model. */
};
/* Support for fine-grained override of the tuning structures. */
return AARCH_PARSE_INVALID_ARG;
}
-/* Parse a command-line -param=aarch64-ldp-policy= parameter. VALUE is
- the value of the parameter. */
-
-static void
-aarch64_parse_ldp_policy (enum aarch64_ldp_policy value,
- struct tune_params* tune)
-{
- if (value == LDP_POLICY_ALWAYS)
- tune->ldp_policy_model = tune_params::LDP_POLICY_ALWAYS;
- else if (value == LDP_POLICY_NEVER)
- tune->ldp_policy_model = tune_params::LDP_POLICY_NEVER;
- else if (value == LDP_POLICY_ALIGNED)
- tune->ldp_policy_model = tune_params::LDP_POLICY_ALIGNED;
-}
-
-/* Parse a command-line -param=aarch64-stp-policy= parameter. VALUE is
- the value of the parameter. */
-
-static void
-aarch64_parse_stp_policy (enum aarch64_stp_policy value,
- struct tune_params* tune)
-{
- if (value == STP_POLICY_ALWAYS)
- tune->stp_policy_model = tune_params::STP_POLICY_ALWAYS;
- else if (value == STP_POLICY_NEVER)
- tune->stp_policy_model = tune_params::STP_POLICY_NEVER;
- else if (value == STP_POLICY_ALIGNED)
- tune->stp_policy_model = tune_params::STP_POLICY_ALIGNED;
-}
-
/* Parse TOKEN, which has length LENGTH to see if it is an option
described in FLAG. If it is, return the index bit for that fusion type.
If not, error (printing OPTION_NAME) and return zero. */
&aarch64_tune_params);
if (opts->x_aarch64_ldp_policy_param)
- aarch64_parse_ldp_policy (opts->x_aarch64_ldp_policy_param,
- &aarch64_tune_params);
+ aarch64_tune_params.ldp_policy_model = opts->x_aarch64_ldp_policy_param;
if (opts->x_aarch64_stp_policy_param)
- aarch64_parse_stp_policy (opts->x_aarch64_stp_policy_param,
- &aarch64_tune_params);
+ aarch64_tune_params.stp_policy_model = opts->x_aarch64_stp_policy_param;
/* This target defaults to strict volatile bitfields. */
if (opts->x_flag_strict_volatile_bitfields < 0 && abi_version_at_least (2))
bool
aarch64_mem_ok_with_ldpstp_policy_model (rtx mem, bool load, machine_mode mode)
{
- /* If we have LDP_POLICY_NEVER, reject the load pair. */
- if (load
- && aarch64_tune_params.ldp_policy_model == tune_params::LDP_POLICY_NEVER)
- return false;
+ auto policy = (load
+ ? aarch64_tune_params.ldp_policy_model
+ : aarch64_tune_params.stp_policy_model);
- /* If we have STP_POLICY_NEVER, reject the store pair. */
- if (!load
- && aarch64_tune_params.stp_policy_model == tune_params::STP_POLICY_NEVER)
+ /* If we have AARCH64_LDP_STP_POLICY_NEVER, reject the load pair. */
+ if (policy == AARCH64_LDP_STP_POLICY_NEVER)
return false;
- /* If we have LDP_POLICY_ALIGNED,
+ /* If we have AARCH64_LDP_STP_POLICY_ALIGNED,
do not emit the load pair unless the alignment is checked to be
at least double the alignment of the type. */
- if (load
- && aarch64_tune_params.ldp_policy_model == tune_params::LDP_POLICY_ALIGNED
- && !optimize_function_for_size_p (cfun)
- && MEM_ALIGN (mem) < 2 * GET_MODE_ALIGNMENT (mode))
- return false;
-
- /* If we have STP_POLICY_ALIGNED,
- do not emit the store pair unless the alignment is checked to be
- at least double the alignment of the type. */
- if (!load
- && aarch64_tune_params.stp_policy_model == tune_params::STP_POLICY_ALIGNED
+ if (policy == AARCH64_LDP_STP_POLICY_ALIGNED
&& !optimize_function_for_size_p (cfun)
&& MEM_ALIGN (mem) < 2 * GET_MODE_ALIGNMENT (mode))
return false;