+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
/* 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;
/* 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);
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;
/* 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));
&& !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;
}
&& 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
/* 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. */
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);
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);
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 *);
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;