aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorKewen Lin <linkw@gcc.gnu.org>2019-06-18 05:08:02 +0000
committerKewen Lin <linkw@gcc.gnu.org>2019-06-18 05:08:02 +0000
commit74b5fcf733823b353b331c0ca30e8b71ba98c9cf (patch)
treeb9ed33a1d95fac033d35268b37e4cf0e4bcf2ca1 /gcc/doc
parent702eb490a864239256203b7fad53e397d3e7fa54 (diff)
downloadgcc-74b5fcf733823b353b331c0ca30e8b71ba98c9cf.zip
gcc-74b5fcf733823b353b331c0ca30e8b71ba98c9cf.tar.gz
gcc-74b5fcf733823b353b331c0ca30e8b71ba98c9cf.tar.bz2
Add predict_doloop_p target hook
Add one target hook predict_doloop_p, it return true if we can predict it is possible to use a low-overhead loop, it can help ivopts to make some better decisions. PR middle-end/80791 * target.def (predict_doloop_p): New hook. * targhooks.h (default_predict_doloop_p): New declaration. * targhooks.c (default_predict_doloop_p): New function. * doc/tm.texi.in (TARGET_PREDICT_DOLOOP_P): New hook. * doc/tm.texi: Regenerate. * config/rs6000/rs6000.c (rs6000_predict_doloop_p): New function. (TARGET_PREDICT_DOLOOP_P): New macro. * tree-ssa-loop-ivopts.c (generic_predict_doloop_p): New function. From-SVN: r272405
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/tm.texi8
-rw-r--r--gcc/doc/tm.texi.in2
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 622e8cf..c2aa4d0 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -11610,6 +11610,14 @@ function version at run-time for a given set of function versions.
body must be generated.
@end deftypefn
+@deftypefn {Target Hook} bool TARGET_PREDICT_DOLOOP_P (struct loop *@var{loop})
+Return true if we can predict it is possible to use a low-overhead loop
+for a particular loop. The parameter @var{loop} is a pointer to the loop.
+This target hook is required only when the target supports low-overhead
+loops, and will help ivopts to make some decisions.
+The default version of this hook returns false.
+@end deftypefn
+
@deftypefn {Target Hook} bool TARGET_CAN_USE_DOLOOP_P (const widest_int @var{&iterations}, const widest_int @var{&iterations_max}, unsigned int @var{loop_depth}, bool @var{entered_at_top})
Return true if it is possible to use low-overhead loops (@code{doloop_end}
and @code{doloop_begin}) for a particular loop. @var{iterations} gives the
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index 17560fc..b4d57b8 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -7944,6 +7944,8 @@ to by @var{ce_info}.
@hook TARGET_GENERATE_VERSION_DISPATCHER_BODY
+@hook TARGET_PREDICT_DOLOOP_P
+
@hook TARGET_CAN_USE_DOLOOP_P
@hook TARGET_INVALID_WITHIN_DOLOOP