diff options
author | jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-22 14:50:32 +0000 |
---|---|---|
committer | jgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-22 14:50:32 +0000 |
commit | 29cad3b61bc117db0814aa3f0e3ad1f55d495d91 (patch) | |
tree | fdeb1da3b93237197679dcc3174d6e1b4a44b8cb /gcc/doc | |
parent | 5c2855889eed7843548d3e230ff1e5a3d47dd53b (diff) | |
download | gcc-29cad3b61bc117db0814aa3f0e3ad1f55d495d91.tar.gz |
[Mid-end] Add TARGET_GIMPLE_FOLD_BUILTIN target hook.
gcc/
* coretypes.h (gimple_stmt_iterator_d): Forward declare.
(gimple_stmt_iterator): New typedef.
* gimple.h (gimple_stmt_iterator): Rename to...
(gimple_stmt_iterator_d): ... This.
* doc/tm.texi.in (TARGET_FOLD_BUILTIN): Detail restriction that
trees be valid for GIMPLE and GENERIC.
(TARGET_GIMPLE_FOLD_BUILTIN): New.
* gimple-fold.c (gimple_fold_call): Call target hook
gimple_fold_builtin.
* hooks.c (hook_bool_gsiptr_false): New.
* hooks.h (hook_bool_gsiptr_false): New.
* target.def (fold_stmt): New.
* doc/tm.texi: Regenerate.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198142 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 12 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 7 |
2 files changed, 15 insertions, 4 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index c88a89f28c3..ec7ef758086 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -10931,8 +10931,16 @@ Fold a call to a machine specific built-in function that was set up by @samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the built-in function. @var{n_args} is the number of arguments passed to the function; the arguments themselves are pointed to by @var{argp}. -The result is another tree containing a simplified expression for the -call's result. If @var{ignore} is true the value will be ignored. +The result is another tree, valid for both GIMPLE and GENERIC, +containing a simplified expression for the call's result. If +@var{ignore} is true the value will be ignored. +@end deftypefn + +@deftypefn {Target Hook} bool TARGET_GIMPLE_FOLD_BUILTIN (gimple_stmt_iterator *@var{gsi}) +Fold a call to a machine specific built-in function that was set up +by @samp{TARGET_INIT_BUILTINS}. @var{gsi} points to the gimple +statement holding the function call. Returns true if any change +was made to the GIMPLE stream. @end deftypefn @deftypefn {Target Hook} int TARGET_COMPARE_VERSION_PRIORITY (tree @var{decl1}, tree @var{decl2}) diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index d70ce4cfd36..a4187335b62 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -10775,10 +10775,13 @@ Fold a call to a machine specific built-in function that was set up by @samp{TARGET_INIT_BUILTINS}. @var{fndecl} is the declaration of the built-in function. @var{n_args} is the number of arguments passed to the function; the arguments themselves are pointed to by @var{argp}. -The result is another tree containing a simplified expression for the -call's result. If @var{ignore} is true the value will be ignored. +The result is another tree, valid for both GIMPLE and GENERIC, +containing a simplified expression for the call's result. If +@var{ignore} is true the value will be ignored. @end deftypefn +@hook TARGET_GIMPLE_FOLD_BUILTIN + @hook TARGET_COMPARE_VERSION_PRIORITY This hook is used to compare the target attributes in two functions to determine which function's features get higher priority. This is used |