summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/conflict.c22
-rw-r--r--gcc/ssa.c2
-rw-r--r--gcc/toplev.c20
4 files changed, 19 insertions, 34 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9db44816a74..5b691069f51 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2000-04-06 Alex Samuel <samuel@codesourcery.com>
+
+ * ssa.c (compute_conservative_reg_partition): Declare with
+ void arguments.
+ * toplev.c (clean_dump_file): Remove previously-deleted function
+ inadvertantly merged back in.
+ * conflict.c (conflict_graph_add): Use a single call to
+ htab_find_slot to look up and insert.
+
2000-04-06 Richard Henderson <rth@cygnus.com>
* genrecog.c (*): Rename _last_insn to last_insn.
diff --git a/gcc/conflict.c b/gcc/conflict.c
index 51851a2b1b5..667a18a672c 100644
--- a/gcc/conflict.c
+++ b/gcc/conflict.c
@@ -201,21 +201,20 @@ conflict_graph_add (graph, reg1, reg2)
{
int smaller = MIN (reg1, reg2);
int larger = MAX (reg1, reg2);
+ struct conflict_graph_arc_def dummy;
conflict_graph_arc arc;
- void **hash_table_slot;
+ void **slot;
/* A reg cannot conflict with itself. */
if (reg1 == reg2)
abort ();
- /* If the conflict is already there, do nothing.
-
- FIXME: This is a little wastful; it would be faster to look up the
- conflict in the hash table, returning it if it exists and
- inserting a new entry if it doesn't, all in one operation. This
- would save an extra hash lookup. However, the hashtab interface
- doesn't really allow this right now. */
- if (conflict_graph_conflict_p (graph, reg1, reg2))
+ dummy.smaller = smaller;
+ dummy.larger = larger;
+ slot = htab_find_slot (graph->arc_hash_table, (void *) &dummy, 1);
+
+ /* If the conflict is already there, do nothing. */
+ if (*slot != NULL)
return 0;
/* Allocate an arc. */
@@ -234,9 +233,7 @@ conflict_graph_add (graph, reg1, reg2)
graph->neighbor_heads[larger] = arc;
/* Put it in the hash table. */
- hash_table_slot = htab_find_slot (graph->arc_hash_table,
- (void *) arc, 1);
- *hash_table_slot = (void *) arc;
+ *slot = (void *) arc;
return 1;
}
@@ -532,4 +529,3 @@ conflict_graph_compute (regs, p)
return graph;
}
-
diff --git a/gcc/ssa.c b/gcc/ssa.c
index 1bf23c08a4f..b10c46ff0bb 100644
--- a/gcc/ssa.c
+++ b/gcc/ssa.c
@@ -139,7 +139,7 @@ static int make_regs_equivalent_over_bad_edges
static int make_equivalent_phi_alternatives_equivalent
PARAMS ((int bb, partition reg_partition));
static partition compute_conservative_reg_partition
- PARAMS (());
+ PARAMS ((void));
static int rename_equivalent_regs_in_insn
PARAMS ((rtx *ptr, void *data));
diff --git a/gcc/toplev.c b/gcc/toplev.c
index df5a764da14..6ab7efcba5c 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1892,26 +1892,6 @@ close_dump_file (index, func, insns)
});
}
-/* Routine to empty a dump file. */
-static void
-clean_dump_file (suffix)
- const char *suffix;
-{
- char * const dumpname = concat (dump_base_name, suffix, NULL);
-
- rtl_dump_file = fopen (dumpname, "w");
-
- if (rtl_dump_file == NULL)
- pfatal_with_name (dumpname);
-
- free (dumpname);
-
- fclose (rtl_dump_file);
- rtl_dump_file = NULL;
-
- return;
-}
-
/* Do any final processing required for the declarations in VEC, of
which there are LEN. We write out inline functions and variables
that have been deferred until this point, but which are required.