Add predict_doloop_p target hook
authorKewen Lin <linkw@gcc.gnu.org>
Tue, 18 Jun 2019 05:08:02 +0000 (05:08 +0000)
committerKewen Lin <linkw@gcc.gnu.org>
Tue, 18 Jun 2019 05:08:02 +0000 (05:08 +0000)
commit74b5fcf733823b353b331c0ca30e8b71ba98c9cf
treeb9ed33a1d95fac033d35268b37e4cf0e4bcf2ca1
parent702eb490a864239256203b7fad53e397d3e7fa54
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
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/target.def
gcc/targhooks.c
gcc/targhooks.h
gcc/tree-ssa-loop-ivopts.c