summaryrefslogtreecommitdiff
path: root/gcc/graphds.c
diff options
context:
space:
mode:
authortneumann <tneumann@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-05 15:41:04 +0000
committertneumann <tneumann@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-05 15:41:04 +0000
commitf780cc25eaffc78f268a94471da728ac7945751f (patch)
treef12abaf00f4ac040bcdbeb67b7ce6b482e1ffff4 /gcc/graphds.c
parentd8f696cf2564f0277efec602a07dc6ff29da8d2a (diff)
downloadgcc-f780cc25eaffc78f268a94471da728ac7945751f.tar.gz
* cfg.c (init_flow): Use type safe memory macros.
(alloc_block): Likewise. (unchecked_make_edge): Likewise. (dump_flow_info): Avoid using C++ keywords as variable names. (copy_original_table_clear): Cast according to the coding conventions. (copy_original_table_set): Likewise. * cfgexpand (label_rtx_for_bb): Likewise. (expand_gimüle_basic_block): Likewise. * cfghooks.c (dump_bb): Likewise. (lv_adjust_loop_header_phi): Avoid using C++ keywords as variable names. (lv_add_condition_to_bb): Likewise. * cfglayout (relink_block_chain): Cast according to the coding conventions. (fixup_reorder_chain): Likewise. (fixup_fallthru_exit_predecessor): Likewise. * cfgloop.c (glb_enum_p): Likewise. (get_exit_description): Likewise. (dump_recorded_exit): Likewise. * cfgloop.h (enum loop_estimation): Move out of struct scope... (struct loop): ... from here. * cfgloopmanip (rpe_enum_p): Cast according to the coding conventions. * cfgrtl.c (rtl_create_basic_block): Likewise. (rtl_split_block): Likewise. (rtl_dump_bb): Likewise. (cfg_layout_split_block): Likewise. (init_rtl_bb_info): Use typesafe memory macros. * graphds.h (struct graph_edge): Renamed edge to graph_edge. * graphds.h: Updated all usages of edge to graph_edge. * graphds.c: Likewise. * cfgloopanal.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125336 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphds.c')
-rw-r--r--gcc/graphds.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/graphds.c b/gcc/graphds.c
index 1496e09a028..da5a4e52e0b 100644
--- a/gcc/graphds.c
+++ b/gcc/graphds.c
@@ -34,7 +34,7 @@ void
dump_graph (FILE *f, struct graph *g)
{
int i;
- struct edge *e;
+ struct graph_edge *e;
for (i = 0; i < g->n_vertices; i++)
{
@@ -69,10 +69,10 @@ new_graph (int n_vertices)
/* Adds an edge from F to T to graph G. The new edge is returned. */
-struct edge *
+struct graph_edge *
add_edge (struct graph *g, int f, int t)
{
- struct edge *e = XNEW (struct edge);
+ struct graph_edge *e = XNEW (struct graph_edge);
struct vertex *vf = &g->vertices[f], *vt = &g->vertices[t];
@@ -95,7 +95,7 @@ identify_vertices (struct graph *g, int v, int u)
{
struct vertex *vv = &g->vertices[v];
struct vertex *uu = &g->vertices[u];
- struct edge *e, *next;
+ struct graph_edge *e, *next;
for (e = uu->succ; e; e = next)
{
@@ -122,7 +122,7 @@ identify_vertices (struct graph *g, int v, int u)
direction given by FORWARD. */
static inline int
-dfs_edge_src (struct edge *e, bool forward)
+dfs_edge_src (struct graph_edge *e, bool forward)
{
return forward ? e->src : e->dest;
}
@@ -131,7 +131,7 @@ dfs_edge_src (struct edge *e, bool forward)
the direction given by FORWARD. */
static inline int
-dfs_edge_dest (struct edge *e, bool forward)
+dfs_edge_dest (struct graph_edge *e, bool forward)
{
return forward ? e->dest : e->src;
}
@@ -139,8 +139,8 @@ dfs_edge_dest (struct edge *e, bool forward)
/* Helper function for graphds_dfs. Returns the first edge after E (including
E), in the graph direction given by FORWARD, that belongs to SUBGRAPH. */
-static inline struct edge *
-foll_in_subgraph (struct edge *e, bool forward, bitmap subgraph)
+static inline struct graph_edge *
+foll_in_subgraph (struct graph_edge *e, bool forward, bitmap subgraph)
{
int d;
@@ -162,10 +162,10 @@ foll_in_subgraph (struct edge *e, bool forward, bitmap subgraph)
/* Helper function for graphds_dfs. Select the first edge from V in G, in the
direction given by FORWARD, that belongs to SUBGRAPH. */
-static inline struct edge *
+static inline struct graph_edge *
dfs_fst_edge (struct graph *g, int v, bool forward, bitmap subgraph)
{
- struct edge *e;
+ struct graph_edge *e;
e = (forward ? g->vertices[v].succ : g->vertices[v].pred);
return foll_in_subgraph (e, forward, subgraph);
@@ -174,8 +174,8 @@ dfs_fst_edge (struct graph *g, int v, bool forward, bitmap subgraph)
/* Helper function for graphds_dfs. Returns the next edge after E, in the
graph direction given by FORWARD, that belongs to SUBGRAPH. */
-static inline struct edge *
-dfs_next_edge (struct edge *e, bool forward, bitmap subgraph)
+static inline struct graph_edge *
+dfs_next_edge (struct graph_edge *e, bool forward, bitmap subgraph)
{
return foll_in_subgraph (forward ? e->succ_next : e->pred_next,
forward, subgraph);
@@ -192,8 +192,8 @@ graphds_dfs (struct graph *g, int *qs, int nq, VEC (int, heap) **qt,
bool forward, bitmap subgraph)
{
int i, tick = 0, v, comp = 0, top;
- struct edge *e;
- struct edge **stack = XNEWVEC (struct edge *, g->n_vertices);
+ struct graph_edge *e;
+ struct graph_edge **stack = XNEWVEC (struct graph_edge *, g->n_vertices);
bitmap_iterator bi;
unsigned av;
@@ -314,7 +314,7 @@ graphds_scc (struct graph *g, bitmap subgraph)
void
for_each_edge (struct graph *g, graphds_edge_callback callback)
{
- struct edge *e;
+ struct graph_edge *e;
int i;
for (i = 0; i < g->n_vertices; i++)
@@ -327,7 +327,7 @@ for_each_edge (struct graph *g, graphds_edge_callback callback)
void
free_graph (struct graph *g)
{
- struct edge *e, *n;
+ struct graph_edge *e, *n;
struct vertex *v;
int i;
@@ -406,7 +406,7 @@ graphds_domtree (struct graph *g, int entry,
int *marks = XCNEWVEC (int, g->n_vertices);
int mark = 1, i, v, idom;
bool changed = true;
- struct edge *e;
+ struct graph_edge *e;
/* We use a slight modification of the standard iterative algorithm, as
described in