+ TODO_dump_func, /* todo_flags_finish */
+ 'L' /* letter */
+};
+
+\f
+/* Loop invariant code motion. */
+static void
+rtl_move_loop_invariants (void)
+{
+ if (current_loops && flag_move_loop_invariants)
+ move_loop_invariants (current_loops);
+}
+
+struct tree_opt_pass pass_rtl_move_loop_invariants =
+{
+ "loop_invariant", /* name */
+ NULL, /* gate */
+ rtl_move_loop_invariants, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_LOOP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func, /* todo_flags_finish */
+ 'L' /* letter */
+};
+
+\f
+/* Loop unswitching for RTL. */
+static void
+rtl_unswitch (void)
+{
+ if (current_loops && flag_unswitch_loops)
+ unswitch_loops (current_loops);
+}
+
+struct tree_opt_pass pass_rtl_unswitch =
+{
+ "loop_unswitch", /* name */
+ NULL, /* gate */
+ rtl_unswitch, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_LOOP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func, /* todo_flags_finish */
+ 'L' /* letter */
+};
+
+\f
+/* Loop unswitching for RTL. */
+static void
+rtl_unroll_and_peel_loops (void)
+{
+ if (current_loops
+ && (flag_peel_loops || flag_unroll_loops || flag_unroll_all_loops))
+ {
+ int flags = 0;
+
+ if (flag_peel_loops)
+ flags |= UAP_PEEL;
+ if (flag_unroll_loops)
+ flags |= UAP_UNROLL;
+ if (flag_unroll_all_loops)
+ flags |= UAP_UNROLL_ALL;
+
+ unroll_and_peel_loops (current_loops, flags);
+ }
+}
+
+struct tree_opt_pass pass_rtl_unroll_and_peel_loops =
+{
+ "loop_unroll", /* name */
+ NULL, /* gate */
+ rtl_unroll_and_peel_loops, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_LOOP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func, /* todo_flags_finish */
+ 'L' /* letter */
+};
+
+\f
+/* The doloop optimization. */
+static void
+rtl_doloop (void)
+{
+#ifdef HAVE_doloop_end
+ if (current_loops
+ && (flag_branch_on_count_reg && HAVE_doloop_end))
+ doloop_optimize_loops (current_loops);
+#endif
+}
+
+struct tree_opt_pass pass_rtl_doloop =
+{
+ "loop_doloop", /* name */
+ NULL, /* gate */
+ rtl_doloop, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_LOOP, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func, /* todo_flags_finish */