]> git.ipfire.org Git - thirdparty/gcc.git/commit
Allow back-ends to be able to do custom validations on params.
authortnfchris <tnfchris@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Oct 2018 13:06:53 +0000 (13:06 +0000)
committertnfchris <tnfchris@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Oct 2018 13:06:53 +0000 (13:06 +0000)
commit6b489379303e37173471f27074ee11d8d6498d8f
treea8052683671f592c9b2edb6f58685170c945b8bd
parenta5ada907d3de4caea1a7e93d5d48261cc6182d80
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264755 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/common/common-target.def
gcc/common/common-targhooks.c
gcc/common/common-targhooks.h
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/params.c