2000-11-24 Bernd Schmidt <bernds@redhat.co.uk>
+ * reload1.c (conflicts_with_override): New function.
+ (emit_input_reload_insns): Use it to tighten test for validity
+ of substituting into output of previous insn.
+
* haifa-sched.c (struct ready_list): New.
(ready_lastpos, ready_add, ready_remove_first, ready_sort): New static
functions.
enum reload_type));
static int allocate_reload_reg PARAMS ((struct insn_chain *, int,
int));
+static int conflicts_with_override PARAMS ((rtx));
static void failed_reload PARAMS ((rtx, int));
static int set_reload_reg PARAMS ((int, int));
static void choose_reload_regs_init PARAMS ((struct insn_chain *, rtx *));
return 1;
}
+/* Determine whether the reload reg X overlaps any rtx'es used for
+ overriding inheritance. Return nonzero if so. */
+
+static int
+conflicts_with_override (x)
+ rtx x;
+{
+ int i;
+ for (i = 0; i < n_reloads; i++)
+ if (reload_override_in[i]
+ && reg_overlap_mentioned_p (x, reload_override_in[i]))
+ return 1;
+ return 0;
+}
+\f
/* Give an error message saying we failed to find a reload for INSN,
and clear out reload R. */
static void
&& dead_or_set_p (insn, old)
/* This is unsafe if some other reload
uses the same reg first. */
+ && ! conflicts_with_override (reloadreg)
&& reload_reg_free_for_value_p (REGNO (reloadreg),
rl->opnum,
rl->when_needed,