cselib (also touches sched-deps.c)

gcc/
2014-08-26  David Malcolm  <dmalcolm@redhat.com>

	* cselib.h (struct elt_loc_list): Strengthen field "setting_insn"
	from rtx to rtx_insn *.
	(cselib_lookup_from_insn): Likewise for final param.
	(cselib_subst_to_values_from_insn): Likewise.
	(cselib_add_permanent_equiv): Likewise.

	* cselib.c (cselib_current_insn): Likewise for this variable.
	(cselib_subst_to_values_from_insn): Likewise for param "insn".
	(cselib_lookup_from_insn): Likewise.
	(cselib_add_permanent_equiv): Likewise for param "insn" and local
	"save_cselib_current_insn".
	(cselib_process_insn): Replace use of NULL_RTX with NULL.

	* sched-deps.c (add_insn_mem_dependence): Strengthen param "insn"
	from rtx to rtx_insn *.

From-SVN: r214550
This commit is contained in:
David Malcolm 2014-08-26 20:45:09 +00:00 committed by David Malcolm
parent eb92d49a91
commit 12ea1b952d
4 changed files with 31 additions and 13 deletions

View File

@ -1,3 +1,21 @@
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* cselib.h (struct elt_loc_list): Strengthen field "setting_insn"
from rtx to rtx_insn *.
(cselib_lookup_from_insn): Likewise for final param.
(cselib_subst_to_values_from_insn): Likewise.
(cselib_add_permanent_equiv): Likewise.
* cselib.c (cselib_current_insn): Likewise for this variable.
(cselib_subst_to_values_from_insn): Likewise for param "insn".
(cselib_lookup_from_insn): Likewise.
(cselib_add_permanent_equiv): Likewise for param "insn" and local
"save_cselib_current_insn".
(cselib_process_insn): Replace use of NULL_RTX with NULL.
* sched-deps.c (add_insn_mem_dependence): Strengthen param "insn"
from rtx to rtx_insn *.
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* dse.c (dse_step6): Strengthen local "rinsn" from rtx to

View File

@ -152,7 +152,7 @@ static hash_table<cselib_hasher> *cselib_preserved_hash_table;
/* This is a global so we don't have to pass this through every function.
It is used in new_elt_loc_list to set SETTING_INSN. */
static rtx cselib_current_insn;
static rtx_insn *cselib_current_insn;
/* The unique id that the next create value will take. */
static unsigned int next_uid;
@ -1948,7 +1948,7 @@ cselib_subst_to_values (rtx x, enum machine_mode memmode)
/* Wrapper for cselib_subst_to_values, that indicates X is in INSN. */
rtx
cselib_subst_to_values_from_insn (rtx x, enum machine_mode memmode, rtx insn)
cselib_subst_to_values_from_insn (rtx x, enum machine_mode memmode, rtx_insn *insn)
{
rtx ret;
gcc_assert (!cselib_current_insn);
@ -2089,7 +2089,7 @@ cselib_lookup_1 (rtx x, enum machine_mode mode,
cselib_val *
cselib_lookup_from_insn (rtx x, enum machine_mode mode,
int create, enum machine_mode memmode, rtx insn)
int create, enum machine_mode memmode, rtx_insn *insn)
{
cselib_val *ret;
@ -2401,10 +2401,10 @@ cselib_record_set (rtx dest, cselib_val *src_elt, cselib_val *dest_addr_elt)
/* Make ELT and X's VALUE equivalent to each other at INSN. */
void
cselib_add_permanent_equiv (cselib_val *elt, rtx x, rtx insn)
cselib_add_permanent_equiv (cselib_val *elt, rtx x, rtx_insn *insn)
{
cselib_val *nelt;
rtx save_cselib_current_insn = cselib_current_insn;
rtx_insn *save_cselib_current_insn = cselib_current_insn;
gcc_checking_assert (elt);
gcc_checking_assert (PRESERVED_VALUE_P (elt->val_rtx));
@ -2641,13 +2641,13 @@ cselib_process_insn (rtx_insn *insn)
&& !cselib_preserve_constants)
{
cselib_reset_table (next_uid);
cselib_current_insn = NULL_RTX;
cselib_current_insn = NULL;
return;
}
if (! INSN_P (insn))
{
cselib_current_insn = NULL_RTX;
cselib_current_insn = NULL;
return;
}
@ -2697,7 +2697,7 @@ cselib_process_insn (rtx_insn *insn)
&& fp_setter_insn (insn))
cselib_invalidate_rtx (stack_pointer_rtx);
cselib_current_insn = NULL_RTX;
cselib_current_insn = NULL;
if (n_useless_values > MAX_USELESS_VALUES
/* remove_useless_values is linear in the hash table size. Avoid

View File

@ -46,7 +46,7 @@ struct elt_loc_list {
/* An rtl expression that holds the value. */
rtx loc;
/* The insn that made the equivalence. */
rtx setting_insn;
rtx_insn *setting_insn;
};
/* Describe a single set that is part of an insn. */
@ -71,7 +71,7 @@ extern void (*cselib_record_sets_hook) (rtx_insn *insn, struct cselib_set *sets,
extern cselib_val *cselib_lookup (rtx, enum machine_mode,
int, enum machine_mode);
extern cselib_val *cselib_lookup_from_insn (rtx, enum machine_mode,
int, enum machine_mode, rtx);
int, enum machine_mode, rtx_insn *);
extern void cselib_init (int);
extern void cselib_clear_table (void);
extern void cselib_finish (void);
@ -87,7 +87,7 @@ extern rtx cselib_expand_value_rtx_cb (rtx, bitmap, int,
extern bool cselib_dummy_expand_value_rtx_cb (rtx, bitmap, int,
cselib_expand_callback, void *);
extern rtx cselib_subst_to_values (rtx, enum machine_mode);
extern rtx cselib_subst_to_values_from_insn (rtx, enum machine_mode, rtx);
extern rtx cselib_subst_to_values_from_insn (rtx, enum machine_mode, rtx_insn *);
extern void cselib_invalidate_rtx (rtx);
extern void cselib_reset_table (unsigned int);
@ -96,7 +96,7 @@ extern void cselib_preserve_value (cselib_val *);
extern bool cselib_preserved_value_p (cselib_val *);
extern void cselib_preserve_only_values (void);
extern void cselib_preserve_cfa_base_value (cselib_val *, unsigned int);
extern void cselib_add_permanent_equiv (cselib_val *, rtx, rtx);
extern void cselib_add_permanent_equiv (cselib_val *, rtx, rtx_insn *);
extern bool cselib_have_permanent_equivalences (void);
extern void cselib_set_value_sp_based (cselib_val *);
extern bool cselib_sp_based_value_p (cselib_val *);

View File

@ -1710,7 +1710,7 @@ chain_to_prev_insn (rtx_insn *insn)
static void
add_insn_mem_dependence (struct deps_desc *deps, bool read_p,
rtx insn, rtx mem)
rtx_insn *insn, rtx mem)
{
rtx *insn_list;
rtx *mem_list;