osprey/be/cg/cg_gcov.cxx File Reference

#include "bb.h"
#include "cg.h"
#include "cg_region.h"
#include "cg_flags.h"
#include "cgexp.h"
#include "cgexp_internals.h"
#include "cxx_memory.h"
#include "data_layout.h"
#include "defs.h"
#include "flags.h"
#include "gcov-io.h"
#include "glob.h"
#include "ir_reader.h"
#include "label_util.h"
#include "mempool.h"
#include "stblock.h"
#include "symtab.h"
#include "symtab_access.h"
#include "unistd.h"

Include dependency graph for cg_gcov.cxx:

Go to the source code of this file.

Data Types

type  function_list

Defines

#define MAX_COUNTER_SECTIONS   4
#define BB_TO_GCOV_INDEX(bb)   BB_id(bb)
#define MAXPATHLEN   100
#define DIR_SEPARATOR   '/'
#define IS_DIR_SEPARATOR(ch)   ((ch) == DIR_SEPARATOR)
#define CHSUM_HASH   500000003
#define CHSUM_SHIFT   2

Functions/Subroutines

char * lbasename (char *name)
char * getpwd ()
static STget_symbol (const char *sym_name)
void Gcov_BB_Prepend_Ops (BB *bb, OPS *ops)
void CG_Init_Func_Infos (ST *func_infos)
void CG_End_Final ()
void CG_Compute_Checksum ()
static BBfind_group (BB *bb)
static void union_groups (BB *bb1, BB *bb2)
static BOOL EDGE_CRITICAL_P (BB *src, BB *dest)
static void find_spanning_tree ()
static void output_gcov_string (const char *string, long delimiter)
void CG_Init_Gcov ()
void CG_End_Gcov ()
void CG_Gcov_Generation ()
static BOOL Opnd_Tn_In_BB (BB *bb, REGISTER reg, unsigned char type)
static INT32 Get_Return_Reg_Sum (BB *bb)
static INT32 Get_Float_Return_Reg_Sum (BB *bb)
static BOOL Is_BB_Empty (BB *bb)
static void BB_Mov_Ops (BB *dest_bb, BB *src_bb, REGISTER reg, unsigned char type)
static void Move_Save_Regs_OP (BB *instr_bb, BB *bb, INT32 ret_reg_num, INT32 f_ret_reg_num)
static void Process_Arc_Profile_Region_Options (void)
static BOOL Indirect_Branch (BB *bb)
static BOOL BB_Is_Unique_Instr_Predecessor (BB *src, BB *dest)
void CG_Instrument_Arcs ()

Variables

MEM_POOL name_pool
MEM_POOLname_pool_ptr = NULL
static struct function_listfunctions_head = 0
static struct function_list ** functions_tail = &functions_head
static FILEbbg_file
static char * bbg_file_name
static FILEbb_file
static FILEda_file
static int last_bb_file_num
static int last_bb_line_num
static int local_n_edges = 0
static int local_n_a_edges = 0
static int local_n_basic_blocks = 0
static int n_instr_edges = 0
static int pu_flag = -1
static int begin_id = -1
static int end_id = -1
static long chksum = 0


Define Documentation

#define BB_TO_GCOV_INDEX ( bb   )     BB_id(bb)

#define CHSUM_HASH   500000003

#define CHSUM_SHIFT   2

#define DIR_SEPARATOR   '/'

#define IS_DIR_SEPARATOR ( ch   )     ((ch) == DIR_SEPARATOR)

#define MAX_COUNTER_SECTIONS   4

Definition at line 73 of file cg_gcov.cxx.

#define MAXPATHLEN   100


Function Documentation

static BOOL BB_Is_Unique_Instr_Predecessor ( BB src,
BB dest 
) [static]

static void BB_Mov_Ops ( BB dest_bb,
BB src_bb,
REGISTER  reg,
unsigned char  type 
) [static]

void CG_Compute_Checksum (  ) 

void CG_End_Final (  ) 

void CG_End_Gcov (  ) 

Definition at line 874 of file cg_gcov.cxx.

References bb_file, bbg_file, FALSE, fclose(), flag_test_coverage, MEM_POOL_Delete(), MEM_POOL_Pop, and NULL.

Referenced by CG_Fini().

void CG_Gcov_Generation (  ) 

void CG_Init_Func_Infos ( ST func_infos  ) 

void CG_Init_Gcov (  ) 

void CG_Instrument_Arcs (  ) 

static BOOL EDGE_CRITICAL_P ( BB src,
BB dest 
) [static]

Definition at line 737 of file cg_gcov.cxx.

References BB_preds, BB_succs, and BBlist_Len().

static BB* find_group ( BB bb  )  [static]

Definition at line 708 of file cg_gcov.cxx.

References NULL.

Referenced by find_spanning_tree(), and union_groups().

static void find_spanning_tree (  )  [static]

void Gcov_BB_Prepend_Ops ( BB bb,
OPS ops 
)

static INT32 Get_Float_Return_Reg_Sum ( BB bb  )  [static]

static INT32 Get_Return_Reg_Sum ( BB bb  )  [static]

static ST* get_symbol ( const char *  sym_name  )  [static]

char * getpwd ( void   ) 

Definition at line 132 of file cg_gcov.cxx.

Referenced by build_gcov_info(), CG_End_Final(), end_final(), finish_repo(), get_src_pwd(), and main().

static BOOL Indirect_Branch ( BB bb  )  [static]

Definition at line 1232 of file cg_gcov.cxx.

References BB_branch_op(), CGTARG_Branch_Info(), FALSE, INT, and TRUE.

Referenced by BB_Is_Unique_Instr_Predecessor().

static BOOL Is_BB_Empty ( BB bb  )  [static]

char* lbasename ( char *  name  ) 

static void Move_Save_Regs_OP ( BB instr_bb,
BB bb,
INT32  ret_reg_num,
INT32  f_ret_reg_num 
) [static]

Definition at line 1194 of file cg_gcov.cxx.

References BB_Mov_Ops(), FmtAssert, i, RAX, RDX, and XMM0.

Referenced by CG_Instrument_Arcs().

static BOOL Opnd_Tn_In_BB ( BB bb,
REGISTER  reg,
unsigned char  type 
) [static]

static void output_gcov_string ( const char *  string,
long  delimiter 
) [static]

Definition at line 796 of file cg_gcov.cxx.

References __write_long(), bb_file, c, fwrite, and strlen().

Referenced by branch_prob(), and CG_Gcov_Generation().

static void Process_Arc_Profile_Region_Options ( void   )  [static]

Definition at line 1215 of file cg_gcov.cxx.

References atoi(), begin_id, Cur_PU_Name, end_id, NULL, OLIST_next, OLIST_opt, OLIST_val, pu_flag, and strcmp().

Referenced by CG_Instrument_Arcs().

static void union_groups ( BB bb1,
BB bb2 
) [static]

Definition at line 726 of file cg_gcov.cxx.

References find_group(), and FmtAssert.

Referenced by find_spanning_tree().


Variable Documentation

FILE* bb_file [static]

FILE* bbg_file [static]

char* bbg_file_name [static]

int begin_id = -1 [static]

Definition at line 116 of file cg_gcov.cxx.

Referenced by CG_Instrument_Arcs(), and Process_Arc_Profile_Region_Options().

long chksum = 0 [static]

FILE* da_file [static]

int end_id = -1 [static]

Definition at line 90 of file cg_gcov.cxx.

Definition at line 91 of file cg_gcov.cxx.

int last_bb_file_num [static]

Definition at line 108 of file cg_gcov.cxx.

Referenced by CG_Gcov_Generation(), and CG_Init_Gcov().

int last_bb_line_num [static]

Definition at line 108 of file cg_gcov.cxx.

Referenced by CG_Gcov_Generation().

int local_n_a_edges = 0 [static]

Definition at line 110 of file cg_gcov.cxx.

Referenced by CG_Compute_Checksum(), and CG_Gcov_Generation().

int local_n_basic_blocks = 0 [static]

Definition at line 111 of file cg_gcov.cxx.

Referenced by CG_Compute_Checksum(), and CG_Gcov_Generation().

int local_n_edges = 0 [static]

Definition at line 109 of file cg_gcov.cxx.

Referenced by CG_Compute_Checksum().

int n_instr_edges = 0 [static]

Definition at line 112 of file cg_gcov.cxx.

Referenced by CG_Compute_Checksum(), and CG_End_Final().

Definition at line 72 of file cg_gcov.cxx.

int pu_flag = -1 [static]

Definition at line 115 of file cg_gcov.cxx.

Referenced by CG_Instrument_Arcs(), and Process_Arc_Profile_Region_Options().


Generated on Wed Apr 8 14:25:25 2009 for Open64 by  doxygen 1.5.6