osprey-gcc/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 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 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 add_unlikely_executed_notes (void)
static void find_rarely_executed_basic_blocks_and_crossing_edges (edge *, int *, int *)
static void mark_bb_for_unlikely_executed_section (basic_block)
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)
void reorder_basic_blocks (unsigned int flags)
void duplicate_computed_gotos (void)
void partition_hot_cold_basic_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
int max_entry_frequency
gcov_type max_entry_count


Define Documentation

#define DUPLICATION_THRESHOLD   100

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

Referenced by connect_traces().

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

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

 
#define gen_return (  )     NULL_RTX

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

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

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

Referenced by copy_bb(), and reorder_basic_blocks().

#define HAVE_return   0

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

#define N_ROUNDS   5

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

Referenced by find_traces(), and find_traces_1_round().


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 void add_unlikely_executed_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 852 of file bb-reorder.c.

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

Referenced by find_traces_1_round().

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]

void duplicate_computed_gotos ( void   ) 

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 int get_uncond_jump_length ( void   )  [static]

static void mark_bb_for_unlikely_executed_section ( basic_block  bb  )  [static]

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

void partition_hot_cold_basic_blocks ( void   ) 

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  ) 

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

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


Variable Documentation

int array_size [static]

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

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

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

Referenced by find_traces().

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

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

Referenced by find_traces().

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

Referenced by connect_traces(), and find_traces().

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

Referenced by connect_traces(), and find_traces().

int uncond_jump_length [static]

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

Referenced by copy_bb_p(), duplicate_computed_gotos(), and reorder_basic_blocks().


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