osprey-gcc-4.2.0/gcc/bb-reorder.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "regs.h"
#include "flags.h"
#include "timevar.h"
#include "output.h"
#include "cfglayout.h"
#include "fibheap.h"
#include "target.h"
#include "function.h"
#include "tm_p.h"
#include "obstack.h"
#include "expr.h"
#include "params.h"
#include "toplev.h"
#include "tree-pass.h"

Include dependency graph for bb-reorder.c:

Go to the source code of this file.

Data Types

type  bbro_basic_block_data_def
type  trace

Defines

#define HAVE_conditional_execution   0
#define N_ROUNDS   5
#define HAVE_return   0
#define gen_return()   NULL_RTX
#define DUPLICATION_THRESHOLD   100
#define GET_ARRAY_SIZE(X)   ((((X) / 4) + 1) * 5)
#define FREE(P)   (gcc_assert (P), free (P), P = 0)

Typedefs

typedef struct
bbro_basic_block_data_def 
bbro_basic_block_data

Functions/Subroutines

static void find_traces (int *, struct trace *)
static basic_block rotate_loop (edge, struct trace *, int)
static void mark_bb_visited (basic_block, int)
static void find_traces_1_round (int, int, gcov_type, struct trace *, int *, int, fibheap_t *, int)
static basic_block copy_bb (basic_block, edge, basic_block, int)
static fibheapkey_t bb_to_key (basic_block)
static bool better_edge_p (basic_block, edge, int, int, int, int, edge)
static void connect_traces (int, struct trace *)
static bool copy_bb_p (basic_block, int)
static int get_uncond_jump_length (void)
static bool push_to_next_round_p (basic_block, int, int, int, gcov_type)
static void find_rarely_executed_basic_blocks_and_crossing_edges (edge *, int *, int *)
static void add_labels_and_missing_jumps (edge *, int)
static void add_reg_crossing_jump_notes (void)
static void fix_up_fall_thru_edges (void)
static void fix_edges_for_rarely_executed_code (edge *, int)
static void fix_crossing_conditional_branches (void)
static void fix_crossing_unconditional_branches (void)
static basic_block find_jump_block (basic_block jump_dest)
static void verify_hot_cold_block_grouping (void)
void reorder_basic_blocks (unsigned int flags)
static void insert_section_boundary_note (void)
static bool gate_duplicate_computed_gotos (void)
static unsigned int duplicate_computed_gotos (void)
static void partition_hot_cold_basic_blocks (void)
static bool gate_handle_reorder_blocks (void)
static unsigned int rest_of_handle_reorder_blocks (void)
static bool gate_handle_partition_blocks (void)
static unsigned int rest_of_handle_partition_blocks (void)

Variables

static int branch_threshold [N_ROUNDS] = {400, 200, 100, 0, 0}
static int exec_threshold [N_ROUNDS] = {500, 200, 50, 0, 0}
static int uncond_jump_length
static int array_size
static bbro_basic_block_databbd
static int max_entry_frequency
static gcov_type max_entry_count
struct tree_opt_pass pass_duplicate_computed_gotos
struct tree_opt_pass pass_reorder_blocks
struct tree_opt_pass pass_partition_blocks


Define Documentation

#define DUPLICATION_THRESHOLD   100

Definition at line 114 of file bb-reorder.c.

#define FREE ( P   )     (gcc_assert (P), free (P), P = 0)

Definition at line 149 of file bb-reorder.c.

 
#define gen_return (  )     NULL_RTX

Definition at line 102 of file bb-reorder.c.

#define GET_ARRAY_SIZE ( X   )     ((((X) / 4) + 1) * 5)

Definition at line 146 of file bb-reorder.c.

#define HAVE_conditional_execution   0

Definition at line 89 of file bb-reorder.c.

#define HAVE_return   0

Definition at line 101 of file bb-reorder.c.

#define N_ROUNDS   5

Definition at line 95 of file bb-reorder.c.


Typedef Documentation


Function Documentation

static void add_labels_and_missing_jumps ( edge crossing_edges,
int  n_crossing_edges 
) [static]

static void add_reg_crossing_jump_notes ( void   )  [static]

static fibheapkey_t bb_to_key ( basic_block  bb  )  [static]

static bool better_edge_p ( basic_block  bb,
edge  e,
int  prob,
int  freq,
int  best_prob,
int  best_freq,
edge  cur_best_edge 
) [static]

Definition at line 849 of file bb-reorder.c.

References edge::dest, EDGE_CROSSING, and edge::flags.

static void connect_traces ( int  n_traces,
struct trace traces 
) [static]

static basic_block copy_bb ( basic_block  old_bb,
edge  e,
basic_block  bb,
int  trace 
) [static]

static bool copy_bb_p ( basic_block  bb,
int  code_may_grow 
) [static]

static unsigned int duplicate_computed_gotos ( void   )  [static]

static basic_block find_jump_block ( basic_block  jump_dest  )  [static]

static void find_rarely_executed_basic_blocks_and_crossing_edges ( edge crossing_edges,
int *  n_crossing_edges,
int *  max_idx 
) [static]

static void find_traces ( int *  n_traces,
struct trace traces 
) [static]

static void find_traces_1_round ( int  branch_th,
int  exec_th,
gcov_type  count_th,
struct trace traces,
int *  n_traces,
int  round,
fibheap_t heap,
int  number_of_rounds 
) [static]

static void fix_crossing_conditional_branches ( void   )  [static]

static void fix_crossing_unconditional_branches ( void   )  [static]

static void fix_edges_for_rarely_executed_code ( edge crossing_edges,
int  n_crossing_edges 
) [static]

static void fix_up_fall_thru_edges ( void   )  [static]

static bool gate_duplicate_computed_gotos ( void   )  [static]

Definition at line 1976 of file bb-reorder.c.

References flag_expensive_optimizations, optimize, and optimize_size.

static bool gate_handle_partition_blocks ( void   )  [static]

static bool gate_handle_reorder_blocks ( void   )  [static]

Definition at line 2198 of file bb-reorder.c.

References optimize.

static int get_uncond_jump_length ( void   )  [static]

static void insert_section_boundary_note ( void   )  [static]

Definition at line 1949 of file bb-reorder.c.

References BB_HEAD, BB_PARTITION, emit_note_before(), and FOR_EACH_BB.

Referenced by rest_of_handle_reorder_blocks().

static void mark_bb_visited ( basic_block  bb,
int  trace 
) [static]

static void partition_hot_cold_basic_blocks ( void   )  [static]

static bool push_to_next_round_p ( basic_block  bb,
int  round,
int  number_of_rounds,
int  exec_th,
gcov_type  count_th 
) [static]

void reorder_basic_blocks ( unsigned int  flags  ) 

static unsigned int rest_of_handle_partition_blocks ( void   )  [static]

static unsigned int rest_of_handle_reorder_blocks ( void   )  [static]

static basic_block rotate_loop ( edge  back_edge,
struct trace trace,
int  trace_n 
) [static]

static void verify_hot_cold_block_grouping ( void   )  [static]

Definition at line 1857 of file bb-reorder.c.

References BB_PARTITION, err, error(), FOR_EACH_BB, gcc_assert, and basic_block_def::index.

Referenced by reorder_basic_blocks().


Variable Documentation

int array_size [static]

Definition at line 139 of file bb-reorder.c.

Definition at line 142 of file bb-reorder.c.

int branch_threshold[N_ROUNDS] = {400, 200, 100, 0, 0} [static]

Definition at line 107 of file bb-reorder.c.

int exec_threshold[N_ROUNDS] = {500, 200, 50, 0, 0} [static]

Definition at line 110 of file bb-reorder.c.

Definition at line 166 of file bb-reorder.c.

int max_entry_frequency [static]

Definition at line 165 of file bb-reorder.c.

Initial value:

{
  "compgotos",                          
  gate_duplicate_computed_gotos,        
  duplicate_computed_gotos,             
  NULL,                                 
  NULL,                                 
  0,                                    
  TV_REORDER_BLOCKS,                    
  0,                                    
  0,                                    
  0,                                    
  0,                                    
  TODO_dump_func,                       
  0                                     
}

Definition at line 2089 of file bb-reorder.c.

Referenced by init_optimization_passes().

Initial value:

{
  "bbpart",                             
  gate_handle_partition_blocks,         
  rest_of_handle_partition_blocks,      
  NULL,                                 
  NULL,                                 
  0,                                    
  TV_REORDER_BLOCKS,                    
  0,                                    
  0,                                    
  0,                                    
  0,                                    
  TODO_dump_func,                       
  0                                     
}

Definition at line 2284 of file bb-reorder.c.

Referenced by init_optimization_passes().

Initial value:

{
  "bbro",                               
  gate_handle_reorder_blocks,           
  rest_of_handle_reorder_blocks,        
  NULL,                                 
  NULL,                                 
  0,                                    
  TV_REORDER_BLOCKS,                    
  0,                                    
  0,                                    
  0,                                    
  0,                                    
  TODO_dump_func,                       
  'B'                                   
}

Definition at line 2241 of file bb-reorder.c.

Referenced by init_optimization_passes().

int uncond_jump_length [static]

Definition at line 117 of file bb-reorder.c.


Generated on Wed Apr 8 15:11:50 2009 for Open64 by  doxygen 1.5.6