GCC Middle and Back End API 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_pass * | make_pass_ch () |
|
static |
For all loops, copy the condition at the end of the loop body in front of the loop. This is beneficial since it increases efficiency of code motion optimizations. It also saves one jump on entry to the loop.
References cfun, edge_def::dest, do_while_loop_p(), dump_file, dump_flags, flow_bb_inside_loop_p(), free(), gimple_assign_rhs_code(), gimple_duplicate_sese_region(), gimple_set_no_warning(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), loop::header, basic_block_def::index, is_gimple_assign(), limit, loop_latch_edge(), loop_optimizer_finalize(), loop_optimizer_init(), loop_preheader_edge(), LOOPS_HAVE_PREHEADERS, LOOPS_HAVE_SIMPLE_LATCHES, loop::num, number_of_loops(), propagate_threaded_block_debug_into(), should_duplicate_loop_header_p(), single_pred_edge(), single_pred_p(), split_edge(), edge_def::src, tcc_comparison, and update_ssa().
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 |
gimple_opt_pass* make_pass_ch | ( | ) |
|
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().