aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/tm.texi
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2018-10-01 13:06:53 +0000
committerTamar Christina <tnfchris@gcc.gnu.org>2018-10-01 13:06:53 +0000
commit03ced4ab9f729cc4d5854439f136d84d1343b32d (patch)
treea8052683671f592c9b2edb6f58685170c945b8bd /gcc/doc/tm.texi
parentc98f502f0ab9e51357665d7afcad724feee6088b (diff)
downloadgcc-03ced4ab9f729cc4d5854439f136d84d1343b32d.zip
gcc-03ced4ab9f729cc4d5854439f136d84d1343b32d.tar.gz
gcc-03ced4ab9f729cc4d5854439f136d84d1343b32d.tar.bz2
Allow back-ends to be able to do custom validations on params.
This patch adds the ability for backends to add custom constrains to the param values by defining a new hook option_validate_param. This hook is invoked on every set_param_value which allows the back-end to ensure that the parameters are always within it's desired state. gcc/ * params.c (set_param_value): Add index of parameter being validated. * common/common-target.def (option_validate_param): New. * common/common-targhooks.h (default_option_validate_param): New. * common/common-targhooks.c (default_option_validate_param): New. * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New. * doc/tm.texi: Regenerate. From-SVN: r264755
Diffstat (limited to 'gcc/doc/tm.texi')
-rw-r--r--gcc/doc/tm.texi4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index b00e4b6..83965b2 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -753,6 +753,10 @@ Set target-dependent initial values of fields in @var{opts}.
Set target-dependent default values for @option{--param} settings, using calls to @code{set_default_param_value}.
@end deftypefn
+@deftypefn {Common Target Hook} bool TARGET_OPTION_VALIDATE_PARAM (int, @var{int})
+Validate target-dependent value for @option{--param} settings, using calls to @code{set_param_value}.
+@end deftypefn
+
@defmac SWITCHABLE_TARGET
Some targets need to switch between substantially different subtargets
during compilation. For example, the MIPS target has one subtarget for