summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authoramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-23 15:07:26 +0000
committeramacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-23 15:07:26 +0000
commit3b35d060e01b3ec84ae661ef7206700d4ebc14df (patch)
tree8fe93f30808af4c502b786e5bc8aaa3259b932ef /gcc
parentb176b0456f656e6dddf0bfdb66a463be1904306d (diff)
downloadgcc-3b35d060e01b3ec84ae661ef7206700d4ebc14df.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/basic-block.h3
-rw-r--r--gcc/flow.c43
3 files changed, 31 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aee30b90278..90424740f04 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 4721757e4b6..881085b0d07 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -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 *));
diff --git a/gcc/flow.c b/gcc/flow.c
index 4a4923cc257..e23be42c89f 100644
--- a/gcc/flow.c
+++ b/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);