osprey/ir_tools/ir_graph_util.c File Reference

#include <stdio.h>
#include <assert.h>
#include "ir_graph_util.h"

Include dependency graph for ir_graph_util.c:

Go to the source code of this file.

Defines

#define VISITED   TRUE

Functions/Subroutines

GRAPHbuild_graph_u (VINDEX vertex_size, EINDEX edge_size, MEM_POOL *m)
GRAPHbuild_graph (MEM_POOL *m)
static void grow_vertex (GRAPH *g)
static void grow_edge (GRAPH *g)
VINDEX add_vertex (GRAPH *g, void *user)
EINDEX add_edge (GRAPH *g, VINDEX from, VINDEX to, void *user)
BOOL is_vertex (GRAPH *g, VINDEX vertex)
VINDEX next_vertex (GRAPH *g, VINDEX vertex)
void delete_edge (GRAPH *g, EINDEX edge)
voiddelete_vertex (GRAPH *g, VINDEX vertex)
BOOL is_edge (GRAPH *g, EINDEX edge)
voidget_vertex (GRAPH *g, VINDEX vertex)
int num_preds (GRAPH *g, VINDEX vertex)
int num_succs (GRAPH *g, VINDEX vertex)
voidget_edge (GRAPH *g, VINDEX from, VINDEX to)
int edge_count (GRAPH *g, VINDEX from, VINDEX to)
voidget_edge_u (GRAPH *g, EINDEX e)
void set_edge_u (GRAPH *g, EINDEX e, void *user)
V_ITERcreate_vertex_iter (GRAPH *g, VINDEX vertex, MEM_POOL *m)
VINDEX first_v_preds (V_ITER *v_i)
VINDEX next_v_preds (V_ITER *v_i)
VINDEX first_v_succs (V_ITER *v_i)
VINDEX next_v_succs (V_ITER *v_i)
int get_vertex_level (GRAPH *g, VINDEX v)
void set_vertex_level (GRAPH *g, VINDEX v, int level)
static void Search (GRAPH *g, VINDEX v, DFN *d, BOOL *visit, EINDEX ei)
DFNDepth_First_Ordering (GRAPH *g, MEM_POOL *m)
void Print_Pred (GRAPH *g, VINDEX v, void(*prn)())
void Print_DFN (DFN *d, GRAPH *g, void(*prn)(), void(*prn_c)())
void Free_DFN (DFN *d, MEM_POOL *m)

Variables

static char * Malloc_Mem_Pool
static int lvl


Define Documentation

#define VISITED   TRUE

Definition at line 712 of file ir_graph_util.c.


Function Documentation

EINDEX add_edge ( GRAPH g,
VINDEX  from,
VINDEX  to,
void user 
)

VINDEX add_vertex ( GRAPH g,
void user 
)

GRAPH* build_graph ( MEM_POOL m  ) 

GRAPH* build_graph_u ( VINDEX  vertex_size,
EINDEX  edge_size,
MEM_POOL m 
)

V_ITER* create_vertex_iter ( GRAPH g,
VINDEX  vertex,
MEM_POOL m 
)

void delete_edge ( GRAPH g,
EINDEX  edge 
)

void* delete_vertex ( GRAPH g,
VINDEX  vertex 
)

DFN* Depth_First_Ordering ( GRAPH g,
MEM_POOL m 
)

int edge_count ( GRAPH g,
VINDEX  from,
VINDEX  to 
)

VINDEX first_v_preds ( V_ITER v_i  ) 

VINDEX first_v_succs ( V_ITER v_i  ) 

void Free_DFN ( DFN d,
MEM_POOL m 
)

Definition at line 870 of file ir_graph_util.c.

References DFN_v_list, and MEM_POOL_FREE.

void* get_edge ( GRAPH g,
VINDEX  from,
VINDEX  to 
)

void* get_edge_u ( GRAPH g,
EINDEX  e 
)

Definition at line 524 of file ir_graph_util.c.

References EDGE_user, GR_ASSERT, GRAPH_e_i, and is_edge().

Referenced by Print_Pred(), and Search().

void* get_vertex ( GRAPH g,
VINDEX  vertex 
)

Definition at line 450 of file ir_graph_util.c.

References GR_ASSERT, GRAPH_v_i, is_vertex(), and VERTEX_user.

int get_vertex_level ( GRAPH g,
VINDEX  v 
)

Definition at line 674 of file ir_graph_util.c.

References GRAPH_v_i, and VERTEX_level.

Referenced by Print_DFN().

static void grow_edge ( GRAPH g  )  [static]

static void grow_vertex ( GRAPH g  )  [static]

BOOL is_edge ( GRAPH g,
EINDEX  edge 
)

Definition at line 441 of file ir_graph_util.c.

References EDGE_from, GRAPH_e_i, GRAPH_emax, and INVALID_VINDEX.

Referenced by delete_edge(), and get_edge_u().

BOOL is_vertex ( GRAPH g,
VINDEX  vertex 
)

VINDEX next_v_preds ( V_ITER v_i  ) 

Definition at line 593 of file ir_graph_util.c.

References EDGE_from, EDGE_nto, GRAPH_e_i, INVALID_VINDEX, MEM_POOL_FREE, V_ITER_c_e, V_ITER_g, V_ITER_m, and V_ITER_nto.

Referenced by Print_Pred().

VINDEX next_v_succs ( V_ITER v_i  ) 

Definition at line 647 of file ir_graph_util.c.

References EDGE_nfrom, EDGE_to, GRAPH_e_i, INVALID_VINDEX, MEM_POOL_FREE, V_ITER_c_e, V_ITER_g, V_ITER_m, and V_ITER_nfrom.

Referenced by Search().

VINDEX next_vertex ( GRAPH g,
VINDEX  vertex 
)

Definition at line 312 of file ir_graph_util.c.

References GR_ASSERT, GRAPH_vmax, INVALID_VINDEX, and is_vertex().

Referenced by accumulate_line_counts().

int num_preds ( GRAPH g,
VINDEX  vertex 
)

Definition at line 460 of file ir_graph_util.c.

References GR_ASSERT, GRAPH_v_i, is_vertex(), and VERTEX_tcnt.

int num_succs ( GRAPH g,
VINDEX  vertex 
)

Definition at line 470 of file ir_graph_util.c.

References GR_ASSERT, GRAPH_v_i, is_vertex(), and VERTEX_fcnt.

Referenced by GCM_Fill_Branch_Delay_Slots().

void Print_DFN ( DFN d,
GRAPH g,
void(*)()  prn,
void(*)()  prn_c 
)

void Print_Pred ( GRAPH g,
VINDEX  v,
void(*)()  prn 
)

static void Search ( GRAPH g,
VINDEX  v,
DFN d,
BOOL visit,
EINDEX  ei 
) [static]

void set_edge_u ( GRAPH g,
EINDEX  e,
void user 
)

Definition at line 534 of file ir_graph_util.c.

References EDGE_user, and GRAPH_e_i.

Referenced by build_call_graph().

void set_vertex_level ( GRAPH g,
VINDEX  v,
int  level 
)

Definition at line 683 of file ir_graph_util.c.

References GRAPH_v_i, and VERTEX_level.

Referenced by Search().


Variable Documentation

int lvl [static]

char* Malloc_Mem_Pool [static]

Definition at line 713 of file ir_graph_util.c.


Generated on Wed Apr 8 15:10:56 2009 for Open64 by  doxygen 1.5.6