GCC Middle and Back End API Reference
tree-ssa-loop-ch.c File Reference

Functions

static bool should_duplicate_loop_header_p (basic_block header, struct loop *loop, int *limit)
bool do_while_loop_p ()
static unsigned int copy_loop_headers ()
static bool gate_ch ()
gimple_opt_passmake_pass_ch ()

Function Documentation

bool do_while_loop_p ( )
Checks whether LOOP is a do-while style loop.   

References loop::header, last_and_only_stmt(), last_stmt(), and loop::latch.

static bool gate_ch ( )
static
gimple_opt_pass* make_pass_ch ( )
static bool should_duplicate_loop_header_p ( basic_block  header,
struct loop loop,
int *  limit 
)
static
@verbatim Loop header copying on trees.

Copyright (C) 2004-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/.

Duplicates headers of loops if they are small enough, so that the statements
   in the loop body are always executed when the loop is entered.  This
   increases effectiveness of code motion optimizations, and reduces the need
   for loop preconditioning.   
Check whether we should duplicate HEADER of LOOP.  At most *LIMIT
   instructions should be duplicated, limit is decreased by the actual
   amount.   

References basic_block_def::aux, eni_size_weights, estimate_num_insns(), flow_bb_inside_loop_p(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), loop::header, is_gimple_call(), is_gimple_debug(), last, last_stmt(), optimize_loop_for_size_p(), single_pred_p(), single_succ_p(), and basic_block_def::succs.

Referenced by copy_loop_headers().