GCC Middle and Back End API Reference
tracer.c File Reference

Functions

static int count_insns (basic_block)
static bool ignore_bb_p (const_basic_block)
static bool better_p (const_edge, const_edge)
static edge find_best_successor (basic_block)
static edge find_best_predecessor (basic_block)
static int find_trace (basic_block, basic_block *)
static void mark_bb_seen ()
static bool bb_seen_p ()
static bool ignore_bb_p ()
static int count_insns ()
static bool better_p ()
static edge find_best_successor ()
static edge find_best_predecessor ()
static int find_trace ()
static bool tail_duplicate ()
static unsigned int tracer ()
static bool gate_tracer ()
gimple_opt_passmake_pass_tracer ()

Variables

static int probability_cutoff
static int branch_ratio_cutoff
sbitmap bb_seen

Function Documentation

static bool bb_seen_p ( )
inlinestatic
static bool better_p ( const_edge  ,
const_edge   
)
static
static bool better_p ( )
static
static int count_insns ( basic_block  )
static
The tracer pass for the GNU compiler.
   Contributed by Jan Hubicka, SuSE Labs.
   Adapted to work on GIMPLE instead of RTL by Robert Kidd, UIUC.
   Copyright (C) 2001-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/>.   
This pass performs the tail duplication needed for superblock formation.
   For more information see:

     Design and Analysis of Profile-Based Optimization in Compaq's
     Compilation Tools for Alpha; Journal of Instruction-Level
     Parallelism 3 (2000) 1-25

   Unlike Compaq's implementation we don't do the loop peeling as most
   probably a better job can be done by a special pass and we don't
   need to worry too much about the code size implications as the tail
   duplicates are crossjumped again if optimizations are not
   performed.   

Referenced by tail_duplicate().

static int count_insns ( )
static
Return number of instructions in the block.   

References eni_size_weights, estimate_num_insns(), gsi_end_p(), gsi_next(), gsi_start_bb(), and gsi_stmt().

static edge find_best_predecessor ( basic_block  )
static

Referenced by find_trace().

static edge find_best_predecessor ( )
static
Return most frequent predecessor of basic block BB.   

References better_p(), branch_ratio_cutoff, basic_block_def::frequency, ignore_bb_p(), basic_block_def::preds, and edge_def::src.

static edge find_best_successor ( basic_block  )
static

Referenced by find_trace().

static edge find_best_successor ( )
static
Return most frequent successor of basic block BB.   

References better_p(), edge_def::dest, ignore_bb_p(), edge_def::probability, probability_cutoff, and basic_block_def::succs.

static int find_trace ( basic_block  ,
basic_block  
)
static

Referenced by tail_duplicate().

static int find_trace ( )
static
Find the trace using bb and record it in the TRACE array.
   Return number of basic blocks recorded.   

References bb_seen_p(), edge_def::dest, dump_file, find_best_predecessor(), find_best_successor(), edge_def::flags, basic_block_def::frequency, basic_block_def::index, and edge_def::src.

static bool gate_tracer ( )
static
static bool ignore_bb_p ( const_basic_block  )
static
static bool ignore_bb_p ( )
static
Return true if we should ignore the basic block for purposes of tracing.   

References g, basic_block_def::index, last_stmt(), and optimize_bb_for_size_p().

gimple_opt_pass* make_pass_tracer ( )
static void mark_bb_seen ( )
inlinestatic
static unsigned int tracer ( )
static

Variable Documentation

sbitmap bb_seen
A bit BB->index is set if BB has already been seen, i.e. it is
   connected to some trace already.   
int branch_ratio_cutoff
static
int probability_cutoff
static
Minimal outgoing edge probability considered for superblock formation.   

Referenced by find_best_successor(), find_single_block_region(), schedule_ebbs(), and tail_duplicate().