mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 22:15:13 +08:00
basic-block.h (find_edge_index): Change parameters.
Thu Sep 23 10:36:55 EDT 1999 Andrew MacLeod <amacleod@cygnus.com> * basic-block.h (find_edge_index): Change parameters. * flow.c (verify_edge_list): Pass basic_block parameters to find_edge_index instead of integers. From-SVN: r29622
This commit is contained in:
parent
7ce787fe03
commit
d675a42620
@ -1,3 +1,9 @@
|
||||
Thu Sep 23 10:36:55 EDT 1999 Andrew MacLeod <amacleod@cygnus.com>
|
||||
|
||||
* basic-block.h (find_edge_index): Change parameters.
|
||||
* flow.c (verify_edge_list): Pass basic_block parameters to
|
||||
find_edge_index instead of integers.
|
||||
|
||||
Thu Sep 23 15:54:12 1999 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* combine.c (simplify_comparison): Use an unsigned shift to adjust
|
||||
|
@ -280,7 +280,8 @@ struct edge_list * create_edge_list PROTO ((void));
|
||||
void free_edge_list PROTO ((struct edge_list *));
|
||||
void print_edge_list PROTO ((FILE *, struct edge_list *));
|
||||
void verify_edge_list PROTO ((FILE *, struct edge_list *));
|
||||
int find_edge_index PROTO ((struct edge_list *, int, int));
|
||||
int find_edge_index PROTO ((struct edge_list *,
|
||||
basic_block, basic_block));
|
||||
|
||||
extern void compute_preds_succs PROTO ((int_list_ptr *, int_list_ptr *,
|
||||
int *, int *));
|
||||
|
43
gcc/flow.c
43
gcc/flow.c
@ -6759,7 +6759,7 @@ verify_edge_list (f, elist)
|
||||
{
|
||||
pred = e->src->index;
|
||||
succ = e->dest->index;
|
||||
index = EDGE_INDEX (elist, pred, succ);
|
||||
index = EDGE_INDEX (elist, e->src, e->dest);
|
||||
if (index == EDGE_INDEX_NO_EDGE)
|
||||
{
|
||||
fprintf (f, "*p* No index for edge from %d to %d\n",pred, succ);
|
||||
@ -6777,7 +6777,7 @@ verify_edge_list (f, elist)
|
||||
{
|
||||
pred = e->src->index;
|
||||
succ = e->dest->index;
|
||||
index = EDGE_INDEX (elist, pred, succ);
|
||||
index = EDGE_INDEX (elist, e->src, e->dest);
|
||||
if (index == EDGE_INDEX_NO_EDGE)
|
||||
{
|
||||
fprintf (f, "*p* No index for edge from %d to %d\n",pred, succ);
|
||||
@ -6813,14 +6813,15 @@ verify_edge_list (f, elist)
|
||||
found_edge = 1;
|
||||
break;
|
||||
}
|
||||
if (EDGE_INDEX (elist, pred, succ) == EDGE_INDEX_NO_EDGE
|
||||
&& found_edge != 0)
|
||||
if (EDGE_INDEX (elist, BASIC_BLOCK (pred), BASIC_BLOCK (succ))
|
||||
== EDGE_INDEX_NO_EDGE && found_edge != 0)
|
||||
fprintf (f, "*** Edge (%d, %d) appears to not have an index\n",
|
||||
pred, succ);
|
||||
if (EDGE_INDEX (elist, pred, succ) != EDGE_INDEX_NO_EDGE
|
||||
&& found_edge == 0)
|
||||
if (EDGE_INDEX (elist, BASIC_BLOCK (pred), BASIC_BLOCK (succ))
|
||||
!= EDGE_INDEX_NO_EDGE && found_edge == 0)
|
||||
fprintf (f, "*** Edge (%d, %d) has index %d, but there is no edge\n",
|
||||
pred, succ, EDGE_INDEX (elist, pred, succ));
|
||||
pred, succ, EDGE_INDEX (elist, BASIC_BLOCK (pred),
|
||||
BASIC_BLOCK (succ)));
|
||||
}
|
||||
for (succ = 0 ; succ < n_basic_blocks; succ++)
|
||||
{
|
||||
@ -6841,14 +6842,15 @@ verify_edge_list (f, elist)
|
||||
found_edge = 1;
|
||||
break;
|
||||
}
|
||||
if (EDGE_INDEX (elist, ENTRY_BLOCK, succ) == EDGE_INDEX_NO_EDGE
|
||||
&& found_edge != 0)
|
||||
if (EDGE_INDEX (elist, ENTRY_BLOCK_PTR, BASIC_BLOCK (succ))
|
||||
== EDGE_INDEX_NO_EDGE && found_edge != 0)
|
||||
fprintf (f, "*** Edge (entry, %d) appears to not have an index\n",
|
||||
succ);
|
||||
if (EDGE_INDEX (elist, ENTRY_BLOCK, succ) != EDGE_INDEX_NO_EDGE
|
||||
&& found_edge == 0)
|
||||
if (EDGE_INDEX (elist, ENTRY_BLOCK_PTR, BASIC_BLOCK (succ))
|
||||
!= EDGE_INDEX_NO_EDGE && found_edge == 0)
|
||||
fprintf (f, "*** Edge (entry, %d) has index %d, but no edge exists\n",
|
||||
succ, EDGE_INDEX (elist, ENTRY_BLOCK, succ));
|
||||
succ, EDGE_INDEX (elist, ENTRY_BLOCK_PTR,
|
||||
BASIC_BLOCK (succ)));
|
||||
}
|
||||
for (pred = 0 ; pred < n_basic_blocks; pred++)
|
||||
{
|
||||
@ -6869,14 +6871,15 @@ verify_edge_list (f, elist)
|
||||
found_edge = 1;
|
||||
break;
|
||||
}
|
||||
if (EDGE_INDEX (elist, pred, EXIT_BLOCK) == EDGE_INDEX_NO_EDGE
|
||||
&& found_edge != 0)
|
||||
if (EDGE_INDEX (elist, BASIC_BLOCK (pred), EXIT_BLOCK_PTR)
|
||||
== EDGE_INDEX_NO_EDGE && found_edge != 0)
|
||||
fprintf (f, "*** Edge (%d, exit) appears to not have an index\n",
|
||||
pred);
|
||||
if (EDGE_INDEX (elist, pred, EXIT_BLOCK) != EDGE_INDEX_NO_EDGE
|
||||
&& found_edge == 0)
|
||||
if (EDGE_INDEX (elist, BASIC_BLOCK (pred), EXIT_BLOCK_PTR)
|
||||
!= EDGE_INDEX_NO_EDGE && found_edge == 0)
|
||||
fprintf (f, "*** Edge (%d, exit) has index %d, but no edge exists\n",
|
||||
pred, EDGE_INDEX (elist, pred, EXIT_BLOCK));
|
||||
pred, EDGE_INDEX (elist, BASIC_BLOCK (pred),
|
||||
EXIT_BLOCK_PTR));
|
||||
}
|
||||
}
|
||||
|
||||
@ -6886,13 +6889,13 @@ verify_edge_list (f, elist)
|
||||
int
|
||||
find_edge_index (edge_list, pred, succ)
|
||||
struct edge_list *edge_list;
|
||||
int pred, succ;
|
||||
basic_block pred, succ;
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < NUM_EDGES (edge_list); x++)
|
||||
{
|
||||
if (INDEX_EDGE_PRED_BB (edge_list, x)->index == pred
|
||||
&& INDEX_EDGE_SUCC_BB (edge_list, x)->index == succ)
|
||||
if (INDEX_EDGE_PRED_BB (edge_list, x) == pred
|
||||
&& INDEX_EDGE_SUCC_BB (edge_list, x) == succ)
|
||||
return x;
|
||||
}
|
||||
return (EDGE_INDEX_NO_EDGE);
|
||||
|
Loading…
Reference in New Issue
Block a user