diff options
author | Steven Bosscher <stevenb@suse.de> | 2004-08-18 20:53:59 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2004-08-18 20:53:59 +0000 |
commit | 0516f6fe82641daf7c1ac8812998049ac591201e (patch) | |
tree | 93b7857ed347181c4c208adbe8b5fdd8d2f48e15 /gcc/cselib.c | |
parent | 95013377bd98d4456996c3e7a2921b4c475239a1 (diff) | |
download | gcc-0516f6fe82641daf7c1ac8812998049ac591201e.zip gcc-0516f6fe82641daf7c1ac8812998049ac591201e.tar.gz gcc-0516f6fe82641daf7c1ac8812998049ac591201e.tar.bz2 |
Makefile.in (OBJS-common): Add postreload-gcse.c.
* Makefile.in (OBJS-common): Add postreload-gcse.c.
Add new postreload-gcse.o.
* cse.c (SAFE_HASH): Define as wrapper around safe_hash.
(lookup_as_function, insert, rehash_using_reg, use_related_value,
equiv_constant): Use SAFE_HASH instead of safe_hash.
(exp_equiv_p): Export. Add for_gcse argument when comparing
for GCSE.
(lookup, lookup_for_remove, merge_equiv_classes, find_best_addr,
find_comparison_args, fold_rtx, cse_insn): Update callers.
(hash_rtx): New function derived from old canon_hash and bits
from gcse.c hash_expr_1.
(canon_hash_string): Rename to hash_rtx_string.
(canon_hash, safe_hash): Make static inline. Call hash_rtx.
* cselib.c (hash_rtx): Rename to cselib_hash_rtx.
(cselib_lookup): Update this caller.
* gcse.c (modify_mem_list_set, canon_modify_mem_list_set):
Make static.
(hash_expr): Call hash_rtx.
(ldst_entry): Likewise.
(expr_equiv_p): Call exp_equiv_p.
(struct unoccr, hash_expr_1, hash_string_1, lookup_expr,
reg_used_on_edge, reg_set_between_after_reload_p,
reg_used_between_after_reload_p, get_avail_load_store_reg,
is_jump_table_basic_block, bb_has_well_behaved_predecessors,
get_bb_avail_insn, hash_scan_set_after_reload,
compute_hash_table_after_reload,
eliminate_partially_redundant_loads, gcse_after_reload,
get_bb_avail_insn, gcse_after_reload_main): Remove.
* postreload-gcse.c: New file, reincarnating most of the above.
* rtl.h (exp_equiv_p, hash_rtx): New prototypes.
(gcse_after_reload_main): Update prototype.
* timevar.def (TV_GCSE_AFTER_RELOAD): New timevar.
* passes.c (rest_of_handle_gcse2): Use it.
From-SVN: r86206
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r-- | gcc/cselib.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c index 6fd4317..bf50dca 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -55,7 +55,7 @@ static int discard_useless_locs (void **, void *); static int discard_useless_values (void **, void *); static void remove_useless_values (void); static rtx wrap_constant (enum machine_mode, rtx); -static unsigned int hash_rtx (rtx, enum machine_mode, int); +static unsigned int cselib_hash_rtx (rtx, enum machine_mode, int); static cselib_val *new_cselib_val (unsigned int, enum machine_mode); static void add_mem_for_addr (cselib_val *, cselib_val *, rtx); static cselib_val *cselib_lookup_mem (rtx, int); @@ -257,8 +257,8 @@ entry_and_rtx_equal_p (const void *entry, const void *x_arg) } /* The hash function for our hash table. The value is always computed with - hash_rtx when adding an element; this function just extracts the hash - value from a cselib_val structure. */ + cselib_hash_rtx when adding an element; this function just extracts the + hash value from a cselib_val structure. */ static hashval_t get_value_hash (const void *entry) @@ -554,7 +554,7 @@ wrap_constant (enum machine_mode mode, rtx x) otherwise the mode of X is used. */ static unsigned int -hash_rtx (rtx x, enum machine_mode mode, int create) +cselib_hash_rtx (rtx x, enum machine_mode mode, int create) { cselib_val *e; int i, j; @@ -600,7 +600,7 @@ hash_rtx (rtx x, enum machine_mode mode, int create) for (i = 0; i < units; ++i) { elt = CONST_VECTOR_ELT (x, i); - hash += hash_rtx (elt, GET_MODE (elt), 0); + hash += cselib_hash_rtx (elt, GET_MODE (elt), 0); } return hash; @@ -646,7 +646,7 @@ hash_rtx (rtx x, enum machine_mode mode, int create) if (fmt[i] == 'e') { rtx tem = XEXP (x, i); - unsigned int tem_hash = hash_rtx (tem, 0, create); + unsigned int tem_hash = cselib_hash_rtx (tem, 0, create); if (tem_hash == 0) return 0; @@ -656,7 +656,7 @@ hash_rtx (rtx x, enum machine_mode mode, int create) else if (fmt[i] == 'E') for (j = 0; j < XVECLEN (x, i); j++) { - unsigned int tem_hash = hash_rtx (XVECEXP (x, i, j), 0, create); + unsigned int tem_hash = cselib_hash_rtx (XVECEXP (x, i, j), 0, create); if (tem_hash == 0) return 0; @@ -926,7 +926,7 @@ cselib_lookup (rtx x, enum machine_mode mode, int create) if (MEM_P (x)) return cselib_lookup_mem (x, create); - hashval = hash_rtx (x, mode, create); + hashval = cselib_hash_rtx (x, mode, create); /* Can't even create if hashing is not possible. */ if (! hashval) return 0; |