+2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
+
+ * rtl.def (CLOBBER_HIGH): Delete.
+ * doc/rtl.texi (clobber_high): Remove documentation.
+ * rtl.h (SET_DEST): Remove CLOBBER_HIGH from the list of codes.
+ (reg_is_clobbered_by_clobber_high): Delete.
+ (gen_hard_reg_clobber_high): Likewise.
+ * alias.c (record_set): Remove CLOBBER_HIGH handling.
+ * cfgexpand.c (expand_gimple_stmt): Likewise.
+ * combine-stack-adj.c (single_set_for_csa): Likewise.
+ * combine.c (find_single_use_1, set_nonzero_bits_and_sign_copies)
+ (can_combine_p, is_parallel_of_n_reg_sets, try_combine)
+ (record_dead_and_set_regs_1, reg_dead_at_p_1): Likewise.
+ * cse.c (invalidate_reg): Remove clobber_high parameter.
+ (invalidate): Update call accordingly.
+ (canonicalize_insn): Remove CLOBBER_HIGH handling.
+ (invalidate_from_clobbers, invalidate_from_sets_and_clobbers)
+ (count_reg_usage, insn_live_p): Likewise.
+ * cselib.h (cselib_invalidate_rtx): Remove sett argument.
+ * cselib.c (cselib_invalidate_regno, cselib_invalidate_rtx): Likewise.
+ (cselib_invalidate_rtx_note_stores): Update call accordingly.
+ (cselib_expand_value_rtx_1): Remove CLOBBER_HIGH handling.
+ (cselib_invalidate_regno, cselib_process_insn): Likewise.
+ * dce.c (deletable_insn_p, mark_nonreg_stores_1): Likewise.
+ (mark_nonreg_stores_2): Likewise.
+ * df-scan.c (df_find_hard_reg_defs, df_uses_record): Likewise.
+ (df_get_call_refs): Likewise.
+ * dwarf2out.c (mem_loc_descriptor): Likewise.
+ * emit-rtl.c (verify_rtx_sharing): Likewise.
+ (copy_insn_1, copy_rtx_if_shared_1): Likewise.
+ (hard_reg_clobbers_high, gen_hard_reg_clobber_high): Delete.
+ * genconfig.c (walk_insn_part): Remove CLOBBER_HIGH handling.
+ * genemit.c (gen_exp, gen_insn): Likewise.
+ * genrecog.c (validate_pattern, remove_clobbers): Likewise.
+ * haifa-sched.c (haifa_classify_rtx): Likewise.
+ * ira-build.c (create_insn_allocnos): Likewise.
+ * ira-costs.c (scan_one_insn): Likewise.
+ * ira.c (equiv_init_movable_p, memref_referenced_p): Likewise.
+ (rtx_moveable_p, interesting_dest_for_shprep): Likewise.
+ * jump.c (mark_jump_label_1): Likewise.
+ * lra-int.h (lra_insn_reg::clobber_high): Delete.
+ * lra-eliminations.c (lra_eliminate_regs_1): Remove CLOBBER_HIGH
+ handling.
+ (mark_not_eliminable): Likewise.
+ * lra-lives.c (process_bb_lives): Likewise.
+ * lra.c (new_insn_reg): Remove clobber_high parameter.
+ (collect_non_operand_hard_regs): Likewise. Update call to new
+ insn_reg. Remove CLOBBER_HIGH handling.
+ (lra_set_insn_recog_data): Remove CLOBBER_HIGH handling. Update call
+ to collect_non_operand_hard_regs.
+ (add_regs_to_insn_regno_info): Remove CLOBBER_HIGH handling.
+ Update call to new_insn_reg.
+ (lra_update_insn_regno_info): Remove CLOBBER_HIGH handling.
+ * postreload.c (reload_cse_simplify, reload_combine_note_use)
+ (move2add_note_store): Likewise.
+ * print-rtl.c (print_pattern): Likewise.
+ * recog.c (store_data_bypass_p_1, store_data_bypass_p): Likewise.
+ (if_test_bypass_p): Likewise.
+ * regcprop.c (kill_clobbered_value, kill_set_value): Likewise.
+ * reginfo.c (reg_scan_mark_refs): Likewise.
+ * reload1.c (maybe_fix_stack_asms, eliminate_regs_1): Likewise.
+ (elimination_effects, mark_not_eliminable, scan_paradoxical_subregs)
+ (forget_old_reloads_1): Likewise.
+ * reorg.c (find_end_label, try_merge_delay_insns, redundant_insn)
+ (own_thread_p, fill_simple_delay_slots, fill_slots_from_thread)
+ (dbr_schedule): Likewise.
+ * resource.c (update_live_status, mark_referenced_resources)
+ (mark_set_resources): Likewise.
+ * rtl.c (copy_rtx): Likewise.
+ * rtlanal.c (reg_referenced_p, set_of_1, single_set_2, noop_move_p)
+ (note_pattern_stores): Likewise.
+ (reg_is_clobbered_by_clobber_high): Delete.
+ * sched-deps.c (sched_analyze_reg, sched_analyze_insn): Remove
+ CLOBBER_HIGH handling.
+
2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
PR target/91452
new_reg_base_value[regno] = 0;
return;
}
- /* A CLOBBER_HIGH only wipes out the old value if the mode of the old
- value is greater than that of the clobber. */
- else if (GET_CODE (set) == CLOBBER_HIGH)
- {
- if (new_reg_base_value[regno] != 0
- && reg_is_clobbered_by_clobber_high (
- regno, GET_MODE (new_reg_base_value[regno]), XEXP (set, 0)))
- new_reg_base_value[regno] = 0;
- return;
- }
src = SET_SRC (set);
}
/* If we want exceptions for non-call insns, any
may_trap_p instruction may throw. */
&& GET_CODE (PATTERN (insn)) != CLOBBER
- && GET_CODE (PATTERN (insn)) != CLOBBER_HIGH
&& GET_CODE (PATTERN (insn)) != USE
&& insn_could_throw_p (insn))
make_reg_eh_region_note (insn, 0, lp_nr);
&& SET_SRC (this_rtx) == SET_DEST (this_rtx))
;
else if (GET_CODE (this_rtx) != CLOBBER
- && GET_CODE (this_rtx) != CLOBBER_HIGH
&& GET_CODE (this_rtx) != USE)
return NULL_RTX;
}
case SYMBOL_REF:
CASE_CONST_ANY:
case CLOBBER:
- case CLOBBER_HIGH:
return 0;
case SET:
return;
}
- /* Should not happen as we only using pseduo registers. */
- gcc_assert (GET_CODE (set) != CLOBBER_HIGH);
-
/* If this register is being initialized using itself, and the
register is uninitialized in this basic block, and there are
no LOG_LINKS which set the register, then part of the
/* We can ignore CLOBBERs. */
case CLOBBER:
- case CLOBBER_HIGH:
break;
case SET:
if (XEXP (XVECEXP (pat, 0, i), 0) == const0_rtx)
return false;
break;
- case CLOBBER_HIGH:
- break;
default:
return false;
}
for (i = 0; ok && i < XVECLEN (p2, 0); i++)
{
if ((GET_CODE (XVECEXP (p2, 0, i)) == SET
- || GET_CODE (XVECEXP (p2, 0, i)) == CLOBBER
- || GET_CODE (XVECEXP (p2, 0, i)) == CLOBBER_HIGH)
+ || GET_CODE (XVECEXP (p2, 0, i)) == CLOBBER)
&& reg_overlap_mentioned_p (SET_DEST (PATTERN (i3)),
SET_DEST (XVECEXP (p2, 0, i))))
ok = false;
? SET_SRC (setter)
: gen_lowpart (GET_MODE (dest),
SET_SRC (setter)));
- else if (GET_CODE (setter) == CLOBBER_HIGH)
- {
- reg_stat_type *rsp = ®_stat[REGNO (dest)];
- if (rsp->last_set_value
- && reg_is_clobbered_by_clobber_high
- (REGNO (dest), GET_MODE (rsp->last_set_value),
- XEXP (setter, 0)))
- record_value_for_reg (dest, NULL, NULL_RTX);
- }
else
record_value_for_reg (dest, record_dead_insn, NULL_RTX);
}
if (!REG_P (dest))
return;
- if (GET_CODE (x) == CLOBBER_HIGH
- && !reg_is_clobbered_by_clobber_high (reg_dead_reg, XEXP (x, 0)))
- return;
-
regno = REGNO (dest);
endregno = END_REGNO (dest);
if (reg_dead_endregno > regno && reg_dead_regno < endregno)
static struct table_elt *insert (rtx, struct table_elt *, unsigned,
machine_mode);
static void merge_equiv_classes (struct table_elt *, struct table_elt *);
-static void invalidate_reg (rtx, bool);
static void invalidate (rtx, machine_mode);
static void remove_invalid_refs (unsigned int);
static void remove_invalid_subreg_refs (unsigned int, poly_uint64,
}
/* Remove from the hash table, or mark as invalid, all expressions whose
- values could be altered by storing in register X.
-
- CLOBBER_HIGH is set if X was part of a CLOBBER_HIGH expression. */
+ values could be altered by storing in register X. */
static void
-invalidate_reg (rtx x, bool clobber_high)
+invalidate_reg (rtx x)
{
gcc_assert (GET_CODE (x) == REG);
SUBREG_TICKED (regno) = -1;
if (regno >= FIRST_PSEUDO_REGISTER)
- {
- gcc_assert (!clobber_high);
- remove_pseudo_from_table (x, hash);
- }
+ remove_pseudo_from_table (x, hash);
else
{
HOST_WIDE_INT in_table = TEST_HARD_REG_BIT (hard_regs_in_table, regno);
if (!REG_P (p->exp) || REGNO (p->exp) >= FIRST_PSEUDO_REGISTER)
continue;
- if (clobber_high)
- {
- if (reg_is_clobbered_by_clobber_high (p->exp, x))
- remove_from_table (p, hash);
- }
- else
- {
- unsigned int tregno = REGNO (p->exp);
- unsigned int tendregno = END_REGNO (p->exp);
- if (tendregno > regno && tregno < endregno)
- remove_from_table (p, hash);
- }
+ unsigned int tregno = REGNO (p->exp);
+ unsigned int tendregno = END_REGNO (p->exp);
+ if (tendregno > regno && tregno < endregno)
+ remove_from_table (p, hash);
}
}
}
switch (GET_CODE (x))
{
case REG:
- invalidate_reg (x, false);
+ invalidate_reg (x);
return;
case SUBREG:
if (MEM_P (XEXP (x, 0)))
canon_reg (XEXP (x, 0), insn);
}
- else if (GET_CODE (x) == CLOBBER_HIGH)
- gcc_assert (REG_P (XEXP (x, 0)));
else if (GET_CODE (x) == USE
&& ! (REG_P (XEXP (x, 0))
&& REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER))
if (MEM_P (XEXP (y, 0)))
canon_reg (XEXP (y, 0), insn);
}
- else if (GET_CODE (y) == CLOBBER_HIGH)
- gcc_assert (REG_P (XEXP (y, 0)));
else if (GET_CODE (y) == USE
&& ! (REG_P (XEXP (y, 0))
&& REGNO (XEXP (y, 0)) < FIRST_PSEUDO_REGISTER))
invalidate (XEXP (ref, 0), GET_MODE (ref));
}
}
- if (GET_CODE (x) == CLOBBER_HIGH)
- {
- rtx ref = XEXP (x, 0);
- gcc_assert (REG_P (ref));
- invalidate_reg (ref, true);
- }
else if (GET_CODE (x) == PARALLEL)
{
int i;
|| GET_CODE (ref) == ZERO_EXTRACT)
invalidate (XEXP (ref, 0), GET_MODE (ref));
}
- else if (GET_CODE (y) == CLOBBER_HIGH)
- {
- rtx ref = XEXP (y, 0);
- gcc_assert (REG_P (ref));
- invalidate_reg (ref, true);
- }
}
}
}
rtx temx = XEXP (tem, 0);
if (GET_CODE (temx) == CLOBBER)
invalidate (SET_DEST (temx), VOIDmode);
- else if (GET_CODE (temx) == CLOBBER_HIGH)
- {
- rtx temref = XEXP (temx, 0);
- gcc_assert (REG_P (temref));
- invalidate_reg (temref, true);
- }
}
}
|| GET_CODE (clobbered) == ZERO_EXTRACT)
invalidate (XEXP (clobbered, 0), GET_MODE (clobbered));
}
- else if (GET_CODE (y) == CLOBBER_HIGH)
- {
- rtx ref = XEXP (y, 0);
- gcc_assert (REG_P (ref));
- invalidate_reg (ref, true);
- }
else if (GET_CODE (y) == SET && GET_CODE (SET_SRC (y)) == CALL)
invalidate (SET_DEST (y), VOIDmode);
}
count_reg_usage (XEXP (XEXP (x, 0), 0), counts, NULL_RTX, incr);
return;
- case CLOBBER_HIGH:
- gcc_assert (REG_P ((XEXP (x, 0))));
- return;
-
case SET:
/* Unless we are setting a REG, count everything in SET_DEST. */
if (!REG_P (SET_DEST (x)))
|| (REG_NOTE_KIND (x) != REG_NONNEG && GET_CODE (XEXP (x,0)) == USE)
/* FUNCTION_USAGE expression lists may include (CLOBBER (mem /u)),
involving registers in the address. */
- || GET_CODE (XEXP (x, 0)) == CLOBBER
- || GET_CODE (XEXP (x, 0)) == CLOBBER_HIGH)
+ || GET_CODE (XEXP (x, 0)) == CLOBBER)
count_reg_usage (XEXP (x, 0), counts, NULL_RTX, incr);
count_reg_usage (XEXP (x, 1), counts, NULL_RTX, incr);
if (set_live_p (elt, insn, counts))
return true;
}
- else if (GET_CODE (elt) != CLOBBER
- && GET_CODE (elt) != CLOBBER_HIGH
- && GET_CODE (elt) != USE)
+ else if (GET_CODE (elt) != CLOBBER && GET_CODE (elt) != USE)
return true;
}
return false;
static cselib_val *new_cselib_val (unsigned int, machine_mode, rtx);
static void add_mem_for_addr (cselib_val *, cselib_val *, rtx);
static cselib_val *cselib_lookup_mem (rtx, int);
-static void cselib_invalidate_regno (unsigned int, machine_mode,
- const_rtx = NULL);
+static void cselib_invalidate_regno (unsigned int, machine_mode);
static void cselib_invalidate_mem (rtx);
static void cselib_record_set (rtx, cselib_val *, cselib_val *);
static void cselib_record_sets (rtx_insn *);
/* SCRATCH must be shared because they represent distinct values. */
return orig;
case CLOBBER:
- case CLOBBER_HIGH:
if (REG_P (XEXP (orig, 0)) && HARD_REGISTER_NUM_P (REGNO (XEXP (orig, 0))))
return orig;
break;
invalidating call clobbered registers across a call. */
static void
-cselib_invalidate_regno (unsigned int regno, machine_mode mode,
- const_rtx setter)
+cselib_invalidate_regno (unsigned int regno, machine_mode mode)
{
unsigned int endregno;
unsigned int i;
i = regno - max_value_regs;
endregno = end_hard_regno (mode, regno);
-
- if (setter && GET_CODE (setter) == CLOBBER_HIGH)
- gcc_assert (endregno == regno + 1);
}
else
{
continue;
}
- /* Ignore if clobber high and the register isn't clobbered. */
- if (setter && GET_CODE (setter) == CLOBBER_HIGH)
- {
- gcc_assert (endregno == regno + 1);
- const_rtx x = XEXP (setter, 0);
- if (!reg_is_clobbered_by_clobber_high (i, GET_MODE (v->val_rtx),
- x))
- {
- l = &(*l)->next;
- continue;
- }
- }
-
/* We have an overlap. */
if (*l == REG_VALUES (i))
{
*vp = &dummy_val;
}
-/* Invalidate DEST, which is being assigned to or clobbered by SETTER. */
+/* Invalidate DEST. */
void
-cselib_invalidate_rtx (rtx dest, const_rtx setter)
+cselib_invalidate_rtx (rtx dest)
{
while (GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == ZERO_EXTRACT
dest = XEXP (dest, 0);
if (REG_P (dest))
- cselib_invalidate_regno (REGNO (dest), GET_MODE (dest), setter);
+ cselib_invalidate_regno (REGNO (dest), GET_MODE (dest));
else if (MEM_P (dest))
cselib_invalidate_mem (dest);
}
/* A wrapper for cselib_invalidate_rtx to be called via note_stores. */
static void
-cselib_invalidate_rtx_note_stores (rtx dest, const_rtx setter,
+cselib_invalidate_rtx_note_stores (rtx dest, const_rtx,
void *data ATTRIBUTE_UNUSED)
{
- cselib_invalidate_rtx (dest, setter);
+ cselib_invalidate_rtx (dest);
}
/* Record the result of a SET instruction. DEST is being set; the source
if (CALL_P (insn))
{
for (x = CALL_INSN_FUNCTION_USAGE (insn); x; x = XEXP (x, 1))
- {
- gcc_assert (GET_CODE (XEXP (x, 0)) != CLOBBER_HIGH);
- if (GET_CODE (XEXP (x, 0)) == CLOBBER)
- cselib_invalidate_rtx (XEXP (XEXP (x, 0), 0));
- }
+ if (GET_CODE (XEXP (x, 0)) == CLOBBER)
+ cselib_invalidate_rtx (XEXP (XEXP (x, 0), 0));
+
/* Flush everything on setjmp. */
if (cselib_preserve_constants
&& find_reg_note (insn, REG_SETJMP, NULL))
cselib_expand_callback, void *);
extern rtx cselib_subst_to_values (rtx, machine_mode);
extern rtx cselib_subst_to_values_from_insn (rtx, machine_mode, rtx_insn *);
-extern void cselib_invalidate_rtx (rtx, const_rtx = NULL);
+extern void cselib_invalidate_rtx (rtx);
extern void cselib_reset_table (unsigned int);
extern unsigned int cselib_get_next_uid (void);
return false;
case CLOBBER:
- case CLOBBER_HIGH:
if (fast)
{
/* A CLOBBER of a dead pseudo register serves no purpose.
mark_nonreg_stores_1 (rtx dest, const_rtx pattern, void *data)
{
if (GET_CODE (pattern) != CLOBBER && !REG_P (dest))
- {
- gcc_checking_assert (GET_CODE (pattern) != CLOBBER_HIGH);
- mark_insn ((rtx_insn *) data, true);
- }
+ mark_insn ((rtx_insn *) data, true);
}
mark_nonreg_stores_2 (rtx dest, const_rtx pattern, void *data)
{
if (GET_CODE (pattern) != CLOBBER && !REG_P (dest))
- {
- gcc_checking_assert (GET_CODE (pattern) != CLOBBER_HIGH);
- mark_insn ((rtx_insn *) data, false);
- }
+ mark_insn ((rtx_insn *) data, false);
}
break;
case CLOBBER:
- case CLOBBER_HIGH:
df_find_hard_reg_defs_1 (XEXP (x, 0), defs);
break;
/* If we're clobbering a REG then we have a def so ignore. */
return;
- case CLOBBER_HIGH:
- gcc_assert (REG_P (XEXP (x, 0)));
- return;
-
case MEM:
df_uses_record (collection_rec,
&XEXP (x, 0), DF_REF_REG_MEM_LOAD,
for (note = CALL_INSN_FUNCTION_USAGE (insn_info->insn); note;
note = XEXP (note, 1))
{
- gcc_assert (GET_CODE (XEXP (note, 0)) != CLOBBER_HIGH);
if (GET_CODE (XEXP (note, 0)) == USE)
df_uses_record (collection_rec, &XEXP (XEXP (note, 0), 0),
DF_REF_REG_USE, bb, insn_info, flags);
clobbered by the insn. In this case, using the same pseudo register in
the clobber and elsewhere in the insn produces the expected results.
-@findex clobber_high
-@item (clobber_high @var{x})
-Represents the storing or possible storing of an unpredictable,
-undescribed value into the upper parts of @var{x}. The mode of the expression
-represents the lower parts of the register which will not be overwritten.
-@code{reg} must be a reg expression.
-
-One place this is used is when calling into functions where the registers are
-preserved, but only up to a given number of bits. For example when using
-Aarch64 SVE, calling a TLS descriptor will cause only the lower 128 bits of
-each of the vector registers to be preserved.
-
@findex use
@item (use @var{x})
Represents the use of the value of @var{x}. It indicates that the
brackets stand for a vector; the operand of @code{parallel} is a
vector of expressions. @var{x0}, @var{x1} and so on are individual
side effect expressions---expressions of code @code{set}, @code{call},
-@code{return}, @code{simple_return}, @code{clobber} @code{use} or
-@code{clobber_high}.
+@code{return}, @code{simple_return}, @code{clobber} or @code{use}.
``In parallel'' means that first all the values used in the individual
side-effects are computed, and second all the actual side-effects are
case CONST_FIXED:
case CLRSB:
case CLOBBER:
- case CLOBBER_HIGH:
break;
case CONST_STRING:
/* SCRATCH must be shared because they represent distinct values. */
return;
case CLOBBER:
- case CLOBBER_HIGH:
/* Share clobbers of hard registers (like cc0), but do not share pseudo reg
clobbers or clobbers of hard registers that originated as pseudos.
This is needed to allow safe register renaming. */
/* SCRATCH must be shared because they represent distinct values. */
return;
case CLOBBER:
- case CLOBBER_HIGH:
/* Share clobbers of hard registers (like cc0), but do not share pseudo reg
clobbers or clobbers of hard registers that originated as pseudos.
This is needed to allow safe register renaming. */
case SIMPLE_RETURN:
return orig;
case CLOBBER:
- case CLOBBER_HIGH:
/* Share clobbers of hard registers (like cc0), but do not share pseudo reg
clobbers or clobbers of hard registers that originated as pseudos.
This is needed to allow safe register renaming. */
gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (mode, regno)));
}
-static GTY((deletable)) rtx
-hard_reg_clobbers_high[NUM_MACHINE_MODES][FIRST_PSEUDO_REGISTER];
-
-/* Return a CLOBBER_HIGH expression for register REGNO that clobbers MODE,
- caching into HARD_REG_CLOBBERS_HIGH. */
-rtx
-gen_hard_reg_clobber_high (machine_mode mode, unsigned int regno)
-{
- if (hard_reg_clobbers_high[mode][regno])
- return hard_reg_clobbers_high[mode][regno];
- else
- return (hard_reg_clobbers_high[mode][regno]
- = gen_rtx_CLOBBER_HIGH (VOIDmode, gen_rtx_REG (mode, regno)));
-}
-
location_t prologue_location;
location_t epilogue_location;
switch (code)
{
case CLOBBER:
- case CLOBBER_HIGH:
clobbers_seen_this_insn++;
break;
return;
}
break;
- case CLOBBER_HIGH:
- if (!REG_P (XEXP (x, 0)))
- error ("CLOBBER_HIGH argument is not a register expr, at %s:%d",
- info->loc.filename, info->loc.lineno);
- printf ("gen_hard_reg_clobber_high (%smode, %i)",
- GET_MODE_NAME (GET_MODE (XEXP (x, 0))),
- REGNO (XEXP (x, 0)));
- return;
- break;
case CC0:
printf ("cc0_rtx");
return;
for (i = XVECLEN (insn, 1) - 1; i > 0; i--)
{
- if (GET_CODE (XVECEXP (insn, 1, i)) != CLOBBER
- && GET_CODE (XVECEXP (insn, 1, i)) != CLOBBER_HIGH)
+ if (GET_CODE (XVECEXP (insn, 1, i)) != CLOBBER)
break;
if (REG_P (XEXP (XVECEXP (insn, 1, i), 0)))
}
case CLOBBER:
- case CLOBBER_HIGH:
validate_pattern (SET_DEST (pattern), info, pattern, '=');
return;
for (i = XVECLEN (pattern, 0); i > 0; i--)
{
rtx x = XVECEXP (pattern, 0, i - 1);
- if ((GET_CODE (x) != CLOBBER && GET_CODE (x) != CLOBBER_HIGH)
+ if (GET_CODE (x) != CLOBBER
|| (!REG_P (XEXP (x, 0))
&& GET_CODE (XEXP (x, 0)) != MATCH_SCRATCH))
break;
/* Test if it is a 'store'. */
tmp_class = may_trap_exp (XEXP (x, 0), 1);
break;
- case CLOBBER_HIGH:
- gcc_assert (REG_P (XEXP (x, 0)));
- break;
case SET:
/* Test if it is a store. */
tmp_class = may_trap_exp (SET_DEST (x), 1);
create_insn_allocnos (XEXP (x, 0), NULL, true);
return;
}
- else if (code == CLOBBER_HIGH)
- {
- gcc_assert (REG_P (XEXP (x, 0)) && HARD_REGISTER_P (XEXP (x, 0)));
- return;
- }
else if (code == MEM)
{
create_insn_allocnos (XEXP (x, 0), NULL, false);
return insn;
}
- if (pat_code == CLOBBER_HIGH)
- {
- gcc_assert (REG_P (XEXP (PATTERN (insn), 0))
- && HARD_REGISTER_P (XEXP (PATTERN (insn), 0)));
- return insn;
- }
-
counted_mem = false;
set = single_set (insn);
extract_insn (insn);
case CC0:
case CLOBBER:
- case CLOBBER_HIGH:
return 0;
case PRE_INC:
return memref_referenced_p (memref, SET_SRC (x), true);
case CLOBBER:
- case CLOBBER_HIGH:
if (process_set_for_memref_referenced_p (memref, XEXP (x, 0)))
return true;
&& rtx_moveable_p (&XEXP (x, 2), OP_IN));
case CLOBBER:
- case CLOBBER_HIGH:
return rtx_moveable_p (&SET_DEST (x), OP_OUT);
case UNSPEC_VOLATILE:
for (int i = 0; i < XVECLEN (pat, 0); i++)
{
rtx sub = XVECEXP (pat, 0, i);
- if (GET_CODE (sub) == USE
- || GET_CODE (sub) == CLOBBER
- || GET_CODE (sub) == CLOBBER_HIGH)
+ if (GET_CODE (sub) == USE || GET_CODE (sub) == CLOBBER)
continue;
if (GET_CODE (sub) != SET
|| side_effects_p (sub))
case CC0:
case REG:
case CLOBBER:
- case CLOBBER_HIGH:
case CALL:
return;
return x;
case CLOBBER:
- case CLOBBER_HIGH:
case SET:
gcc_unreachable ();
setup_can_eliminate (ep, false);
return;
- case CLOBBER_HIGH:
- gcc_assert (REG_P (XEXP (x, 0)));
- gcc_assert (REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER);
- for (ep = reg_eliminate;
- ep < ®_eliminate[NUM_ELIMINABLE_REGS];
- ep++)
- if (reg_is_clobbered_by_clobber_high (ep->to_rtx, XEXP (x, 0)))
- setup_can_eliminate (ep, false);
- return;
-
case SET:
if (SET_DEST (x) == stack_pointer_rtx
&& GET_CODE (SET_SRC (x)) == PLUS
/* True if the reg is accessed through a subreg and the subreg is
just a part of the register. */
unsigned int subreg_p : 1;
- /* True if the reg is clobber highed by the operand. */
- unsigned int clobber_high : 1;
/* The corresponding regno of the register. */
int regno;
/* Next reg info of the same insn. */
bool call_p;
int n_alt, dst_regno, src_regno;
rtx set;
- struct lra_insn_reg *reg, *hr;
+ struct lra_insn_reg *reg;
if (!NONDEBUG_INSN_P (curr_insn))
continue;
break;
}
for (reg = curr_static_id->hard_regs; reg != NULL; reg = reg->next)
- if (reg->type != OP_IN && !reg->clobber_high)
+ if (reg->type != OP_IN)
{
remove_p = false;
break;
unused values because they still conflict with quantities
that are live at the time of the definition. */
for (reg = curr_id->regs; reg != NULL; reg = reg->next)
- {
- if (reg->type != OP_IN)
- {
- update_pseudo_point (reg->regno, curr_point, USE_POINT);
- mark_regno_live (reg->regno, reg->biggest_mode);
- /* ??? Should be a no-op for unused registers. */
- check_pseudos_live_through_calls (reg->regno, last_call_abi);
- }
-
- if (!HARD_REGISTER_NUM_P (reg->regno))
- for (hr = curr_static_id->hard_regs; hr != NULL; hr = hr->next)
- if (hr->clobber_high
- && maybe_gt (GET_MODE_SIZE (PSEUDO_REGNO_MODE (reg->regno)),
- GET_MODE_SIZE (hr->biggest_mode)))
- SET_HARD_REG_BIT (lra_reg_info[reg->regno].conflict_hard_regs,
- hr->regno);
- }
+ if (reg->type != OP_IN)
+ {
+ update_pseudo_point (reg->regno, curr_point, USE_POINT);
+ mark_regno_live (reg->regno, reg->biggest_mode);
+ /* ??? Should be a no-op for unused registers. */
+ check_pseudos_live_through_calls (reg->regno, last_call_abi);
+ }
for (reg = curr_static_id->hard_regs; reg != NULL; reg = reg->next)
if (reg->type != OP_IN)
is reference through subreg (SUBREG_P), and reference to the next
insn reg info (NEXT). If REGNO can be early clobbered,
alternatives in which it can be early clobbered are given by
- EARLY_CLOBBER_ALTS. CLOBBER_HIGH marks if reference is a clobber
- high. */
+ EARLY_CLOBBER_ALTS. */
static struct lra_insn_reg *
new_insn_reg (rtx_insn *insn, int regno, enum op_type type,
machine_mode mode, bool subreg_p,
alternative_mask early_clobber_alts,
- struct lra_insn_reg *next, bool clobber_high)
+ struct lra_insn_reg *next)
{
lra_insn_reg *ir = lra_insn_reg_pool.allocate ();
ir->type = type;
lra_reg_info[regno].biggest_mode = mode;
ir->subreg_p = subreg_p;
ir->early_clobber_alts = early_clobber_alts;
- ir->clobber_high = clobber_high;
ir->regno = regno;
ir->next = next;
return ir;
not the insn operands, in X with TYPE (in/out/inout) and flag that
it is early clobbered in the insn (EARLY_CLOBBER) and add the info
to LIST. X is a part of insn given by DATA. Return the result
- list. CLOBBER_HIGH marks if X is a clobber high. */
+ list. */
static struct lra_insn_reg *
collect_non_operand_hard_regs (rtx_insn *insn, rtx *x,
lra_insn_recog_data_t data,
struct lra_insn_reg *list,
- enum op_type type, bool early_clobber,
- bool clobber_high)
+ enum op_type type, bool early_clobber)
{
int i, j, regno, last;
bool subreg_p;
&& regno <= LAST_STACK_REG));
#endif
list = new_insn_reg (data->insn, regno, type, mode, subreg_p,
- early_clobber ? ALL_ALTERNATIVES : 0, list,
- clobber_high);
+ early_clobber ? ALL_ALTERNATIVES : 0, list);
}
}
return list;
{
case SET:
list = collect_non_operand_hard_regs (insn, &SET_DEST (op), data,
- list, OP_OUT, false, false);
+ list, OP_OUT, false);
list = collect_non_operand_hard_regs (insn, &SET_SRC (op), data,
- list, OP_IN, false, false);
+ list, OP_IN, false);
break;
case CLOBBER:
/* We treat clobber of non-operand hard registers as early clobber. */
list = collect_non_operand_hard_regs (insn, &XEXP (op, 0), data,
- list, OP_OUT, true, false);
- break;
- case CLOBBER_HIGH:
- /* Clobber high should always span exactly one register. */
- gcc_assert (REG_NREGS (XEXP (op, 0)) == 1);
- /* We treat clobber of non-operand hard registers as early clobber. */
- list = collect_non_operand_hard_regs (insn, &XEXP (op, 0), data,
- list, OP_OUT, true, true);
+ list, OP_OUT, true);
break;
case PRE_INC: case PRE_DEC: case POST_INC: case POST_DEC:
list = collect_non_operand_hard_regs (insn, &XEXP (op, 0), data,
- list, OP_INOUT, false, false);
+ list, OP_INOUT, false);
break;
case PRE_MODIFY: case POST_MODIFY:
list = collect_non_operand_hard_regs (insn, &XEXP (op, 0), data,
- list, OP_INOUT, false, false);
+ list, OP_INOUT, false);
list = collect_non_operand_hard_regs (insn, &XEXP (op, 1), data,
- list, OP_IN, false, false);
+ list, OP_IN, false);
break;
default:
fmt = GET_RTX_FORMAT (code);
{
if (fmt[i] == 'e')
list = collect_non_operand_hard_regs (insn, &XEXP (op, i), data,
- list, OP_IN, false, false);
+ list, OP_IN, false);
else if (fmt[i] == 'E')
for (j = XVECLEN (op, i) - 1; j >= 0; j--)
list = collect_non_operand_hard_regs (insn, &XVECEXP (op, i, j),
- data, list, OP_IN, false,
- false);
+ data, list, OP_IN, false);
}
}
return list;
else
insn_static_data->hard_regs
= collect_non_operand_hard_regs (insn, &PATTERN (insn), data,
- NULL, OP_IN, false, false);
+ NULL, OP_IN, false);
data->arg_hard_regs = NULL;
if (CALL_P (insn))
{
arg_hard_regs[n_hard_regs++]
= regno + i + (use_p ? 0 : FIRST_PSEUDO_REGISTER);
}
- else if (GET_CODE (XEXP (link, 0)) == CLOBBER_HIGH)
- /* We could support CLOBBER_HIGH and treat it in the same way as
- HARD_REGNO_CALL_PART_CLOBBERED, but no port needs that yet. */
- gcc_unreachable ();
if (n_hard_regs != 0)
{
if (bitmap_set_bit (&lra_reg_info[regno].insn_bitmap, INSN_UID (insn)))
{
data->regs = new_insn_reg (data->insn, regno, type, mode, subreg_p,
- early_clobber_alts, data->regs, false);
+ early_clobber_alts, data->regs);
return;
}
else
structure. */
data->regs = new_insn_reg (data->insn, regno, type, mode,
subreg_p, early_clobber_alts,
- data->regs, false);
+ data->regs);
else
{
if (curr->type != type)
add_regs_to_insn_regno_info (data, XEXP (x, 0), insn, OP_OUT,
ALL_ALTERNATIVES);
break;
- case CLOBBER_HIGH:
- gcc_unreachable ();
case PRE_INC: case PRE_DEC: case POST_INC: case POST_DEC:
add_regs_to_insn_regno_info (data, XEXP (x, 0), insn, OP_INOUT, 0);
break;
link = XEXP (link, 1))
{
code = GET_CODE (XEXP (link, 0));
- /* We could support CLOBBER_HIGH and treat it in the same way as
- HARD_REGNO_CALL_PART_CLOBBERED, but no port needs that yet. */
- gcc_assert (code != CLOBBER_HIGH);
if ((code == USE || code == CLOBBER)
&& MEM_P (XEXP (XEXP (link, 0), 0)))
add_regs_to_insn_regno_info (data, XEXP (XEXP (link, 0), 0), insn,
for (i = XVECLEN (body, 0) - 1; i >= 0; --i)
{
rtx part = XVECEXP (body, 0, i);
- /* asms can only have full clobbers, not clobber_highs. */
- gcc_assert (GET_CODE (part) != CLOBBER_HIGH);
if (GET_CODE (part) == CLOBBER && REG_P (XEXP (part, 0)))
cselib_invalidate_rtx (XEXP (part, 0));
}
value = SET_DEST (part);
}
}
- else if (GET_CODE (part) != CLOBBER
- && GET_CODE (part) != CLOBBER_HIGH
- && GET_CODE (part) != USE)
+ else if (GET_CODE (part) != CLOBBER && GET_CODE (part) != USE)
break;
}
}
break;
- case CLOBBER_HIGH:
- gcc_assert (REG_P (SET_DEST (x)));
- return;
-
case PLUS:
/* We are interested in (plus (reg) (const_int)) . */
if (!REG_P (XEXP (x, 0))
move2add_record_mode (dst);
}
- else if (GET_CODE (set) == CLOBBER_HIGH)
- {
- /* Only invalidate if actually clobbered. */
- if (reg_mode[regno] == BLKmode
- || reg_is_clobbered_by_clobber_high (regno, reg_mode[regno], dst))
- goto invalidate;
- }
else
{
invalidate:
print_exp (pp, x, verbose);
break;
case CLOBBER:
- case CLOBBER_HIGH:
case USE:
pp_printf (pp, "%s ", GET_RTX_NAME (GET_CODE (x)));
print_value (pp, XEXP (x, 0), verbose);
{
rtx out_exp = XVECEXP (out_pat, 0, i);
- if (GET_CODE (out_exp) == CLOBBER || GET_CODE (out_exp) == USE
- || GET_CODE (out_exp) == CLOBBER_HIGH)
+ if (GET_CODE (out_exp) == CLOBBER || GET_CODE (out_exp) == USE)
continue;
gcc_assert (GET_CODE (out_exp) == SET);
{
rtx in_exp = XVECEXP (in_pat, 0, i);
- if (GET_CODE (in_exp) == CLOBBER || GET_CODE (in_exp) == USE
- || GET_CODE (in_exp) == CLOBBER_HIGH)
+ if (GET_CODE (in_exp) == CLOBBER || GET_CODE (in_exp) == USE)
continue;
gcc_assert (GET_CODE (in_exp) == SET);
{
rtx exp = XVECEXP (out_pat, 0, i);
- if (GET_CODE (exp) == CLOBBER || GET_CODE (exp) == CLOBBER_HIGH)
+ if (GET_CODE (exp) == CLOBBER)
continue;
gcc_assert (GET_CODE (exp) == SET);
kill_clobbered_value (rtx x, const_rtx set, void *data)
{
struct value_data *const vd = (struct value_data *) data;
- gcc_assert (GET_CODE (set) != CLOBBER_HIGH || REG_P (x));
- if (GET_CODE (set) == CLOBBER
- || (GET_CODE (set) == CLOBBER_HIGH
- && reg_is_clobbered_by_clobber_high (x, XEXP (set, 0))))
+ if (GET_CODE (set) == CLOBBER)
kill_value (x, vd);
}
if (rtx_equal_p (x, ksvd->ignore_set_reg))
return;
- gcc_assert (GET_CODE (set) != CLOBBER_HIGH || REG_P (x));
- if (GET_CODE (set) != CLOBBER && GET_CODE (set) != CLOBBER_HIGH)
+ if (GET_CODE (set) != CLOBBER)
{
kill_value (x, ksvd->vd);
if (REG_P (x))
reg_scan_mark_refs (XEXP (XEXP (x, 0), 0), insn);
break;
- case CLOBBER_HIGH:
- gcc_assert (!(MEM_P (XEXP (x, 0))));
- break;
-
case SET:
/* Count a set of the destination if it is a register. */
for (dest = SET_DEST (x);
rtx t = XVECEXP (pat, 0, i);
if (GET_CODE (t) == CLOBBER && STACK_REG_P (XEXP (t, 0)))
SET_HARD_REG_BIT (clobbered, REGNO (XEXP (t, 0)));
- /* CLOBBER_HIGH is only supported for LRA. */
- gcc_assert (GET_CODE (t) != CLOBBER_HIGH);
}
/* Get the operand values and constraints out of the insn. */
return x;
case CLOBBER:
- case CLOBBER_HIGH:
case ASM_OPERANDS:
gcc_assert (insn && DEBUG_INSN_P (insn));
break;
elimination_effects (XEXP (x, 0), mem_mode);
return;
- case CLOBBER_HIGH:
- /* CLOBBER_HIGH is only supported for LRA. */
- return;
-
case SET:
/* Check for setting a register that we know about. */
if (REG_P (SET_DEST (x)))
if (dest == hard_frame_pointer_rtx)
return;
- /* CLOBBER_HIGH is only supported for LRA. */
- gcc_assert (GET_CODE (x) != CLOBBER_HIGH);
-
for (i = 0; i < NUM_ELIMINABLE_REGS; i++)
if (reg_eliminate[i].can_eliminate && dest == reg_eliminate[i].to_rtx
&& (GET_CODE (x) != SET
case PC:
case USE:
case CLOBBER:
- case CLOBBER_HIGH:
return;
case SUBREG:
to be forgotten later. */
static void
-forget_old_reloads_1 (rtx x, const_rtx setter,
- void *data)
+forget_old_reloads_1 (rtx x, const_rtx, void *data)
{
unsigned int regno;
unsigned int nr;
if (!REG_P (x))
return;
- /* CLOBBER_HIGH is only supported for LRA. */
- gcc_assert (setter == NULL_RTX || GET_CODE (setter) != CLOBBER_HIGH);
-
regno = REGNO (x);
if (regno >= FIRST_PSEUDO_REGISTER)
while (NOTE_P (insn)
|| (NONJUMP_INSN_P (insn)
&& (GET_CODE (PATTERN (insn)) == USE
- || GET_CODE (PATTERN (insn)) == CLOBBER
- || GET_CODE (PATTERN (insn)) == CLOBBER_HIGH)))
+ || GET_CODE (PATTERN (insn)) == CLOBBER)))
insn = PREV_INSN (insn);
/* When a target threads its epilogue we might already have a
/* TRIAL must be a CALL_INSN or INSN. Skip USE and CLOBBER. */
if (NONJUMP_INSN_P (trial)
- && (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
- || GET_CODE (pat) == CLOBBER_HIGH))
+ && (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER))
continue;
if (GET_CODE (next_to_match) == GET_CODE (trial)
--insns_to_search;
pat = PATTERN (trial);
- if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
- || GET_CODE (pat) == CLOBBER_HIGH)
+ if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
if (GET_CODE (trial) == DEBUG_INSN)
--insns_to_search;
pat = PATTERN (trial);
- if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
- || GET_CODE (pat) == CLOBBER_HIGH)
+ if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
if (GET_CODE (trial) == DEBUG_INSN)
|| LABEL_P (insn)
|| (NONJUMP_INSN_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
- && GET_CODE (PATTERN (insn)) != CLOBBER
- && GET_CODE (PATTERN (insn)) != CLOBBER_HIGH))
+ && GET_CODE (PATTERN (insn)) != CLOBBER))
return 0;
return 1;
pat = PATTERN (trial);
/* Stand-alone USE and CLOBBER are just for flow. */
- if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
- || GET_CODE (pat) == CLOBBER_HIGH)
+ if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
/* And DEBUG_INSNs never go into delay slots. */
pat = PATTERN (trial);
/* Stand-alone USE and CLOBBER are just for flow. */
- if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
- || GET_CODE (pat) == CLOBBER_HIGH)
+ if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
/* And DEBUG_INSNs do not go in delay slots. */
}
pat = PATTERN (trial);
- if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER
- || GET_CODE (pat) == CLOBBER_HIGH)
+ if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER)
continue;
if (GET_CODE (trial) == DEBUG_INSN)
if (! insn->deleted ()
&& NONJUMP_INSN_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
- && GET_CODE (PATTERN (insn)) != CLOBBER
- && GET_CODE (PATTERN (insn)) != CLOBBER_HIGH)
+ && GET_CODE (PATTERN (insn)) != CLOBBER)
{
if (GET_CODE (PATTERN (insn)) == SEQUENCE)
{
if (GET_CODE (x) == CLOBBER)
for (i = first_regno; i < last_regno; i++)
CLEAR_HARD_REG_BIT (current_live_regs, i);
- else if (GET_CODE (x) == CLOBBER_HIGH)
- /* No current target supports both branch delay slots and CLOBBER_HIGH.
- We'd need more elaborate liveness tracking to handle that
- combination. */
- gcc_unreachable ();
else
for (i = first_regno; i < last_regno; i++)
{
return;
case CLOBBER:
- case CLOBBER_HIGH:
return;
case CALL_INSN:
for (link = CALL_INSN_FUNCTION_USAGE (call_insn);
link; link = XEXP (link, 1))
- {
- /* We could support CLOBBER_HIGH and treat it in the same way as
- HARD_REGNO_CALL_PART_CLOBBERED, but no port needs that
- yet. */
- gcc_assert (GET_CODE (XEXP (link, 0)) != CLOBBER_HIGH);
- if (GET_CODE (XEXP (link, 0)) == CLOBBER)
- mark_set_resources (SET_DEST (XEXP (link, 0)), res, 1,
- MARK_SRC_DEST);
- }
+ if (GET_CODE (XEXP (link, 0)) == CLOBBER)
+ mark_set_resources (SET_DEST (XEXP (link, 0)), res, 1,
+ MARK_SRC_DEST);
/* Check for a REG_SETJMP. If it exists, then we must
assume that this call can clobber any register. */
mark_set_resources (XEXP (x, 0), res, 1, MARK_SRC_DEST);
return;
- case CLOBBER_HIGH:
- /* No current target supports both branch delay slots and CLOBBER_HIGH.
- We'd need more elaborate liveness tracking to handle that
- combination. */
- gcc_unreachable ();
-
case SEQUENCE:
{
rtx_sequence *seq = as_a <rtx_sequence *> (x);
return orig;
break;
- case CLOBBER_HIGH:
- gcc_assert (REG_P (XEXP (orig, 0)));
- return orig;
-
case CONST:
if (shared_const_p (orig))
return orig;
is considered undeletable before reload. */
DEF_RTL_EXPR(CLOBBER, "clobber", "e", RTX_EXTRA)
-/* Indicate that the upper parts of something are clobbered in a way that we
- don't want to explain. The MODE references the lower bits that will be
- preserved. Anything above that size will be clobbered.
-
- CLOBBER_HIGH only occurs as the operand of a PARALLEL rtx. It cannot appear
- in other contexts, and unlike CLOBBER, it cannot appear on its own.
- CLOBBER_HIGH can only be used with fixed register rtxes. */
-
-DEF_RTL_EXPR(CLOBBER_HIGH, "clobber_high", "e", RTX_EXTRA)
-
/* Call a subroutine.
Operand 1 is the address to call.
Operand 2 is the number of arguments. */
/* For a SET rtx, SET_DEST is the place that is set
and SET_SRC is the value it is set to. */
-#define SET_DEST(RTX) XC3EXP (RTX, 0, SET, CLOBBER, CLOBBER_HIGH)
+#define SET_DEST(RTX) XC2EXP (RTX, 0, SET, CLOBBER)
#define SET_SRC(RTX) XCEXP (RTX, 1, SET)
#define SET_IS_RETURN_P(RTX) \
(RTL_FLAG_CHECK1 ("SET_IS_RETURN_P", (RTX), SET)->jump)
extern int computed_jump_p (const rtx_insn *);
extern bool tls_referenced_p (const_rtx);
extern bool contains_mem_rtx_p (rtx x);
-extern bool reg_is_clobbered_by_clobber_high (unsigned int, machine_mode,
- const_rtx);
-
-/* Convenient wrapper for reg_is_clobbered_by_clobber_high. */
-inline bool
-reg_is_clobbered_by_clobber_high (const_rtx x, const_rtx clobber_high_op)
-{
- return reg_is_clobbered_by_clobber_high (REGNO (x), GET_MODE (x),
- clobber_high_op);
-}
/* Overload for refers_to_regno_p for checking a single register. */
inline bool
extern bool memory_modified_in_insn_p (const_rtx, const_rtx);
extern bool may_be_sp_based_p (rtx);
extern rtx gen_hard_reg_clobber (machine_mode, unsigned int);
-extern rtx gen_hard_reg_clobber_high (machine_mode, unsigned int);
extern rtx get_reg_known_value (unsigned int);
extern bool get_reg_known_equiv_p (unsigned int);
extern rtx get_reg_base_value (unsigned int);
return 1;
return 0;
- case CLOBBER_HIGH:
- gcc_assert (REG_P (XEXP (body, 0)));
- return 0;
-
case COND_EXEC:
if (reg_overlap_mentioned_p (x, COND_EXEC_TEST (body)))
return 1;
{
struct set_of_data *const data = (struct set_of_data *) (data1);
if (rtx_equal_p (x, data->pat)
- || (GET_CODE (pat) == CLOBBER_HIGH
- && REGNO(data->pat) == REGNO(XEXP (pat, 0))
- && reg_is_clobbered_by_clobber_high (data->pat, XEXP (pat, 0)))
- || (GET_CODE (pat) != CLOBBER_HIGH && !MEM_P (x)
- && reg_overlap_mentioned_p (data->pat, x)))
+ || (!MEM_P (x) && reg_overlap_mentioned_p (data->pat, x)))
data->found = pat;
}
{
case USE:
case CLOBBER:
- case CLOBBER_HIGH:
break;
case SET:
{
rtx tem = XVECEXP (pat, 0, i);
- if (GET_CODE (tem) == USE
- || GET_CODE (tem) == CLOBBER
- || GET_CODE (tem) == CLOBBER_HIGH)
+ if (GET_CODE (tem) == USE || GET_CODE (tem) == CLOBBER)
continue;
if (GET_CODE (tem) != SET || ! set_noop_p (tem))
if (GET_CODE (x) == COND_EXEC)
x = COND_EXEC_CODE (x);
- if (GET_CODE (x) == SET
- || GET_CODE (x) == CLOBBER
- || GET_CODE (x) == CLOBBER_HIGH)
+ if (GET_CODE (x) == SET || GET_CODE (x) == CLOBBER)
{
rtx dest = SET_DEST (x);
return true;
return false;
}
-
-/* Return true if reg REGNO with mode REG_MODE would be clobbered by the
- clobber_high operand in CLOBBER_HIGH_OP. */
-
-bool
-reg_is_clobbered_by_clobber_high (unsigned int regno, machine_mode reg_mode,
- const_rtx clobber_high_op)
-{
- unsigned int clobber_regno = REGNO (clobber_high_op);
- machine_mode clobber_mode = GET_MODE (clobber_high_op);
- unsigned char regno_nregs = hard_regno_nregs (regno, reg_mode);
-
- /* Clobber high should always span exactly one register. */
- gcc_assert (REG_NREGS (clobber_high_op) == 1);
-
- /* Clobber high needs to match with one of the registers in X. */
- if (clobber_regno < regno || clobber_regno >= regno + regno_nregs)
- return false;
-
- gcc_assert (reg_mode != BLKmode && clobber_mode != BLKmode);
-
- if (reg_mode == VOIDmode)
- return clobber_mode != VOIDmode;
-
- /* Clobber high will clobber if its size might be greater than the size of
- register regno. */
- return maybe_gt (exact_div (GET_MODE_SIZE (reg_mode), regno_nregs),
- GET_MODE_SIZE (clobber_mode));
-}
while (--i >= 0)
note_reg_use (regno + i);
}
- else if (ref == CLOBBER_HIGH)
- {
- gcc_assert (i == 1);
- /* We don't know the current state of the register, so have to treat
- the clobber high as a full clobber. */
- note_reg_clobber (regno);
- }
else
{
while (--i >= 0)
else if (ref == USE)
note_reg_use (regno);
else
- /* For CLOBBER_HIGH, we don't know the current state of the register,
- so have to treat it as a full clobber. */
note_reg_clobber (regno);
/* Pseudos that are REG_EQUIV to something may be replaced
sub = COND_EXEC_CODE (sub);
code = GET_CODE (sub);
}
- else if (code == SET || code == CLOBBER || code == CLOBBER_HIGH)
+ else if (code == SET || code == CLOBBER)
sched_analyze_1 (deps, sub, insn);
else
sched_analyze_2 (deps, sub, insn);
{
if (GET_CODE (XEXP (link, 0)) == CLOBBER)
sched_analyze_1 (deps, XEXP (link, 0), insn);
- else if (GET_CODE (XEXP (link, 0)) == CLOBBER_HIGH)
- /* We could support CLOBBER_HIGH and treat it in the same way as
- HARD_REGNO_CALL_PART_CLOBBERED, but no port needs that yet. */
- gcc_unreachable ();
else if (GET_CODE (XEXP (link, 0)) != SET)
sched_analyze_2 (deps, XEXP (link, 0), insn);
}