diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-07-05 08:01:48 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-07-05 08:01:48 +0000 |
commit | 89f7b21fb0dfb2b9c7339b44035df76e2265d489 (patch) | |
tree | f95b1bc19179206a2e7d46a7587619466659f205 /gcc/loop-init.c | |
parent | f2cf13bd7c00ec7d12e7bddfefeb5eea84a14f74 (diff) | |
download | gcc-89f7b21fb0dfb2b9c7339b44035df76e2265d489.zip gcc-89f7b21fb0dfb2b9c7339b44035df76e2265d489.tar.gz gcc-89f7b21fb0dfb2b9c7339b44035df76e2265d489.tar.bz2 |
target-insns.def (doloop_begin, doloop_end): New targetm instruction patterns.
gcc/
* target-insns.def (doloop_begin, doloop_end): New targetm
instruction patterns.
* loop-init.c: Include target.h.
(pass_loop2::gate): Use the new targetm patterns instead of
HAVE_*/gen_* interface.
(pass_rtl_doloop::gate): Likewise.
(pass_rtl_doloop::execute): Remove preprocessor condition.
* hw-doloop.c: Build unconditionally.
* loop-doloop.c: Likewise.
(doloop_optimize): Use the new targetm patterns instead of
HAVE_*/gen_* interface.
(doloop_modify): Likewise. Change type of doloop_seq to rtx_insn *.
* modulo-sched.c (doloop_register_get): Likewise.
From-SVN: r225431
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r-- | gcc/loop-init.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c index 5959145..8595777 100644 --- a/gcc/loop-init.c +++ b/gcc/loop-init.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-loop-niter.h" #include "loop-unroll.h" #include "tree-scalar-evolution.h" +#include "target.h" /* Apply FLAGS to the loop state. */ @@ -377,10 +378,8 @@ pass_loop2::gate (function *fun) && (flag_move_loop_invariants || flag_unswitch_loops || flag_unroll_loops -#ifdef HAVE_doloop_end - || (flag_branch_on_count_reg && HAVE_doloop_end) -#endif - )) + || (flag_branch_on_count_reg + && targetm.have_doloop_end ()))) return true; else { @@ -644,20 +643,14 @@ public: bool pass_rtl_doloop::gate (function *) { -#ifdef HAVE_doloop_end - return (flag_branch_on_count_reg && HAVE_doloop_end); -#else - return false; -#endif + return (flag_branch_on_count_reg && targetm.have_doloop_end ()); } unsigned int -pass_rtl_doloop::execute (function *fun ATTRIBUTE_UNUSED) +pass_rtl_doloop::execute (function *fun) { -#ifdef HAVE_doloop_end if (number_of_loops (fun) > 1) doloop_optimize_loops (); -#endif return 0; } |