Commit 55d796da by Kaveh R. Ghazi Committed by Kaveh Ghazi

recog.c (validate_change_1, [...]): Avoid C++ keywords.

	* recog.c (validate_change_1, validate_change,
	validate_unshare_change, validate_replace_rtx_1, struct
	funny_match, constrain_operands, peephole2_optimize): Avoid C++
	keywords.
	* reload.c (push_secondary_reload, secondary_reload_class,
	scratch_reload_class, find_valid_class, find_reusable_reload,
	push_reload, find_dummy_reload, find_reloads_address_1,
	find_reloads_address_part, find_equiv_reg): Likewise.
	* reload1.c (spill_failure, eliminate_regs_1, allocate_reload_reg,
	choose_reload_regs): Likewise.
	* rtlanal.c (replace_rtx, nonzero_bits1, num_sign_bit_copies1):
	Likewise.
	* rtlhooks.c (gen_lowpart_if_possible): Likewise.
	* sched-ebb.c (add_deps_for_risky_insns): Likewise.
	* sched-rgn.c (concat_INSN_LIST): Likewise.
	* stor-layout.c (mode_for_size, mode_for_size_tree,
	smallest_mode_for_size): Likewise.

From-SVN: r137894
parent d858f359
2008-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2008-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* recog.c (validate_change_1, validate_change,
validate_unshare_change, validate_replace_rtx_1, struct
funny_match, constrain_operands, peephole2_optimize): Avoid C++
keywords.
* reload.c (push_secondary_reload, secondary_reload_class,
scratch_reload_class, find_valid_class, find_reusable_reload,
push_reload, find_dummy_reload, find_reloads_address_1,
find_reloads_address_part, find_equiv_reg): Likewise.
* reload1.c (spill_failure, eliminate_regs_1, allocate_reload_reg,
choose_reload_regs): Likewise.
* rtlanal.c (replace_rtx, nonzero_bits1, num_sign_bit_copies1):
Likewise.
* rtlhooks.c (gen_lowpart_if_possible): Likewise.
* sched-ebb.c (add_deps_for_risky_insns): Likewise.
* sched-rgn.c (concat_INSN_LIST): Likewise.
* stor-layout.c (mode_for_size, mode_for_size_tree,
smallest_mode_for_size): Likewise.
2008-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cfg.c (dump_reg_info): Avoid C++ keywords. * cfg.c (dump_reg_info): Avoid C++ keywords.
* dwarf2asm.c (dw2_force_const_mem, * dwarf2asm.c (dw2_force_const_mem,
dw2_asm_output_encoded_addr_rtx): Likewise. dw2_asm_output_encoded_addr_rtx): Likewise.
......
...@@ -183,7 +183,7 @@ static int changes_allocated; ...@@ -183,7 +183,7 @@ static int changes_allocated;
static int num_changes = 0; static int num_changes = 0;
/* Validate a proposed change to OBJECT. LOC is the location in the rtl /* Validate a proposed change to OBJECT. LOC is the location in the rtl
at which NEW will be placed. If OBJECT is zero, no validation is done, at which NEW_RTX will be placed. If OBJECT is zero, no validation is done,
the change is simply made. the change is simply made.
Two types of objects are supported: If OBJECT is a MEM, memory_address_p Two types of objects are supported: If OBJECT is a MEM, memory_address_p
...@@ -201,16 +201,16 @@ static int num_changes = 0; ...@@ -201,16 +201,16 @@ static int num_changes = 0;
Otherwise, perform the change and return 1. */ Otherwise, perform the change and return 1. */
static bool static bool
validate_change_1 (rtx object, rtx *loc, rtx new, bool in_group, bool unshare) validate_change_1 (rtx object, rtx *loc, rtx new_rtx, bool in_group, bool unshare)
{ {
rtx old = *loc; rtx old = *loc;
if (old == new || rtx_equal_p (old, new)) if (old == new_rtx || rtx_equal_p (old, new_rtx))
return 1; return 1;
gcc_assert (in_group != 0 || num_changes == 0); gcc_assert (in_group != 0 || num_changes == 0);
*loc = new; *loc = new_rtx;
/* Save the information describing this change. */ /* Save the information describing this change. */
if (num_changes >= changes_allocated) if (num_changes >= changes_allocated)
...@@ -253,18 +253,18 @@ validate_change_1 (rtx object, rtx *loc, rtx new, bool in_group, bool unshare) ...@@ -253,18 +253,18 @@ validate_change_1 (rtx object, rtx *loc, rtx new, bool in_group, bool unshare)
UNSHARE to false. */ UNSHARE to false. */
bool bool
validate_change (rtx object, rtx *loc, rtx new, bool in_group) validate_change (rtx object, rtx *loc, rtx new_rtx, bool in_group)
{ {
return validate_change_1 (object, loc, new, in_group, false); return validate_change_1 (object, loc, new_rtx, in_group, false);
} }
/* Wrapper for validate_change_1 without the UNSHARE argument defaulting /* Wrapper for validate_change_1 without the UNSHARE argument defaulting
UNSHARE to true. */ UNSHARE to true. */
bool bool
validate_unshare_change (rtx object, rtx *loc, rtx new, bool in_group) validate_unshare_change (rtx object, rtx *loc, rtx new_rtx, bool in_group)
{ {
return validate_change_1 (object, loc, new, in_group, true); return validate_change_1 (object, loc, new_rtx, in_group, true);
} }
...@@ -525,7 +525,7 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to, rtx object) ...@@ -525,7 +525,7 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to, rtx object)
enum rtx_code code; enum rtx_code code;
enum machine_mode op0_mode = VOIDmode; enum machine_mode op0_mode = VOIDmode;
int prev_changes = num_changes; int prev_changes = num_changes;
rtx new; rtx new_rtx;
if (!x) if (!x)
return; return;
...@@ -633,25 +633,25 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to, rtx object) ...@@ -633,25 +633,25 @@ validate_replace_rtx_1 (rtx *loc, rtx from, rtx to, rtx object)
case SIGN_EXTEND: case SIGN_EXTEND:
if (GET_MODE (XEXP (x, 0)) == VOIDmode) if (GET_MODE (XEXP (x, 0)) == VOIDmode)
{ {
new = simplify_gen_unary (code, GET_MODE (x), XEXP (x, 0), new_rtx = simplify_gen_unary (code, GET_MODE (x), XEXP (x, 0),
op0_mode); op0_mode);
/* If any of the above failed, substitute in something that /* If any of the above failed, substitute in something that
we know won't be recognized. */ we know won't be recognized. */
if (!new) if (!new_rtx)
new = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); new_rtx = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
validate_change (object, loc, new, 1); validate_change (object, loc, new_rtx, 1);
} }
break; break;
case SUBREG: case SUBREG:
/* All subregs possible to simplify should be simplified. */ /* All subregs possible to simplify should be simplified. */
new = simplify_subreg (GET_MODE (x), SUBREG_REG (x), op0_mode, new_rtx = simplify_subreg (GET_MODE (x), SUBREG_REG (x), op0_mode,
SUBREG_BYTE (x)); SUBREG_BYTE (x));
/* Subregs of VOIDmode operands are incorrect. */ /* Subregs of VOIDmode operands are incorrect. */
if (!new && GET_MODE (SUBREG_REG (x)) == VOIDmode) if (!new_rtx && GET_MODE (SUBREG_REG (x)) == VOIDmode)
new = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); new_rtx = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
if (new) if (new_rtx)
validate_change (object, loc, new, 1); validate_change (object, loc, new_rtx, 1);
break; break;
case ZERO_EXTRACT: case ZERO_EXTRACT:
case SIGN_EXTRACT: case SIGN_EXTRACT:
...@@ -2200,7 +2200,7 @@ preprocess_constraints (void) ...@@ -2200,7 +2200,7 @@ preprocess_constraints (void)
struct funny_match struct funny_match
{ {
int this, other; int this_op, other;
}; };
int int
...@@ -2350,7 +2350,7 @@ constrain_operands (int strict) ...@@ -2350,7 +2350,7 @@ constrain_operands (int strict)
output op is the one that will be printed. */ output op is the one that will be printed. */
if (val == 2 && strict > 0) if (val == 2 && strict > 0)
{ {
funny_match[funny_match_index].this = opno; funny_match[funny_match_index].this_op = opno;
funny_match[funny_match_index++].other = match; funny_match[funny_match_index++].other = match;
} }
} }
...@@ -2583,7 +2583,7 @@ constrain_operands (int strict) ...@@ -2583,7 +2583,7 @@ constrain_operands (int strict)
while (--funny_match_index >= 0) while (--funny_match_index >= 0)
{ {
recog_data.operand[funny_match[funny_match_index].other] recog_data.operand[funny_match[funny_match_index].other]
= recog_data.operand[funny_match[funny_match_index].this]; = recog_data.operand[funny_match[funny_match_index].this_op];
} }
return 1; return 1;
...@@ -2987,7 +2987,7 @@ peephole2_optimize (void) ...@@ -2987,7 +2987,7 @@ peephole2_optimize (void)
prev = PREV_INSN (insn); prev = PREV_INSN (insn);
if (INSN_P (insn)) if (INSN_P (insn))
{ {
rtx try, before_try, x; rtx attempt, before_try, x;
int match_len; int match_len;
rtx note; rtx note;
bool was_call = false; bool was_call = false;
...@@ -3008,13 +3008,13 @@ peephole2_optimize (void) ...@@ -3008,13 +3008,13 @@ peephole2_optimize (void)
substitution would lose the substitution would lose the
REG_FRAME_RELATED_EXPR that is attached. */ REG_FRAME_RELATED_EXPR that is attached. */
peep2_current_count = 0; peep2_current_count = 0;
try = NULL; attempt = NULL;
} }
else else
/* Match the peephole. */ /* Match the peephole. */
try = peephole2_insns (PATTERN (insn), insn, &match_len); attempt = peephole2_insns (PATTERN (insn), insn, &match_len);
if (try != NULL) if (attempt != NULL)
{ {
/* If we are splitting a CALL_INSN, look for the CALL_INSN /* If we are splitting a CALL_INSN, look for the CALL_INSN
in SEQ and copy our CALL_INSN_FUNCTION_USAGE and other in SEQ and copy our CALL_INSN_FUNCTION_USAGE and other
...@@ -3032,7 +3032,7 @@ peephole2_optimize (void) ...@@ -3032,7 +3032,7 @@ peephole2_optimize (void)
continue; continue;
was_call = true; was_call = true;
new_insn = try; new_insn = attempt;
while (new_insn != NULL_RTX) while (new_insn != NULL_RTX)
{ {
if (CALL_P (new_insn)) if (CALL_P (new_insn))
...@@ -3080,7 +3080,7 @@ peephole2_optimize (void) ...@@ -3080,7 +3080,7 @@ peephole2_optimize (void)
REG_EH_REGION, NULL_RTX); REG_EH_REGION, NULL_RTX);
/* Replace the old sequence with the new. */ /* Replace the old sequence with the new. */
try = emit_insn_after_setloc (try, peep2_insn_data[i].insn, attempt = emit_insn_after_setloc (attempt, peep2_insn_data[i].insn,
INSN_LOCATOR (peep2_insn_data[i].insn)); INSN_LOCATOR (peep2_insn_data[i].insn));
before_try = PREV_INSN (insn); before_try = PREV_INSN (insn);
delete_insn_chain (insn, peep2_insn_data[i].insn, false); delete_insn_chain (insn, peep2_insn_data[i].insn, false);
...@@ -3095,7 +3095,7 @@ peephole2_optimize (void) ...@@ -3095,7 +3095,7 @@ peephole2_optimize (void)
if (eh_edge->flags & (EDGE_EH | EDGE_ABNORMAL_CALL)) if (eh_edge->flags & (EDGE_EH | EDGE_ABNORMAL_CALL))
break; break;
for (x = try ; x != before_try ; x = PREV_INSN (x)) for (x = attempt ; x != before_try ; x = PREV_INSN (x))
if (CALL_P (x) if (CALL_P (x)
|| (flag_non_call_exceptions || (flag_non_call_exceptions
&& may_trap_p (PATTERN (x)) && may_trap_p (PATTERN (x))
...@@ -3145,7 +3145,7 @@ peephole2_optimize (void) ...@@ -3145,7 +3145,7 @@ peephole2_optimize (void)
bitmap_copy (live, peep2_insn_data[i].live_before); bitmap_copy (live, peep2_insn_data[i].live_before);
/* Update life information for the new sequence. */ /* Update life information for the new sequence. */
x = try; x = attempt;
do do
{ {
if (INSN_P (x)) if (INSN_P (x))
...@@ -3169,7 +3169,7 @@ peephole2_optimize (void) ...@@ -3169,7 +3169,7 @@ peephole2_optimize (void)
/* If we generated a jump instruction, it won't have /* If we generated a jump instruction, it won't have
JUMP_LABEL set. Recompute after we're done. */ JUMP_LABEL set. Recompute after we're done. */
for (x = try; x != before_try; x = PREV_INSN (x)) for (x = attempt; x != before_try; x = PREV_INSN (x))
if (JUMP_P (x)) if (JUMP_P (x))
{ {
do_rebuild_jump_labels = true; do_rebuild_jump_labels = true;
......
...@@ -1976,16 +1976,16 @@ delete_caller_save_insns (void) ...@@ -1976,16 +1976,16 @@ delete_caller_save_insns (void)
INSN should be one of the insns which needed this particular spill reg. */ INSN should be one of the insns which needed this particular spill reg. */
static void static void
spill_failure (rtx insn, enum reg_class class) spill_failure (rtx insn, enum reg_class rclass)
{ {
if (asm_noperands (PATTERN (insn)) >= 0) if (asm_noperands (PATTERN (insn)) >= 0)
error_for_asm (insn, "can't find a register in class %qs while " error_for_asm (insn, "can't find a register in class %qs while "
"reloading %<asm%>", "reloading %<asm%>",
reg_class_names[class]); reg_class_names[rclass]);
else else
{ {
error ("unable to find a register to spill in class %qs", error ("unable to find a register to spill in class %qs",
reg_class_names[class]); reg_class_names[rclass]);
if (dump_file) if (dump_file)
{ {
...@@ -2394,7 +2394,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2394,7 +2394,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
enum rtx_code code = GET_CODE (x); enum rtx_code code = GET_CODE (x);
struct elim_table *ep; struct elim_table *ep;
int regno; int regno;
rtx new; rtx new_rtx;
int i, j; int i, j;
const char *fmt; const char *fmt;
int copied = 0; int copied = 0;
...@@ -2523,15 +2523,15 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2523,15 +2523,15 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
&& reg_equiv_constant[REGNO (new0)] != 0) && reg_equiv_constant[REGNO (new0)] != 0)
new0 = reg_equiv_constant[REGNO (new0)]; new0 = reg_equiv_constant[REGNO (new0)];
new = form_sum (new0, new1); new_rtx = form_sum (new0, new1);
/* As above, if we are not inside a MEM we do not want to /* As above, if we are not inside a MEM we do not want to
turn a PLUS into something else. We might try to do so here turn a PLUS into something else. We might try to do so here
for an addition of 0 if we aren't optimizing. */ for an addition of 0 if we aren't optimizing. */
if (! mem_mode && GET_CODE (new) != PLUS) if (! mem_mode && GET_CODE (new_rtx) != PLUS)
return gen_rtx_PLUS (GET_MODE (x), new, const0_rtx); return gen_rtx_PLUS (GET_MODE (x), new_rtx, const0_rtx);
else else
return new; return new_rtx;
} }
} }
return x; return x;
...@@ -2588,8 +2588,8 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2588,8 +2588,8 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
/* If we have something in XEXP (x, 0), the usual case, eliminate it. */ /* If we have something in XEXP (x, 0), the usual case, eliminate it. */
if (XEXP (x, 0)) if (XEXP (x, 0))
{ {
new = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, true); new_rtx = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, true);
if (new != XEXP (x, 0)) if (new_rtx != XEXP (x, 0))
{ {
/* If this is a REG_DEAD note, it is not valid anymore. /* If this is a REG_DEAD note, it is not valid anymore.
Using the eliminated version could result in creating a Using the eliminated version could result in creating a
...@@ -2599,7 +2599,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2599,7 +2599,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
? eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true) ? eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true)
: NULL_RTX); : NULL_RTX);
x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), new, XEXP (x, 1)); x = gen_rtx_EXPR_LIST (REG_NOTE_KIND (x), new_rtx, XEXP (x, 1));
} }
} }
...@@ -2611,10 +2611,10 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2611,10 +2611,10 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
strictly needed, but it simplifies the code. */ strictly needed, but it simplifies the code. */
if (XEXP (x, 1)) if (XEXP (x, 1))
{ {
new = eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true); new_rtx = eliminate_regs_1 (XEXP (x, 1), mem_mode, insn, true);
if (new != XEXP (x, 1)) if (new_rtx != XEXP (x, 1))
return return
gen_rtx_fmt_ee (GET_CODE (x), GET_MODE (x), XEXP (x, 0), new); gen_rtx_fmt_ee (GET_CODE (x), GET_MODE (x), XEXP (x, 0), new_rtx);
} }
return x; return x;
...@@ -2636,13 +2636,13 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2636,13 +2636,13 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
if (GET_CODE (XEXP (x, 1)) == PLUS if (GET_CODE (XEXP (x, 1)) == PLUS
&& XEXP (XEXP (x, 1), 0) == XEXP (x, 0)) && XEXP (XEXP (x, 1), 0) == XEXP (x, 0))
{ {
rtx new = eliminate_regs_1 (XEXP (XEXP (x, 1), 1), mem_mode, rtx new_rtx = eliminate_regs_1 (XEXP (XEXP (x, 1), 1), mem_mode,
insn, true); insn, true);
if (new != XEXP (XEXP (x, 1), 1)) if (new_rtx != XEXP (XEXP (x, 1), 1))
return gen_rtx_fmt_ee (code, GET_MODE (x), XEXP (x, 0), return gen_rtx_fmt_ee (code, GET_MODE (x), XEXP (x, 0),
gen_rtx_PLUS (GET_MODE (x), gen_rtx_PLUS (GET_MODE (x),
XEXP (x, 0), new)); XEXP (x, 0), new_rtx));
} }
return x; return x;
...@@ -2660,9 +2660,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2660,9 +2660,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
case POPCOUNT: case POPCOUNT:
case PARITY: case PARITY:
case BSWAP: case BSWAP:
new = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, false); new_rtx = eliminate_regs_1 (XEXP (x, 0), mem_mode, insn, false);
if (new != XEXP (x, 0)) if (new_rtx != XEXP (x, 0))
return gen_rtx_fmt_e (code, GET_MODE (x), new); return gen_rtx_fmt_e (code, GET_MODE (x), new_rtx);
return x; return x;
case SUBREG: case SUBREG:
...@@ -2678,17 +2678,17 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2678,17 +2678,17 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
&& reg_equiv_memory_loc != 0 && reg_equiv_memory_loc != 0
&& reg_equiv_memory_loc[REGNO (SUBREG_REG (x))] != 0) && reg_equiv_memory_loc[REGNO (SUBREG_REG (x))] != 0)
{ {
new = SUBREG_REG (x); new_rtx = SUBREG_REG (x);
} }
else else
new = eliminate_regs_1 (SUBREG_REG (x), mem_mode, insn, false); new_rtx = eliminate_regs_1 (SUBREG_REG (x), mem_mode, insn, false);
if (new != SUBREG_REG (x)) if (new_rtx != SUBREG_REG (x))
{ {
int x_size = GET_MODE_SIZE (GET_MODE (x)); int x_size = GET_MODE_SIZE (GET_MODE (x));
int new_size = GET_MODE_SIZE (GET_MODE (new)); int new_size = GET_MODE_SIZE (GET_MODE (new_rtx));
if (MEM_P (new) if (MEM_P (new_rtx)
&& ((x_size < new_size && ((x_size < new_size
#ifdef WORD_REGISTER_OPERATIONS #ifdef WORD_REGISTER_OPERATIONS
/* On these machines, combine can create rtl of the form /* On these machines, combine can create rtl of the form
...@@ -2704,9 +2704,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2704,9 +2704,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
) )
|| x_size == new_size) || x_size == new_size)
) )
return adjust_address_nv (new, GET_MODE (x), SUBREG_BYTE (x)); return adjust_address_nv (new_rtx, GET_MODE (x), SUBREG_BYTE (x));
else else
return gen_rtx_SUBREG (GET_MODE (x), new, SUBREG_BYTE (x)); return gen_rtx_SUBREG (GET_MODE (x), new_rtx, SUBREG_BYTE (x));
} }
return x; return x;
...@@ -2722,9 +2722,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2722,9 +2722,9 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
case USE: case USE:
/* Handle insn_list USE that a call to a pure function may generate. */ /* Handle insn_list USE that a call to a pure function may generate. */
new = eliminate_regs_1 (XEXP (x, 0), 0, insn, false); new_rtx = eliminate_regs_1 (XEXP (x, 0), 0, insn, false);
if (new != XEXP (x, 0)) if (new_rtx != XEXP (x, 0))
return gen_rtx_USE (GET_MODE (x), new); return gen_rtx_USE (GET_MODE (x), new_rtx);
return x; return x;
case CLOBBER: case CLOBBER:
...@@ -2743,21 +2743,21 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2743,21 +2743,21 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
{ {
if (*fmt == 'e') if (*fmt == 'e')
{ {
new = eliminate_regs_1 (XEXP (x, i), mem_mode, insn, false); new_rtx = eliminate_regs_1 (XEXP (x, i), mem_mode, insn, false);
if (new != XEXP (x, i) && ! copied) if (new_rtx != XEXP (x, i) && ! copied)
{ {
x = shallow_copy_rtx (x); x = shallow_copy_rtx (x);
copied = 1; copied = 1;
} }
XEXP (x, i) = new; XEXP (x, i) = new_rtx;
} }
else if (*fmt == 'E') else if (*fmt == 'E')
{ {
int copied_vec = 0; int copied_vec = 0;
for (j = 0; j < XVECLEN (x, i); j++) for (j = 0; j < XVECLEN (x, i); j++)
{ {
new = eliminate_regs_1 (XVECEXP (x, i, j), mem_mode, insn, false); new_rtx = eliminate_regs_1 (XVECEXP (x, i, j), mem_mode, insn, false);
if (new != XVECEXP (x, i, j) && ! copied_vec) if (new_rtx != XVECEXP (x, i, j) && ! copied_vec)
{ {
rtvec new_v = gen_rtvec_v (XVECLEN (x, i), rtvec new_v = gen_rtvec_v (XVECLEN (x, i),
XVEC (x, i)->elem); XVEC (x, i)->elem);
...@@ -2769,7 +2769,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn, ...@@ -2769,7 +2769,7 @@ eliminate_regs_1 (rtx x, enum machine_mode mem_mode, rtx insn,
XVEC (x, i) = new_v; XVEC (x, i) = new_v;
copied_vec = 1; copied_vec = 1;
} }
XVECEXP (x, i, j) = new; XVECEXP (x, i, j) = new_rtx;
} }
} }
} }
...@@ -5474,7 +5474,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r, ...@@ -5474,7 +5474,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r,
for (count = 0; count < n_spills; count++) for (count = 0; count < n_spills; count++)
{ {
int class = (int) rld[r].class; int rclass = (int) rld[r].class;
int regnum; int regnum;
i++; i++;
...@@ -5491,7 +5491,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r, ...@@ -5491,7 +5491,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r,
&& free_for_value_p (regnum, rld[r].mode, rld[r].opnum, && free_for_value_p (regnum, rld[r].mode, rld[r].opnum,
rld[r].when_needed, rld[r].in, rld[r].when_needed, rld[r].in,
rld[r].out, r, 1))) rld[r].out, r, 1)))
&& TEST_HARD_REG_BIT (reg_class_contents[class], regnum) && TEST_HARD_REG_BIT (reg_class_contents[rclass], regnum)
&& HARD_REGNO_MODE_OK (regnum, rld[r].mode) && HARD_REGNO_MODE_OK (regnum, rld[r].mode)
/* Look first for regs to share, then for unshared. But /* Look first for regs to share, then for unshared. But
don't share regs used for inherited reloads; they are don't share regs used for inherited reloads; they are
...@@ -5521,7 +5521,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r, ...@@ -5521,7 +5521,7 @@ allocate_reload_reg (struct insn_chain *chain ATTRIBUTE_UNUSED, int r,
while (nr > 1) while (nr > 1)
{ {
int regno = regnum + nr - 1; int regno = regnum + nr - 1;
if (!(TEST_HARD_REG_BIT (reg_class_contents[class], regno) if (!(TEST_HARD_REG_BIT (reg_class_contents[rclass], regno)
&& spill_reg_order[regno] >= 0 && spill_reg_order[regno] >= 0
&& reload_reg_free_p (regno, rld[r].opnum, && reload_reg_free_p (regno, rld[r].opnum,
rld[r].when_needed))) rld[r].when_needed)))
...@@ -5793,7 +5793,7 @@ choose_reload_regs (struct insn_chain *chain) ...@@ -5793,7 +5793,7 @@ choose_reload_regs (struct insn_chain *chain)
#endif #endif
) )
{ {
enum reg_class class = rld[r].class, last_class; enum reg_class rclass = rld[r].class, last_class;
rtx last_reg = reg_last_reload_reg[regno]; rtx last_reg = reg_last_reload_reg[regno];
enum machine_mode need_mode; enum machine_mode need_mode;
...@@ -5814,18 +5814,18 @@ choose_reload_regs (struct insn_chain *chain) ...@@ -5814,18 +5814,18 @@ choose_reload_regs (struct insn_chain *chain)
&& reg_reloaded_contents[i] == regno && reg_reloaded_contents[i] == regno
&& TEST_HARD_REG_BIT (reg_reloaded_valid, i) && TEST_HARD_REG_BIT (reg_reloaded_valid, i)
&& HARD_REGNO_MODE_OK (i, rld[r].mode) && HARD_REGNO_MODE_OK (i, rld[r].mode)
&& (TEST_HARD_REG_BIT (reg_class_contents[(int) class], i) && (TEST_HARD_REG_BIT (reg_class_contents[(int) rclass], i)
/* Even if we can't use this register as a reload /* Even if we can't use this register as a reload
register, we might use it for reload_override_in, register, we might use it for reload_override_in,
if copying it to the desired class is cheap if copying it to the desired class is cheap
enough. */ enough. */
|| ((REGISTER_MOVE_COST (mode, last_class, class) || ((REGISTER_MOVE_COST (mode, last_class, rclass)
< MEMORY_MOVE_COST (mode, class, 1)) < MEMORY_MOVE_COST (mode, rclass, 1))
&& (secondary_reload_class (1, class, mode, && (secondary_reload_class (1, rclass, mode,
last_reg) last_reg)
== NO_REGS) == NO_REGS)
#ifdef SECONDARY_MEMORY_NEEDED #ifdef SECONDARY_MEMORY_NEEDED
&& ! SECONDARY_MEMORY_NEEDED (last_class, class, && ! SECONDARY_MEMORY_NEEDED (last_class, rclass,
mode) mode)
#endif #endif
)) ))
......
...@@ -2470,32 +2470,32 @@ replace_rtx (rtx x, rtx from, rtx to) ...@@ -2470,32 +2470,32 @@ replace_rtx (rtx x, rtx from, rtx to)
if (GET_CODE (x) == SUBREG) if (GET_CODE (x) == SUBREG)
{ {
rtx new = replace_rtx (SUBREG_REG (x), from, to); rtx new_rtx = replace_rtx (SUBREG_REG (x), from, to);
if (GET_CODE (new) == CONST_INT) if (GET_CODE (new_rtx) == CONST_INT)
{ {
x = simplify_subreg (GET_MODE (x), new, x = simplify_subreg (GET_MODE (x), new_rtx,
GET_MODE (SUBREG_REG (x)), GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x)); SUBREG_BYTE (x));
gcc_assert (x); gcc_assert (x);
} }
else else
SUBREG_REG (x) = new; SUBREG_REG (x) = new_rtx;
return x; return x;
} }
else if (GET_CODE (x) == ZERO_EXTEND) else if (GET_CODE (x) == ZERO_EXTEND)
{ {
rtx new = replace_rtx (XEXP (x, 0), from, to); rtx new_rtx = replace_rtx (XEXP (x, 0), from, to);
if (GET_CODE (new) == CONST_INT) if (GET_CODE (new_rtx) == CONST_INT)
{ {
x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x), x = simplify_unary_operation (ZERO_EXTEND, GET_MODE (x),
new, GET_MODE (XEXP (x, 0))); new_rtx, GET_MODE (XEXP (x, 0)));
gcc_assert (x); gcc_assert (x);
} }
else else
XEXP (x, 0) = new; XEXP (x, 0) = new_rtx;
return x; return x;
} }
...@@ -3692,12 +3692,12 @@ nonzero_bits1 (const_rtx x, enum machine_mode mode, const_rtx known_x, ...@@ -3692,12 +3692,12 @@ nonzero_bits1 (const_rtx x, enum machine_mode mode, const_rtx known_x,
{ {
unsigned HOST_WIDE_INT nonzero_for_hook = nonzero; unsigned HOST_WIDE_INT nonzero_for_hook = nonzero;
rtx new = rtl_hooks.reg_nonzero_bits (x, mode, known_x, rtx new_rtx = rtl_hooks.reg_nonzero_bits (x, mode, known_x,
known_mode, known_ret, known_mode, known_ret,
&nonzero_for_hook); &nonzero_for_hook);
if (new) if (new_rtx)
nonzero_for_hook &= cached_nonzero_bits (new, mode, known_x, nonzero_for_hook &= cached_nonzero_bits (new_rtx, mode, known_x,
known_mode, known_ret); known_mode, known_ret);
return nonzero_for_hook; return nonzero_for_hook;
...@@ -4177,12 +4177,12 @@ num_sign_bit_copies1 (const_rtx x, enum machine_mode mode, const_rtx known_x, ...@@ -4177,12 +4177,12 @@ num_sign_bit_copies1 (const_rtx x, enum machine_mode mode, const_rtx known_x,
{ {
unsigned int copies_for_hook = 1, copies = 1; unsigned int copies_for_hook = 1, copies = 1;
rtx new = rtl_hooks.reg_num_sign_bit_copies (x, mode, known_x, rtx new_rtx = rtl_hooks.reg_num_sign_bit_copies (x, mode, known_x,
known_mode, known_ret, known_mode, known_ret,
&copies_for_hook); &copies_for_hook);
if (new) if (new_rtx)
copies = cached_num_sign_bit_copies (new, mode, known_x, copies = cached_num_sign_bit_copies (new_rtx, mode, known_x,
known_mode, known_ret); known_mode, known_ret);
if (copies > 1 || copies_for_hook > 1) if (copies > 1 || copies_for_hook > 1)
......
...@@ -141,7 +141,7 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x) ...@@ -141,7 +141,7 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
{ {
/* This is the only other case we handle. */ /* This is the only other case we handle. */
int offset = 0; int offset = 0;
rtx new; rtx new_rtx;
if (WORDS_BIG_ENDIAN) if (WORDS_BIG_ENDIAN)
offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD)
...@@ -152,11 +152,11 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x) ...@@ -152,11 +152,11 @@ gen_lowpart_if_possible (enum machine_mode mode, rtx x)
offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)) offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode))
- MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x)))); - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x))));
new = adjust_address_nv (x, mode, offset); new_rtx = adjust_address_nv (x, mode, offset);
if (! memory_address_p (mode, XEXP (new, 0))) if (! memory_address_p (mode, XEXP (new_rtx, 0)))
return 0; return 0;
return new; return new_rtx;
} }
else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode else if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode
&& validate_subreg (mode, GET_MODE (x), x, && validate_subreg (mode, GET_MODE (x), x,
......
...@@ -357,7 +357,7 @@ static void ...@@ -357,7 +357,7 @@ static void
add_deps_for_risky_insns (rtx head, rtx tail) add_deps_for_risky_insns (rtx head, rtx tail)
{ {
rtx insn, prev; rtx insn, prev;
int class; int classification;
rtx last_jump = NULL_RTX; rtx last_jump = NULL_RTX;
rtx next_tail = NEXT_INSN (tail); rtx next_tail = NEXT_INSN (tail);
basic_block last_block = NULL, bb; basic_block last_block = NULL, bb;
...@@ -372,9 +372,9 @@ add_deps_for_risky_insns (rtx head, rtx tail) ...@@ -372,9 +372,9 @@ add_deps_for_risky_insns (rtx head, rtx tail)
} }
else if (INSN_P (insn) && last_jump != NULL_RTX) else if (INSN_P (insn) && last_jump != NULL_RTX)
{ {
class = haifa_classify_insn (insn); classification = haifa_classify_insn (insn);
prev = last_jump; prev = last_jump;
switch (class) switch (classification)
{ {
case PFREE_CANDIDATE: case PFREE_CANDIDATE:
if (flag_schedule_speculative_load) if (flag_schedule_speculative_load)
......
...@@ -2388,10 +2388,10 @@ static struct deps *bb_deps; ...@@ -2388,10 +2388,10 @@ static struct deps *bb_deps;
static rtx static rtx
concat_INSN_LIST (rtx copy, rtx old) concat_INSN_LIST (rtx copy, rtx old)
{ {
rtx new = old; rtx new_rtx = old;
for (; copy ; copy = XEXP (copy, 1)) for (; copy ; copy = XEXP (copy, 1))
new = alloc_INSN_LIST (XEXP (copy, 0), new); new_rtx = alloc_INSN_LIST (XEXP (copy, 0), new_rtx);
return new; return new_rtx;
} }
static void static void
......
...@@ -163,12 +163,12 @@ variable_size (tree size) ...@@ -163,12 +163,12 @@ variable_size (tree size)
#endif #endif
/* Return the machine mode to use for a nonscalar of SIZE bits. The /* Return the machine mode to use for a nonscalar of SIZE bits. The
mode must be in class CLASS, and have exactly that many value bits; mode must be in class MCLASS, and have exactly that many value bits;
it may have padding as well. If LIMIT is nonzero, modes of wider it may have padding as well. If LIMIT is nonzero, modes of wider
than MAX_FIXED_MODE_SIZE will not be used. */ than MAX_FIXED_MODE_SIZE will not be used. */
enum machine_mode enum machine_mode
mode_for_size (unsigned int size, enum mode_class class, int limit) mode_for_size (unsigned int size, enum mode_class mclass, int limit)
{ {
enum machine_mode mode; enum machine_mode mode;
...@@ -176,7 +176,7 @@ mode_for_size (unsigned int size, enum mode_class class, int limit) ...@@ -176,7 +176,7 @@ mode_for_size (unsigned int size, enum mode_class class, int limit)
return BLKmode; return BLKmode;
/* Get the first mode which has this size, in the specified class. */ /* Get the first mode which has this size, in the specified class. */
for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode; for (mode = GET_CLASS_NARROWEST_MODE (mclass); mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode)) mode = GET_MODE_WIDER_MODE (mode))
if (GET_MODE_PRECISION (mode) == size) if (GET_MODE_PRECISION (mode) == size)
return mode; return mode;
...@@ -187,7 +187,7 @@ mode_for_size (unsigned int size, enum mode_class class, int limit) ...@@ -187,7 +187,7 @@ mode_for_size (unsigned int size, enum mode_class class, int limit)
/* Similar, except passed a tree node. */ /* Similar, except passed a tree node. */
enum machine_mode enum machine_mode
mode_for_size_tree (const_tree size, enum mode_class class, int limit) mode_for_size_tree (const_tree size, enum mode_class mclass, int limit)
{ {
unsigned HOST_WIDE_INT uhwi; unsigned HOST_WIDE_INT uhwi;
unsigned int ui; unsigned int ui;
...@@ -198,20 +198,20 @@ mode_for_size_tree (const_tree size, enum mode_class class, int limit) ...@@ -198,20 +198,20 @@ mode_for_size_tree (const_tree size, enum mode_class class, int limit)
ui = uhwi; ui = uhwi;
if (uhwi != ui) if (uhwi != ui)
return BLKmode; return BLKmode;
return mode_for_size (ui, class, limit); return mode_for_size (ui, mclass, limit);
} }
/* Similar, but never return BLKmode; return the narrowest mode that /* Similar, but never return BLKmode; return the narrowest mode that
contains at least the requested number of value bits. */ contains at least the requested number of value bits. */
enum machine_mode enum machine_mode
smallest_mode_for_size (unsigned int size, enum mode_class class) smallest_mode_for_size (unsigned int size, enum mode_class mclass)
{ {
enum machine_mode mode; enum machine_mode mode;
/* Get the first mode which has at least this size, in the /* Get the first mode which has at least this size, in the
specified class. */ specified class. */
for (mode = GET_CLASS_NARROWEST_MODE (class); mode != VOIDmode; for (mode = GET_CLASS_NARROWEST_MODE (mclass); mode != VOIDmode;
mode = GET_MODE_WIDER_MODE (mode)) mode = GET_MODE_WIDER_MODE (mode))
if (GET_MODE_PRECISION (mode) >= size) if (GET_MODE_PRECISION (mode) >= size)
return mode; return mode;
......
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