Commit 30f72379 by Mark Mitchell Committed by Mark Mitchell

alias.c (alias_set_compare): Remove.

	* alias.c (alias_set_compare): Remove.
	(record_alias_subset): Use splay_tree_compare_ints instaed of
	alias_set_compare.
	(init_alias_once): Likewise.
	* cse.c: Include splay-tree.h.
	(reg_qty): Remove.
	(reg_tick): Likewise.
	(reg_table): Likewise.
	(cse_reg_info): New structure.
	(cse_reg_info_free_list): New variable.
	(cse_reg_info_tree): Likewise.
	(cached_regno): Likewise.
	(cached_cse_reg_info): Likewise.
	(all_minus_one): Remove.
	(consec_ints): Likewise.
	(GET_CSE_REG_INFO): New macro.
	(REG_TICK): Likewise.  Use throughout instead of reg_tick.
	(REG_IN_TABLE): Likewise.  Use throughout instead of reg_in_table.
	(REG_QTY): Likewise.  Use throughout instead of reg_qty.
	(get_cse_reg_info): New function.
	(free_cse_reg_info): Likewise.
	(new_basic_block): Reinitialize cse_reg_info_tree instead of
	reg_tick, all_minus_one, and consec_ints.
	* Makefile.in (cse.o): Depend on splay-tree.h
	* splay-tree.h (splay_tree_compare_ints): Declare.
	* splay-tree.c (splay_tree_compare_ints): Define.

From-SVN: r26069
parent 4cc48683
Tue Mar 30 20:51:40 1999 Mark Mitchell <mark@codesourcery.com>
* alias.c (alias_set_compare): Remove.
(record_alias_subset): Use splay_tree_compare_ints instaed of
alias_set_compare.
(init_alias_once): Likewise.
* cse.c: Include splay-tree.h.
(reg_qty): Remove.
(reg_tick): Likewise.
(reg_table): Likewise.
(cse_reg_info): New structure.
(cse_reg_info_free_list): New variable.
(cse_reg_info_tree): Likewise.
(cached_regno): Likewise.
(cached_cse_reg_info): Likewise.
(all_minus_one): Remove.
(consec_ints): Likewise.
(GET_CSE_REG_INFO): New macro.
(REG_TICK): Likewise. Use throughout instead of reg_tick.
(REG_IN_TABLE): Likewise. Use throughout instead of reg_in_table.
(REG_QTY): Likewise. Use throughout instead of reg_qty.
(get_cse_reg_info): New function.
(free_cse_reg_info): Likewise.
(new_basic_block): Reinitialize cse_reg_info_tree instead of
reg_tick, all_minus_one, and consec_ints.
* Makefile.in (cse.o): Depend on splay-tree.h
Tue Mar 30 13:19:36 1999 Jason Merrill <jason@yorick.cygnus.com> Tue Mar 30 13:19:36 1999 Jason Merrill <jason@yorick.cygnus.com>
* libgcc2.c (throw_helper): Just return the SP offset, rather than * libgcc2.c (throw_helper): Just return the SP offset, rather than
......
...@@ -1515,7 +1515,8 @@ stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \ ...@@ -1515,7 +1515,8 @@ stupid.o : stupid.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h \
$(BASIC_BLOCK_H) insn-config.h reload.h flags.h toplev.h $(BASIC_BLOCK_H) insn-config.h reload.h flags.h toplev.h
cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ cse.o : cse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h output.h \
$(srcdir)/../include/splay-tree.h
gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \ gcse.o : gcse.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h real.h insn-config.h $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H) output.h
resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h system.h \ resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h system.h \
......
...@@ -83,8 +83,6 @@ static int base_alias_check PROTO((rtx, rtx, enum machine_mode, ...@@ -83,8 +83,6 @@ static int base_alias_check PROTO((rtx, rtx, enum machine_mode,
enum machine_mode)); enum machine_mode));
static rtx find_base_value PROTO((rtx)); static rtx find_base_value PROTO((rtx));
static int mems_in_disjoint_alias_sets_p PROTO((rtx, rtx)); static int mems_in_disjoint_alias_sets_p PROTO((rtx, rtx));
static int alias_set_compare PROTO((splay_tree_key,
splay_tree_key));
static int insert_subset_children PROTO((splay_tree_node, static int insert_subset_children PROTO((splay_tree_node,
void*)); void*));
static alias_set_entry get_alias_set_entry PROTO((int)); static alias_set_entry get_alias_set_entry PROTO((int));
...@@ -169,25 +167,6 @@ static int copying_arguments; ...@@ -169,25 +167,6 @@ static int copying_arguments;
static splay_tree alias_sets; static splay_tree alias_sets;
/* Returns -1, 0, 1 according to whether SET1 is less than, equal to,
or greater than SET2. */
static int
alias_set_compare (set1, set2)
splay_tree_key set1;
splay_tree_key set2;
{
int s1 = (int) set1;
int s2 = (int) set2;
if (s1 < s2)
return -1;
else if (s1 > s2)
return 1;
else
return 0;
}
/* Returns a pointer to the alias set entry for ALIAS_SET, if there is /* Returns a pointer to the alias set entry for ALIAS_SET, if there is
such an entry, or NULL otherwise. */ such an entry, or NULL otherwise. */
...@@ -305,7 +284,7 @@ record_alias_subset (superset, subset) ...@@ -305,7 +284,7 @@ record_alias_subset (superset, subset)
(alias_set_entry) xmalloc (sizeof (struct alias_set_entry)); (alias_set_entry) xmalloc (sizeof (struct alias_set_entry));
superset_entry->alias_set = superset; superset_entry->alias_set = superset;
superset_entry->children superset_entry->children
= splay_tree_new (alias_set_compare, 0, 0); = splay_tree_new (splay_tree_compare_ints, 0, 0);
splay_tree_insert (alias_sets, splay_tree_insert (alias_sets,
(splay_tree_key) superset, (splay_tree_key) superset,
(splay_tree_value) superset_entry); (splay_tree_value) superset_entry);
...@@ -1329,7 +1308,7 @@ init_alias_once () ...@@ -1329,7 +1308,7 @@ init_alias_once ()
&& HARD_REGNO_MODE_OK (i, Pmode)) && HARD_REGNO_MODE_OK (i, Pmode))
SET_HARD_REG_BIT (argument_registers, i); SET_HARD_REG_BIT (argument_registers, i);
alias_sets = splay_tree_new (alias_set_compare, 0, 0); alias_sets = splay_tree_new (splay_tree_compare_ints, 0, 0);
} }
void void
......
1999-03-30 Mark Mitchell <mark@codesourcery.com>
* splay-tree.h (splay_tree_compare_ints): Declare.
Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* demangle.h: Don't check IN_GCC anymore. * demangle.h: Don't check IN_GCC anymore.
......
...@@ -104,6 +104,8 @@ extern splay_tree_node splay_tree_lookup ...@@ -104,6 +104,8 @@ extern splay_tree_node splay_tree_lookup
extern int splay_tree_foreach PARAMS((splay_tree, extern int splay_tree_foreach PARAMS((splay_tree,
splay_tree_foreach_fn, splay_tree_foreach_fn,
void*)); void*));
extern int splay_tree_compare_ints PARAMS((splay_tree_key,
splay_tree_key));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
1999-03-30 Mark Mitchell <mark@codesourcery.com>
* splay-tree.c (splay_tree_compare_ints): Define.
1999-03-30 Tom Tromey <tromey@cygnus.com> 1999-03-30 Tom Tromey <tromey@cygnus.com>
* cplus-dem.c (consume_count): If `count' wraps, return 0 and * cplus-dem.c (consume_count): If `count' wraps, return 0 and
......
...@@ -336,3 +336,18 @@ splay_tree_foreach (sp, fn, data) ...@@ -336,3 +336,18 @@ splay_tree_foreach (sp, fn, data)
{ {
return splay_tree_foreach_helper (sp, sp->root, fn, data); return splay_tree_foreach_helper (sp, sp->root, fn, data);
} }
/* Splay-tree comparison function, treating the keys as ints. */
int
splay_tree_compare_ints (k1, k2)
splay_tree_key k1;
splay_tree_key k2;
{
if ((int) k1 < (int) k2)
return -1;
else if ((int) k1 > (int) k2)
return 1;
else
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment