summaryrefslogtreecommitdiff
path: root/gcc/loop-init.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-05 08:01:48 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-05 08:01:48 +0000
commit4177c6958b02d95648295cd7951815b54a627ab5 (patch)
treef95b1bc19179206a2e7d46a7587619466659f205 /gcc/loop-init.c
parent32e17df0dc70dc48200952ff07b25cc4eff73f06 (diff)
downloadgcc-4177c6958b02d95648295cd7951815b54a627ab5.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225431 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-init.c')
-rw-r--r--gcc/loop-init.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/gcc/loop-init.c b/gcc/loop-init.c
index 5959145b969..85957770b3b 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;
}