GCC Middle and Back End API Reference
loop-init.c File Reference

Functions

static void apply_loop_flags ()
void loop_optimizer_init ()
void loop_optimizer_finalize ()
unsigned fix_loop_structure ()
static bool gate_handle_loop2 ()
rtl_opt_passmake_pass_loop2 ()
static unsigned int rtl_loop_init ()
rtl_opt_passmake_pass_rtl_loop_init ()
static unsigned int rtl_loop_done ()
rtl_opt_passmake_pass_rtl_loop_done ()
static bool gate_rtl_move_loop_invariants ()
static unsigned int rtl_move_loop_invariants ()
rtl_opt_passmake_pass_rtl_move_loop_invariants ()
static bool gate_rtl_unswitch ()
static unsigned int rtl_unswitch ()
rtl_opt_passmake_pass_rtl_unswitch ()
static bool gate_rtl_unroll_and_peel_loops ()
static unsigned int rtl_unroll_and_peel_loops ()
rtl_opt_passmake_pass_rtl_unroll_and_peel_loops ()
static bool gate_rtl_doloop ()
static unsigned int rtl_doloop ()
rtl_opt_passmake_pass_rtl_doloop ()

Function Documentation

static void apply_loop_flags ( )
static
@verbatim Loop optimizer initialization routines and RTL loop optimization passes.

Copyright (C) 2002-2013 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

Apply FLAGS to the loop state.   

References CP_FALLTHRU_PREHEADERS, CP_SIMPLE_PREHEADERS, create_preheaders(), disambiguate_loops_with_multiple_latches(), force_single_succ_latches(), LOOPS_HAVE_FALLTHRU_PREHEADERS, LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS, LOOPS_HAVE_PREHEADERS, LOOPS_HAVE_RECORDED_EXITS, LOOPS_HAVE_SIMPLE_LATCHES, LOOPS_MAY_HAVE_MULTIPLE_LATCHES, loops_state_set(), mark_irreducible_loops(), and record_loop_exits().

Referenced by fix_loop_structure(), and loop_optimizer_init().

unsigned fix_loop_structure ( )
The structure of loops might have changed.  Some loops might get removed
   (and their headers and latches were set to NULL), loop exists might get
   removed (thus the loop nesting may be wrong), and some blocks and edges
   were changed (so the information about bb --> loop mapping does not have
   to be correct).  But still for the remaining loops the header dominates
   the latch, and loops did not get new subloops (new loops might possibly
   get created, but we are not interested in them).  Fix up the mess.

   If CHANGED_BBS is not NULL, basic blocks whose loop depth has changed are
   marked in it.

   Returns the number of new discovered loops.   

References apply_loop_flags(), basic_block_def::aux, bb_loop_header_p(), bitmap_set_bit(), CDI_DOMINATORS, cfun, dom_info_state(), DOM_OK, dump_file, dump_flags, flow_loop_free(), flow_loop_tree_node_add(), flow_loop_tree_node_remove(), flow_loops_find(), get_loops(), loop::header, basic_block_def::index, loop::inner, LI_FROM_INNERMOST, loop_depth(), basic_block_def::loop_father, loop_outer(), LOOPS_HAVE_RECORDED_EXITS, LOOPS_NEED_FIXUP, loops_state_clear(), loops_state_satisfies_p(), loop::num, number_of_loops(), release_recorded_exits(), timevar_pop(), timevar_push(), and verify_loop_structure().

static bool gate_handle_loop2 ( )
static
Gate for the RTL loop superpass.  The actual passes are subpasses.
   See passes.c for more on that.   

References cfun, function::curr_properties, and loop_optimizer_finalize().

static bool gate_rtl_doloop ( )
static
The doloop optimization.   
static bool gate_rtl_move_loop_invariants ( )
static
Loop invariant code motion.   
static bool gate_rtl_unroll_and_peel_loops ( )
static
Loop unswitching for RTL.   
static bool gate_rtl_unswitch ( )
static
Loop unswitching for RTL.   
void loop_optimizer_init ( )
rtl_opt_pass* make_pass_loop2 ( )
rtl_opt_pass* make_pass_rtl_doloop ( )
rtl_opt_pass* make_pass_rtl_loop_done ( )
rtl_opt_pass* make_pass_rtl_loop_init ( )
rtl_opt_pass* make_pass_rtl_move_loop_invariants ( )
rtl_opt_pass* make_pass_rtl_unroll_and_peel_loops ( )
rtl_opt_pass* make_pass_rtl_unswitch ( )
static unsigned int rtl_doloop ( )
static
static unsigned int rtl_loop_done ( )
static
static unsigned int rtl_loop_init ( )
static
static unsigned int rtl_move_loop_invariants ( )
static
static unsigned int rtl_unroll_and_peel_loops ( )
static
static unsigned int rtl_unswitch ( )
static