Commit d858f359 by Kaveh R. Ghazi Committed by Kaveh Ghazi

cfg.c (dump_reg_info): Avoid C++ keywords.

	* cfg.c (dump_reg_info): Avoid C++ keywords.
	* dwarf2asm.c (dw2_force_const_mem,
	dw2_asm_output_encoded_addr_rtx): Likewise.
	* except.c (gen_eh_region, add_action_record, output_ttype):
	Likewise.
	* expmed.c (expand_shift): Likewise.
	* global.c (find_reg): Likewise.
	* graph.c (draw_edge): Likewise.
	* local-alloc.c (reg_meets_class_p, find_free_reg): Likewise.
	* optabs.c (expand_binop, expand_twoval_unop, expand_twoval_binop,
	widen_clz, widen_bswap, expand_parity, expand_unop,
	emit_cmp_and_jump_insn_1): Likewise.
	* postreload.c (reload_cse_simplify_operands): Likewise.
	* ra.h (add_neighbor): Likewise.
	* reg-stack.c (remove_regno_note, change_stack): Likewise.
	* regclass.c (memory_move_secondary_cost, dump_regclass, regclass,
	record_reg_classes, copy_cost, record_address_regs,
	invalid_mode_change_p): Likewise.
	* regrename.c (regrename_optimize, scan_rtx_reg,
	dump_def_use_chain, find_oldest_value_reg,
	replace_oldest_value_reg, copyprop_hardreg_forward_1): Likewise.

From-SVN: r137893
parent 1bc39d2f
2008-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cfg.c (dump_reg_info): Avoid C++ keywords.
* dwarf2asm.c (dw2_force_const_mem,
dw2_asm_output_encoded_addr_rtx): Likewise.
* except.c (gen_eh_region, add_action_record, output_ttype):
Likewise.
* expmed.c (expand_shift): Likewise.
* global.c (find_reg): Likewise.
* graph.c (draw_edge): Likewise.
* local-alloc.c (reg_meets_class_p, find_free_reg): Likewise.
* optabs.c (expand_binop, expand_twoval_unop, expand_twoval_binop,
widen_clz, widen_bswap, expand_parity, expand_unop,
emit_cmp_and_jump_insn_1): Likewise.
* postreload.c (reload_cse_simplify_operands): Likewise.
* ra.h (add_neighbor): Likewise.
* reg-stack.c (remove_regno_note, change_stack): Likewise.
* regclass.c (memory_move_secondary_cost, dump_regclass, regclass,
record_reg_classes, copy_cost, record_address_regs,
invalid_mode_change_p): Likewise.
* regrename.c (regrename_optimize, scan_rtx_reg,
dump_def_use_chain, find_oldest_value_reg,
replace_oldest_value_reg, copyprop_hardreg_forward_1): Likewise.
2008-07-16 David Edelsohn <edelsohn@gnu.org> 2008-07-16 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (processor_target_table): Remove duplicate * config/rs6000/rs6000.c (processor_target_table): Remove duplicate
......
...@@ -597,7 +597,7 @@ dump_reg_info (FILE *file) ...@@ -597,7 +597,7 @@ dump_reg_info (FILE *file)
fprintf (file, "%d registers.\n", max); fprintf (file, "%d registers.\n", max);
for (i = FIRST_PSEUDO_REGISTER; i < max; i++) for (i = FIRST_PSEUDO_REGISTER; i < max; i++)
{ {
enum reg_class class, altclass; enum reg_class rclass, altclass;
if (regstat_n_sets_and_refs) if (regstat_n_sets_and_refs)
fprintf (file, "\nRegister %d used %d times across %d insns", fprintf (file, "\nRegister %d used %d times across %d insns",
...@@ -628,17 +628,17 @@ dump_reg_info (FILE *file) ...@@ -628,17 +628,17 @@ dump_reg_info (FILE *file)
&& PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD) && PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD)
fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i)); fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i));
class = reg_preferred_class (i); rclass = reg_preferred_class (i);
altclass = reg_alternate_class (i); altclass = reg_alternate_class (i);
if (class != GENERAL_REGS || altclass != ALL_REGS) if (rclass != GENERAL_REGS || altclass != ALL_REGS)
{ {
if (altclass == ALL_REGS || class == ALL_REGS) if (altclass == ALL_REGS || rclass == ALL_REGS)
fprintf (file, "; pref %s", reg_class_names[(int) class]); fprintf (file, "; pref %s", reg_class_names[(int) rclass]);
else if (altclass == NO_REGS) else if (altclass == NO_REGS)
fprintf (file, "; %s or none", reg_class_names[(int) class]); fprintf (file, "; %s or none", reg_class_names[(int) rclass]);
else else
fprintf (file, "; pref %s, else %s", fprintf (file, "; pref %s, else %s",
reg_class_names[(int) class], reg_class_names[(int) rclass],
reg_class_names[(int) altclass]); reg_class_names[(int) altclass]);
} }
......
...@@ -730,11 +730,11 @@ splay_tree_compare_strings (splay_tree_key k1, splay_tree_key k2) ...@@ -730,11 +730,11 @@ splay_tree_compare_strings (splay_tree_key k1, splay_tree_key k2)
/* Put X, a SYMBOL_REF, in memory. Return a SYMBOL_REF to the allocated /* Put X, a SYMBOL_REF, in memory. Return a SYMBOL_REF to the allocated
memory. Differs from force_const_mem in that a single pool is used for memory. Differs from force_const_mem in that a single pool is used for
the entire unit of translation, and the memory is not guaranteed to be the entire unit of translation, and the memory is not guaranteed to be
"near" the function in any interesting sense. PUBLIC controls whether "near" the function in any interesting sense. IS_PUBLIC controls whether
the symbol can be shared across the entire application (or DSO). */ the symbol can be shared across the entire application (or DSO). */
static rtx static rtx
dw2_force_const_mem (rtx x, bool public) dw2_force_const_mem (rtx x, bool is_public)
{ {
splay_tree_node node; splay_tree_node node;
const char *str; const char *str;
...@@ -755,7 +755,7 @@ dw2_force_const_mem (rtx x, bool public) ...@@ -755,7 +755,7 @@ dw2_force_const_mem (rtx x, bool public)
{ {
tree id; tree id;
if (public && USE_LINKONCE_INDIRECT) if (is_public && USE_LINKONCE_INDIRECT)
{ {
char *ref_name = XALLOCAVEC (char, strlen (str) + sizeof "DW.ref."); char *ref_name = XALLOCAVEC (char, strlen (str) + sizeof "DW.ref.");
...@@ -829,7 +829,7 @@ dw2_output_indirect_constants (void) ...@@ -829,7 +829,7 @@ dw2_output_indirect_constants (void)
reference is shared across the entire application (or DSO). */ reference is shared across the entire application (or DSO). */
void void
dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool public, dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool is_public,
const char *comment, ...) const char *comment, ...)
{ {
int size; int size;
...@@ -870,7 +870,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool public, ...@@ -870,7 +870,7 @@ dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr, bool public,
the constant pool for this function. Moreover, we'd like to the constant pool for this function. Moreover, we'd like to
share these constants across the entire unit of translation and share these constants across the entire unit of translation and
even, if possible, across the entire application (or DSO). */ even, if possible, across the entire application (or DSO). */
addr = dw2_force_const_mem (addr, public); addr = dw2_force_const_mem (addr, is_public);
encoding &= ~DW_EH_PE_indirect; encoding &= ~DW_EH_PE_indirect;
goto restart; goto restart;
} }
......
...@@ -419,30 +419,30 @@ init_eh_for_function (void) ...@@ -419,30 +419,30 @@ init_eh_for_function (void)
static struct eh_region * static struct eh_region *
gen_eh_region (enum eh_region_type type, struct eh_region *outer) gen_eh_region (enum eh_region_type type, struct eh_region *outer)
{ {
struct eh_region *new; struct eh_region *new_eh;
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
gcc_assert (doing_eh (0)); gcc_assert (doing_eh (0));
#endif #endif
/* Insert a new blank region as a leaf in the tree. */ /* Insert a new blank region as a leaf in the tree. */
new = GGC_CNEW (struct eh_region); new_eh = GGC_CNEW (struct eh_region);
new->type = type; new_eh->type = type;
new->outer = outer; new_eh->outer = outer;
if (outer) if (outer)
{ {
new->next_peer = outer->inner; new_eh->next_peer = outer->inner;
outer->inner = new; outer->inner = new_eh;
} }
else else
{ {
new->next_peer = cfun->eh->region_tree; new_eh->next_peer = cfun->eh->region_tree;
cfun->eh->region_tree = new; cfun->eh->region_tree = new_eh;
} }
new->region_number = ++cfun->eh->last_region_number; new_eh->region_number = ++cfun->eh->last_region_number;
return new; return new_eh;
} }
struct eh_region * struct eh_region *
...@@ -3047,19 +3047,19 @@ action_record_hash (const void *pentry) ...@@ -3047,19 +3047,19 @@ action_record_hash (const void *pentry)
static int static int
add_action_record (htab_t ar_hash, int filter, int next) add_action_record (htab_t ar_hash, int filter, int next)
{ {
struct action_record **slot, *new, tmp; struct action_record **slot, *new_ar, tmp;
tmp.filter = filter; tmp.filter = filter;
tmp.next = next; tmp.next = next;
slot = (struct action_record **) htab_find_slot (ar_hash, &tmp, INSERT); slot = (struct action_record **) htab_find_slot (ar_hash, &tmp, INSERT);
if ((new = *slot) == NULL) if ((new_ar = *slot) == NULL)
{ {
new = XNEW (struct action_record); new_ar = XNEW (struct action_record);
new->offset = VARRAY_ACTIVE_SIZE (crtl->eh.action_record_data) + 1; new_ar->offset = VARRAY_ACTIVE_SIZE (crtl->eh.action_record_data) + 1;
new->filter = filter; new_ar->filter = filter;
new->next = next; new_ar->next = next;
*slot = new; *slot = new_ar;
/* The filter value goes in untouched. The link to the next /* The filter value goes in untouched. The link to the next
record is a "self-relative" byte offset, or zero to indicate record is a "self-relative" byte offset, or zero to indicate
...@@ -3072,7 +3072,7 @@ add_action_record (htab_t ar_hash, int filter, int next) ...@@ -3072,7 +3072,7 @@ add_action_record (htab_t ar_hash, int filter, int next)
push_sleb128 (&crtl->eh.action_record_data, next); push_sleb128 (&crtl->eh.action_record_data, next);
} }
return new->offset; return new_ar->offset;
} }
static int static int
...@@ -3550,7 +3550,7 @@ static void ...@@ -3550,7 +3550,7 @@ static void
output_ttype (tree type, int tt_format, int tt_format_size) output_ttype (tree type, int tt_format, int tt_format_size)
{ {
rtx value; rtx value;
bool public = true; bool is_public = true;
if (type == NULL_TREE) if (type == NULL_TREE)
value = const0_rtx; value = const0_rtx;
...@@ -3573,7 +3573,7 @@ output_ttype (tree type, int tt_format, int tt_format_size) ...@@ -3573,7 +3573,7 @@ output_ttype (tree type, int tt_format, int tt_format_size)
node = varpool_node (type); node = varpool_node (type);
if (node) if (node)
varpool_mark_needed_node (node); varpool_mark_needed_node (node);
public = TREE_PUBLIC (type); is_public = TREE_PUBLIC (type);
} }
} }
else else
...@@ -3588,7 +3588,7 @@ output_ttype (tree type, int tt_format, int tt_format_size) ...@@ -3588,7 +3588,7 @@ output_ttype (tree type, int tt_format, int tt_format_size)
assemble_integer (value, tt_format_size, assemble_integer (value, tt_format_size,
tt_format_size * BITS_PER_UNIT, 1); tt_format_size * BITS_PER_UNIT, 1);
else else
dw2_asm_output_encoded_addr_rtx (tt_format, value, public, NULL); dw2_asm_output_encoded_addr_rtx (tt_format, value, is_public, NULL);
} }
void void
......
...@@ -2050,7 +2050,7 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted, ...@@ -2050,7 +2050,7 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
optab lrotate_optab = rotl_optab; optab lrotate_optab = rotl_optab;
optab rrotate_optab = rotr_optab; optab rrotate_optab = rotr_optab;
enum machine_mode op1_mode; enum machine_mode op1_mode;
int try; int attempt;
op1 = expand_normal (amount); op1 = expand_normal (amount);
op1_mode = GET_MODE (op1); op1_mode = GET_MODE (op1);
...@@ -2105,13 +2105,13 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted, ...@@ -2105,13 +2105,13 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
return shifted; return shifted;
} }
for (try = 0; temp == 0 && try < 3; try++) for (attempt = 0; temp == 0 && attempt < 3; attempt++)
{ {
enum optab_methods methods; enum optab_methods methods;
if (try == 0) if (attempt == 0)
methods = OPTAB_DIRECT; methods = OPTAB_DIRECT;
else if (try == 1) else if (attempt == 1)
methods = OPTAB_WIDEN; methods = OPTAB_WIDEN;
else else
methods = OPTAB_LIB_WIDEN; methods = OPTAB_LIB_WIDEN;
......
...@@ -978,7 +978,7 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere ...@@ -978,7 +978,7 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
int i, best_reg, pass; int i, best_reg, pass;
HARD_REG_SET used, used1, used2; HARD_REG_SET used, used1, used2;
enum reg_class class = (alt_regs_p enum reg_class rclass = (alt_regs_p
? reg_alternate_class (allocno[num].reg) ? reg_alternate_class (allocno[num].reg)
: reg_preferred_class (allocno[num].reg)); : reg_preferred_class (allocno[num].reg));
enum machine_mode mode = PSEUDO_REGNO_MODE (allocno[num].reg); enum machine_mode mode = PSEUDO_REGNO_MODE (allocno[num].reg);
...@@ -995,7 +995,7 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere ...@@ -995,7 +995,7 @@ find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbere
if (losers) if (losers)
IOR_HARD_REG_SET (used1, losers); IOR_HARD_REG_SET (used1, losers);
IOR_COMPL_HARD_REG_SET (used1, reg_class_contents[(int) class]); IOR_COMPL_HARD_REG_SET (used1, reg_class_contents[(int) rclass]);
#ifdef EH_RETURN_DATA_REGNO #ifdef EH_RETURN_DATA_REGNO
if (allocno[num].no_eh_reg) if (allocno[num].no_eh_reg)
......
...@@ -165,25 +165,25 @@ darkgrey\n shape: ellipse" : "white", ...@@ -165,25 +165,25 @@ darkgrey\n shape: ellipse" : "white",
} }
static void static void
draw_edge (FILE *fp, int from, int to, int bb_edge, int class) draw_edge (FILE *fp, int from, int to, int bb_edge, int color_class)
{ {
const char * color; const char * color;
switch (graph_dump_format) switch (graph_dump_format)
{ {
case vcg: case vcg:
color = ""; color = "";
if (class == 2) if (color_class == 2)
color = "color: red "; color = "color: red ";
else if (bb_edge) else if (bb_edge)
color = "color: blue "; color = "color: blue ";
else if (class == 3) else if (color_class == 3)
color = "color: green "; color = "color: green ";
fprintf (fp, fprintf (fp,
"edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s", "edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s",
current_function_name (), from, current_function_name (), from,
current_function_name (), to, color); current_function_name (), to, color);
if (class) if (color_class)
fprintf (fp, "class: %d ", class); fprintf (fp, "class: %d ", color_class);
fputs ("}\n", fp); fputs ("}\n", fp);
break; break;
case no_graph: case no_graph:
......
...@@ -1984,11 +1984,11 @@ combine_regs (rtx usedreg, rtx setreg, int may_save_copy, int insn_number, ...@@ -1984,11 +1984,11 @@ combine_regs (rtx usedreg, rtx setreg, int may_save_copy, int insn_number,
True if REG's reg class either contains or is contained in CLASS. */ True if REG's reg class either contains or is contained in CLASS. */
static int static int
reg_meets_class_p (int reg, enum reg_class class) reg_meets_class_p (int reg, enum reg_class rclass)
{ {
enum reg_class rclass = reg_preferred_class (reg); enum reg_class rclass2 = reg_preferred_class (reg);
return (reg_class_subset_p (rclass, class) return (reg_class_subset_p (rclass2, rclass)
|| reg_class_subset_p (class, rclass)); || reg_class_subset_p (rclass, rclass2));
} }
/* Update the class of QTYNO assuming that REG is being tied to it. */ /* Update the class of QTYNO assuming that REG is being tied to it. */
...@@ -2139,7 +2139,7 @@ wipe_dead_reg (rtx reg, int output_p) ...@@ -2139,7 +2139,7 @@ wipe_dead_reg (rtx reg, int output_p)
register is available. If not, return -1. */ register is available. If not, return -1. */
static int static int
find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno, find_free_reg (enum reg_class rclass, enum machine_mode mode, int qtyno,
int accept_call_clobbered, int just_try_suggested, int accept_call_clobbered, int just_try_suggested,
int born_index, int dead_index) int born_index, int dead_index)
{ {
...@@ -2171,7 +2171,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno, ...@@ -2171,7 +2171,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
for (ins = born_index; ins < dead_index; ins++) for (ins = born_index; ins < dead_index; ins++)
IOR_HARD_REG_SET (used, regs_live_at[ins]); IOR_HARD_REG_SET (used, regs_live_at[ins]);
IOR_COMPL_HARD_REG_SET (used, reg_class_contents[(int) class]); IOR_COMPL_HARD_REG_SET (used, reg_class_contents[(int) rclass]);
/* Don't use the frame pointer reg in local-alloc even if /* Don't use the frame pointer reg in local-alloc even if
we may omit the frame pointer, because if we do that and then we we may omit the frame pointer, because if we do that and then we
...@@ -2256,7 +2256,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno, ...@@ -2256,7 +2256,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
{ {
/* Don't try the copy-suggested regs again. */ /* Don't try the copy-suggested regs again. */
qty_phys_num_copy_sugg[qtyno] = 0; qty_phys_num_copy_sugg[qtyno] = 0;
return find_free_reg (class, mode, qtyno, accept_call_clobbered, 1, return find_free_reg (rclass, mode, qtyno, accept_call_clobbered, 1,
born_index, dead_index); born_index, dead_index);
} }
...@@ -2274,7 +2274,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno, ...@@ -2274,7 +2274,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
optimize_size ? qty[qtyno].n_calls_crossed optimize_size ? qty[qtyno].n_calls_crossed
: qty[qtyno].freq_calls_crossed)) : qty[qtyno].freq_calls_crossed))
{ {
i = find_free_reg (class, mode, qtyno, 1, 0, born_index, dead_index); i = find_free_reg (rclass, mode, qtyno, 1, 0, born_index, dead_index);
if (i >= 0) if (i >= 0)
caller_save_needed = 1; caller_save_needed = 1;
return i; return i;
......
...@@ -1571,14 +1571,14 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1571,14 +1571,14 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
enum optab_methods next_methods enum optab_methods next_methods
= (methods == OPTAB_LIB || methods == OPTAB_LIB_WIDEN = (methods == OPTAB_LIB || methods == OPTAB_LIB_WIDEN
? OPTAB_WIDEN : methods); ? OPTAB_WIDEN : methods);
enum mode_class class; enum mode_class mclass;
enum machine_mode wider_mode; enum machine_mode wider_mode;
rtx libfunc; rtx libfunc;
rtx temp; rtx temp;
rtx entry_last = get_last_insn (); rtx entry_last = get_last_insn ();
rtx last; rtx last;
class = GET_MODE_CLASS (mode); mclass = GET_MODE_CLASS (mode);
/* If subtracting an integer constant, convert this into an addition of /* If subtracting an integer constant, convert this into an addition of
the negated constant. */ the negated constant. */
...@@ -1609,7 +1609,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1609,7 +1609,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
&& optab_handler (rotr_optab, mode)->insn_code != CODE_FOR_nothing) && optab_handler (rotr_optab, mode)->insn_code != CODE_FOR_nothing)
|| (binoptab == rotr_optab || (binoptab == rotr_optab
&& optab_handler (rotl_optab, mode)->insn_code != CODE_FOR_nothing)) && optab_handler (rotl_optab, mode)->insn_code != CODE_FOR_nothing))
&& class == MODE_INT) && mclass == MODE_INT)
{ {
optab otheroptab = (binoptab == rotl_optab ? rotr_optab : rotl_optab); optab otheroptab = (binoptab == rotl_optab ? rotr_optab : rotl_optab);
rtx newop1; rtx newop1;
...@@ -1658,7 +1658,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1658,7 +1658,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
can open-code the operation. Check for a widening multiply at the can open-code the operation. Check for a widening multiply at the
wider mode as well. */ wider mode as well. */
if (CLASS_HAS_WIDER_MODES_P (class) if (CLASS_HAS_WIDER_MODES_P (mclass)
&& methods != OPTAB_DIRECT && methods != OPTAB_LIB) && methods != OPTAB_DIRECT && methods != OPTAB_LIB)
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode; wider_mode != VOIDmode;
...@@ -1683,7 +1683,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1683,7 +1683,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
|| binoptab == xor_optab || binoptab == xor_optab
|| binoptab == add_optab || binoptab == sub_optab || binoptab == add_optab || binoptab == sub_optab
|| binoptab == smul_optab || binoptab == ashl_optab) || binoptab == smul_optab || binoptab == ashl_optab)
&& class == MODE_INT) && mclass == MODE_INT)
{ {
no_extend = 1; no_extend = 1;
xop0 = avoid_expensive_constant (mode, binoptab, xop0 = avoid_expensive_constant (mode, binoptab,
...@@ -1703,7 +1703,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1703,7 +1703,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
unsignedp, OPTAB_DIRECT); unsignedp, OPTAB_DIRECT);
if (temp) if (temp)
{ {
if (class != MODE_INT if (mclass != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), || !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode))) GET_MODE_BITSIZE (wider_mode)))
{ {
...@@ -1734,7 +1734,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1734,7 +1734,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* These can be done a word at a time. */ /* These can be done a word at a time. */
if ((binoptab == and_optab || binoptab == ior_optab || binoptab == xor_optab) if ((binoptab == and_optab || binoptab == ior_optab || binoptab == xor_optab)
&& class == MODE_INT && mclass == MODE_INT
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD && GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing) && optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing)
{ {
...@@ -1785,7 +1785,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1785,7 +1785,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* Synthesize double word shifts from single word shifts. */ /* Synthesize double word shifts from single word shifts. */
if ((binoptab == lshr_optab || binoptab == ashl_optab if ((binoptab == lshr_optab || binoptab == ashl_optab
|| binoptab == ashr_optab) || binoptab == ashr_optab)
&& class == MODE_INT && mclass == MODE_INT
&& (GET_CODE (op1) == CONST_INT || !optimize_size) && (GET_CODE (op1) == CONST_INT || !optimize_size)
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing && optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing
...@@ -1855,7 +1855,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1855,7 +1855,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* Synthesize double word rotates from single word shifts. */ /* Synthesize double word rotates from single word shifts. */
if ((binoptab == rotl_optab || binoptab == rotr_optab) if ((binoptab == rotl_optab || binoptab == rotr_optab)
&& class == MODE_INT && mclass == MODE_INT
&& GET_CODE (op1) == CONST_INT && GET_CODE (op1) == CONST_INT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& optab_handler (ashl_optab, word_mode)->insn_code != CODE_FOR_nothing && optab_handler (ashl_optab, word_mode)->insn_code != CODE_FOR_nothing
...@@ -1968,7 +1968,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -1968,7 +1968,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* These can be done a word at a time by propagating carries. */ /* These can be done a word at a time by propagating carries. */
if ((binoptab == add_optab || binoptab == sub_optab) if ((binoptab == add_optab || binoptab == sub_optab)
&& class == MODE_INT && mclass == MODE_INT
&& GET_MODE_SIZE (mode) >= 2 * UNITS_PER_WORD && GET_MODE_SIZE (mode) >= 2 * UNITS_PER_WORD
&& optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing) && optab_handler (binoptab, word_mode)->insn_code != CODE_FOR_nothing)
{ {
...@@ -2094,7 +2094,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -2094,7 +2094,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
try using a signed widening multiply. */ try using a signed widening multiply. */
if (binoptab == smul_optab if (binoptab == smul_optab
&& class == MODE_INT && mclass == MODE_INT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD && GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& optab_handler (smul_optab, word_mode)->insn_code != CODE_FOR_nothing && optab_handler (smul_optab, word_mode)->insn_code != CODE_FOR_nothing
&& optab_handler (add_optab, word_mode)->insn_code != CODE_FOR_nothing) && optab_handler (add_optab, word_mode)->insn_code != CODE_FOR_nothing)
...@@ -2197,7 +2197,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -2197,7 +2197,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
/* Look for a wider mode of the same class for which it appears we can do /* Look for a wider mode of the same class for which it appears we can do
the operation. */ the operation. */
if (CLASS_HAS_WIDER_MODES_P (class)) if (CLASS_HAS_WIDER_MODES_P (mclass))
{ {
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode; wider_mode != VOIDmode;
...@@ -2219,7 +2219,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -2219,7 +2219,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
|| binoptab == xor_optab || binoptab == xor_optab
|| binoptab == add_optab || binoptab == sub_optab || binoptab == add_optab || binoptab == sub_optab
|| binoptab == smul_optab || binoptab == ashl_optab) || binoptab == smul_optab || binoptab == ashl_optab)
&& class == MODE_INT) && mclass == MODE_INT)
no_extend = 1; no_extend = 1;
xop0 = widen_operand (xop0, wider_mode, mode, xop0 = widen_operand (xop0, wider_mode, mode,
...@@ -2233,7 +2233,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, ...@@ -2233,7 +2233,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
unsignedp, methods); unsignedp, methods);
if (temp) if (temp)
{ {
if (class != MODE_INT if (mclass != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), || !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode))) GET_MODE_BITSIZE (wider_mode)))
{ {
...@@ -2327,12 +2327,12 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1, ...@@ -2327,12 +2327,12 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1,
int unsignedp) int unsignedp)
{ {
enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1); enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1);
enum mode_class class; enum mode_class mclass;
enum machine_mode wider_mode; enum machine_mode wider_mode;
rtx entry_last = get_last_insn (); rtx entry_last = get_last_insn ();
rtx last; rtx last;
class = GET_MODE_CLASS (mode); mclass = GET_MODE_CLASS (mode);
if (!targ0) if (!targ0)
targ0 = gen_reg_rtx (mode); targ0 = gen_reg_rtx (mode);
...@@ -2374,7 +2374,7 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1, ...@@ -2374,7 +2374,7 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1,
/* It can't be done in this mode. Can we do it in a wider mode? */ /* It can't be done in this mode. Can we do it in a wider mode? */
if (CLASS_HAS_WIDER_MODES_P (class)) if (CLASS_HAS_WIDER_MODES_P (mclass))
{ {
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode; wider_mode != VOIDmode;
...@@ -2420,12 +2420,12 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1, ...@@ -2420,12 +2420,12 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1,
int unsignedp) int unsignedp)
{ {
enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1); enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1);
enum mode_class class; enum mode_class mclass;
enum machine_mode wider_mode; enum machine_mode wider_mode;
rtx entry_last = get_last_insn (); rtx entry_last = get_last_insn ();
rtx last; rtx last;
class = GET_MODE_CLASS (mode); mclass = GET_MODE_CLASS (mode);
if (!targ0) if (!targ0)
targ0 = gen_reg_rtx (mode); targ0 = gen_reg_rtx (mode);
...@@ -2491,7 +2491,7 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1, ...@@ -2491,7 +2491,7 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1,
/* It can't be done in this mode. Can we do it in a wider mode? */ /* It can't be done in this mode. Can we do it in a wider mode? */
if (CLASS_HAS_WIDER_MODES_P (class)) if (CLASS_HAS_WIDER_MODES_P (mclass))
{ {
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode; wider_mode != VOIDmode;
...@@ -2591,8 +2591,8 @@ expand_simple_unop (enum machine_mode mode, enum rtx_code code, rtx op0, ...@@ -2591,8 +2591,8 @@ expand_simple_unop (enum machine_mode mode, enum rtx_code code, rtx op0,
static rtx static rtx
widen_clz (enum machine_mode mode, rtx op0, rtx target) widen_clz (enum machine_mode mode, rtx op0, rtx target)
{ {
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class mclass = GET_MODE_CLASS (mode);
if (CLASS_HAS_WIDER_MODES_P (class)) if (CLASS_HAS_WIDER_MODES_P (mclass))
{ {
enum machine_mode wider_mode; enum machine_mode wider_mode;
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
...@@ -2702,11 +2702,11 @@ expand_doubleword_clz (enum machine_mode mode, rtx op0, rtx target) ...@@ -2702,11 +2702,11 @@ expand_doubleword_clz (enum machine_mode mode, rtx op0, rtx target)
static rtx static rtx
widen_bswap (enum machine_mode mode, rtx op0, rtx target) widen_bswap (enum machine_mode mode, rtx op0, rtx target)
{ {
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class mclass = GET_MODE_CLASS (mode);
enum machine_mode wider_mode; enum machine_mode wider_mode;
rtx x, last; rtx x, last;
if (!CLASS_HAS_WIDER_MODES_P (class)) if (!CLASS_HAS_WIDER_MODES_P (mclass))
return NULL_RTX; return NULL_RTX;
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
...@@ -2767,8 +2767,8 @@ expand_doubleword_bswap (enum machine_mode mode, rtx op, rtx target) ...@@ -2767,8 +2767,8 @@ expand_doubleword_bswap (enum machine_mode mode, rtx op, rtx target)
static rtx static rtx
expand_parity (enum machine_mode mode, rtx op0, rtx target) expand_parity (enum machine_mode mode, rtx op0, rtx target)
{ {
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class mclass = GET_MODE_CLASS (mode);
if (CLASS_HAS_WIDER_MODES_P (class)) if (CLASS_HAS_WIDER_MODES_P (mclass))
{ {
enum machine_mode wider_mode; enum machine_mode wider_mode;
for (wider_mode = mode; wider_mode != VOIDmode; for (wider_mode = mode; wider_mode != VOIDmode;
...@@ -3116,7 +3116,7 @@ rtx ...@@ -3116,7 +3116,7 @@ rtx
expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
int unsignedp) int unsignedp)
{ {
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class mclass = GET_MODE_CLASS (mode);
enum machine_mode wider_mode; enum machine_mode wider_mode;
rtx temp; rtx temp;
rtx libfunc; rtx libfunc;
...@@ -3163,7 +3163,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, ...@@ -3163,7 +3163,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
goto try_libcall; goto try_libcall;
} }
if (CLASS_HAS_WIDER_MODES_P (class)) if (CLASS_HAS_WIDER_MODES_P (mclass))
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode; wider_mode != VOIDmode;
wider_mode = GET_MODE_WIDER_MODE (wider_mode)) wider_mode = GET_MODE_WIDER_MODE (wider_mode))
...@@ -3180,14 +3180,14 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, ...@@ -3180,14 +3180,14 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
xop0 = widen_operand (xop0, wider_mode, mode, unsignedp, xop0 = widen_operand (xop0, wider_mode, mode, unsignedp,
(unoptab == neg_optab (unoptab == neg_optab
|| unoptab == one_cmpl_optab) || unoptab == one_cmpl_optab)
&& class == MODE_INT); && mclass == MODE_INT);
temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX, temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX,
unsignedp); unsignedp);
if (temp) if (temp)
{ {
if (class != MODE_INT if (mclass != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), || !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode))) GET_MODE_BITSIZE (wider_mode)))
{ {
...@@ -3206,7 +3206,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, ...@@ -3206,7 +3206,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
/* These can be done a word at a time. */ /* These can be done a word at a time. */
if (unoptab == one_cmpl_optab if (unoptab == one_cmpl_optab
&& class == MODE_INT && mclass == MODE_INT
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD && GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& optab_handler (unoptab, word_mode)->insn_code != CODE_FOR_nothing) && optab_handler (unoptab, word_mode)->insn_code != CODE_FOR_nothing)
{ {
...@@ -3323,7 +3323,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, ...@@ -3323,7 +3323,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
/* It can't be done in this mode. Can we do it in a wider mode? */ /* It can't be done in this mode. Can we do it in a wider mode? */
if (CLASS_HAS_WIDER_MODES_P (class)) if (CLASS_HAS_WIDER_MODES_P (mclass))
{ {
for (wider_mode = GET_MODE_WIDER_MODE (mode); for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode; wider_mode != VOIDmode;
...@@ -3343,7 +3343,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, ...@@ -3343,7 +3343,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
xop0 = widen_operand (xop0, wider_mode, mode, unsignedp, xop0 = widen_operand (xop0, wider_mode, mode, unsignedp,
(unoptab == neg_optab (unoptab == neg_optab
|| unoptab == one_cmpl_optab) || unoptab == one_cmpl_optab)
&& class == MODE_INT); && mclass == MODE_INT);
temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX, temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX,
unsignedp); unsignedp);
...@@ -3358,7 +3358,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, ...@@ -3358,7 +3358,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
if (temp) if (temp)
{ {
if (class != MODE_INT) if (mclass != MODE_INT)
{ {
if (target == 0) if (target == 0)
target = gen_reg_rtx (mode); target = gen_reg_rtx (mode);
...@@ -4191,7 +4191,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode, ...@@ -4191,7 +4191,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
enum rtx_code comparison, int unsignedp, rtx label) enum rtx_code comparison, int unsignedp, rtx label)
{ {
rtx test = gen_rtx_fmt_ee (comparison, mode, x, y); rtx test = gen_rtx_fmt_ee (comparison, mode, x, y);
enum mode_class class = GET_MODE_CLASS (mode); enum mode_class mclass = GET_MODE_CLASS (mode);
enum machine_mode wider_mode = mode; enum machine_mode wider_mode = mode;
/* Try combined insns first. */ /* Try combined insns first. */
...@@ -4238,7 +4238,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode, ...@@ -4238,7 +4238,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
return; return;
} }
if (!CLASS_HAS_WIDER_MODES_P (class)) if (!CLASS_HAS_WIDER_MODES_P (mclass))
break; break;
wider_mode = GET_MODE_WIDER_MODE (wider_mode); wider_mode = GET_MODE_WIDER_MODE (wider_mode);
......
...@@ -518,7 +518,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) ...@@ -518,7 +518,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{ {
int class = (int) NO_REGS; int rclass = (int) NO_REGS;
if (! TEST_HARD_REG_BIT (equiv_regs[i], regno)) if (! TEST_HARD_REG_BIT (equiv_regs[i], regno))
continue; continue;
...@@ -552,13 +552,13 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) ...@@ -552,13 +552,13 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
break; break;
case 'g': case 'r': case 'g': case 'r':
class = reg_class_subunion[(int) class][(int) GENERAL_REGS]; rclass = reg_class_subunion[(int) rclass][(int) GENERAL_REGS];
break; break;
default: default:
class rclass
= (reg_class_subunion = (reg_class_subunion
[(int) class] [(int) rclass]
[(int) REG_CLASS_FROM_CONSTRAINT ((unsigned char) c, p)]); [(int) REG_CLASS_FROM_CONSTRAINT ((unsigned char) c, p)]);
break; break;
...@@ -568,7 +568,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) ...@@ -568,7 +568,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
alternative yet and the operand being replaced is not alternative yet and the operand being replaced is not
a cheap CONST_INT. */ a cheap CONST_INT. */
if (op_alt_regno[i][j] == -1 if (op_alt_regno[i][j] == -1
&& reg_fits_class_p (testreg, class, 0, mode) && reg_fits_class_p (testreg, rclass, 0, mode)
&& (GET_CODE (recog_data.operand[i]) != CONST_INT && (GET_CODE (recog_data.operand[i]) != CONST_INT
|| (rtx_cost (recog_data.operand[i], SET) || (rtx_cost (recog_data.operand[i], SET)
> rtx_cost (testreg, SET)))) > rtx_cost (testreg, SET))))
...@@ -577,7 +577,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) ...@@ -577,7 +577,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
op_alt_regno[i][j] = regno; op_alt_regno[i][j] = regno;
} }
j++; j++;
class = (int) NO_REGS; rclass = (int) NO_REGS;
break; break;
} }
p += CONSTRAINT_LEN (c, p); p += CONSTRAINT_LEN (c, p);
......
...@@ -144,10 +144,10 @@ add_neighbor (int alloc_no, int neighbor) ...@@ -144,10 +144,10 @@ add_neighbor (int alloc_no, int neighbor)
if (adjlist == NULL || adjlist->index == ADJACENCY_VEC_LENGTH) if (adjlist == NULL || adjlist->index == ADJACENCY_VEC_LENGTH)
{ {
adjacency_t *new = (adjacency_t *) pool_alloc (adjacency_pool); adjacency_t *new_adj = (adjacency_t *) pool_alloc (adjacency_pool);
new->index = 0; new_adj->index = 0;
new->next = adjlist; new_adj->next = adjlist;
adjlist = new; adjlist = new_adj;
adjacency[alloc_no] = adjlist; adjacency[alloc_no] = adjlist;
} }
......
...@@ -713,18 +713,18 @@ replace_reg (rtx *reg, int regno) ...@@ -713,18 +713,18 @@ replace_reg (rtx *reg, int regno)
static void static void
remove_regno_note (rtx insn, enum reg_note note, unsigned int regno) remove_regno_note (rtx insn, enum reg_note note, unsigned int regno)
{ {
rtx *note_link, this; rtx *note_link, this_rtx;
note_link = &REG_NOTES (insn); note_link = &REG_NOTES (insn);
for (this = *note_link; this; this = XEXP (this, 1)) for (this_rtx = *note_link; this_rtx; this_rtx = XEXP (this_rtx, 1))
if (REG_NOTE_KIND (this) == note if (REG_NOTE_KIND (this_rtx) == note
&& REG_P (XEXP (this, 0)) && REGNO (XEXP (this, 0)) == regno) && REG_P (XEXP (this_rtx, 0)) && REGNO (XEXP (this_rtx, 0)) == regno)
{ {
*note_link = XEXP (this, 1); *note_link = XEXP (this_rtx, 1);
return; return;
} }
else else
note_link = &XEXP (this, 1); note_link = &XEXP (this_rtx, 1);
gcc_unreachable (); gcc_unreachable ();
} }
...@@ -2355,7 +2355,7 @@ subst_stack_regs (rtx insn, stack regstack) ...@@ -2355,7 +2355,7 @@ subst_stack_regs (rtx insn, stack regstack)
is no longer needed once this has executed. */ is no longer needed once this has executed. */
static void static void
change_stack (rtx insn, stack old, stack new, enum emit_where where) change_stack (rtx insn, stack old, stack new_stack, enum emit_where where)
{ {
int reg; int reg;
int update_end = 0; int update_end = 0;
...@@ -2368,9 +2368,9 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2368,9 +2368,9 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
&& starting_stack_p && starting_stack_p
&& where == EMIT_BEFORE) && where == EMIT_BEFORE)
{ {
BLOCK_INFO (current_block)->stack_in = *new; BLOCK_INFO (current_block)->stack_in = *new_stack;
starting_stack_p = false; starting_stack_p = false;
*old = *new; *old = *new_stack;
return; return;
} }
...@@ -2386,7 +2386,7 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2386,7 +2386,7 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* Initialize partially dead variables. */ /* Initialize partially dead variables. */
for (i = FIRST_STACK_REG; i < LAST_STACK_REG + 1; i++) for (i = FIRST_STACK_REG; i < LAST_STACK_REG + 1; i++)
if (TEST_HARD_REG_BIT (new->reg_set, i) if (TEST_HARD_REG_BIT (new_stack->reg_set, i)
&& !TEST_HARD_REG_BIT (old->reg_set, i)) && !TEST_HARD_REG_BIT (old->reg_set, i))
{ {
old->reg[++old->top] = i; old->reg[++old->top] = i;
...@@ -2400,28 +2400,28 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2400,28 +2400,28 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* If the destination block's stack already has a specified layout /* If the destination block's stack already has a specified layout
and contains two or more registers, use a more intelligent algorithm and contains two or more registers, use a more intelligent algorithm
to pop registers that minimizes the number number of fxchs below. */ to pop registers that minimizes the number number of fxchs below. */
if (new->top > 0) if (new_stack->top > 0)
{ {
bool slots[REG_STACK_SIZE]; bool slots[REG_STACK_SIZE];
int pops[REG_STACK_SIZE]; int pops[REG_STACK_SIZE];
int next, dest, topsrc; int next, dest, topsrc;
/* First pass to determine the free slots. */ /* First pass to determine the free slots. */
for (reg = 0; reg <= new->top; reg++) for (reg = 0; reg <= new_stack->top; reg++)
slots[reg] = TEST_HARD_REG_BIT (new->reg_set, old->reg[reg]); slots[reg] = TEST_HARD_REG_BIT (new_stack->reg_set, old->reg[reg]);
/* Second pass to allocate preferred slots. */ /* Second pass to allocate preferred slots. */
topsrc = -1; topsrc = -1;
for (reg = old->top; reg > new->top; reg--) for (reg = old->top; reg > new_stack->top; reg--)
if (TEST_HARD_REG_BIT (new->reg_set, old->reg[reg])) if (TEST_HARD_REG_BIT (new_stack->reg_set, old->reg[reg]))
{ {
dest = -1; dest = -1;
for (next = 0; next <= new->top; next++) for (next = 0; next <= new_stack->top; next++)
if (!slots[next] && new->reg[next] == old->reg[reg]) if (!slots[next] && new_stack->reg[next] == old->reg[reg])
{ {
/* If this is a preference for the new top of stack, record /* If this is a preference for the new top of stack, record
the fact by remembering it's old->reg in topsrc. */ the fact by remembering it's old->reg in topsrc. */
if (next == new->top) if (next == new_stack->top)
topsrc = reg; topsrc = reg;
slots[next] = true; slots[next] = true;
dest = next; dest = next;
...@@ -2438,18 +2438,18 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2438,18 +2438,18 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
slot is still unallocated, in which case we should place the slot is still unallocated, in which case we should place the
top of stack there. */ top of stack there. */
if (topsrc != -1) if (topsrc != -1)
for (reg = 0; reg < new->top; reg++) for (reg = 0; reg < new_stack->top; reg++)
if (!slots[reg]) if (!slots[reg])
{ {
pops[topsrc] = reg; pops[topsrc] = reg;
slots[new->top] = false; slots[new_stack->top] = false;
slots[reg] = true; slots[reg] = true;
break; break;
} }
/* Third pass allocates remaining slots and emits pop insns. */ /* Third pass allocates remaining slots and emits pop insns. */
next = new->top; next = new_stack->top;
for (reg = old->top; reg > new->top; reg--) for (reg = old->top; reg > new_stack->top; reg--)
{ {
dest = pops[reg]; dest = pops[reg];
if (dest == -1) if (dest == -1)
...@@ -2472,14 +2472,14 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2472,14 +2472,14 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
live = 0; live = 0;
for (reg = 0; reg <= old->top; reg++) for (reg = 0; reg <= old->top; reg++)
if (TEST_HARD_REG_BIT (new->reg_set, old->reg[reg])) if (TEST_HARD_REG_BIT (new_stack->reg_set, old->reg[reg]))
live++; live++;
next = live; next = live;
while (old->top >= live) while (old->top >= live)
if (TEST_HARD_REG_BIT (new->reg_set, old->reg[old->top])) if (TEST_HARD_REG_BIT (new_stack->reg_set, old->reg[old->top]))
{ {
while (TEST_HARD_REG_BIT (new->reg_set, old->reg[next])) while (TEST_HARD_REG_BIT (new_stack->reg_set, old->reg[next]))
next--; next--;
emit_pop_insn (insn, old, FP_MODE_REG (old->reg[next], DFmode), emit_pop_insn (insn, old, FP_MODE_REG (old->reg[next], DFmode),
EMIT_BEFORE); EMIT_BEFORE);
...@@ -2489,13 +2489,13 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2489,13 +2489,13 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
EMIT_BEFORE); EMIT_BEFORE);
} }
if (new->top == -2) if (new_stack->top == -2)
{ {
/* If the new block has never been processed, then it can inherit /* If the new block has never been processed, then it can inherit
the old stack order. */ the old stack order. */
new->top = old->top; new_stack->top = old->top;
memcpy (new->reg, old->reg, sizeof (new->reg)); memcpy (new_stack->reg, old->reg, sizeof (new_stack->reg));
} }
else else
{ {
...@@ -2505,10 +2505,10 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2505,10 +2505,10 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* By now, the only difference should be the order of the stack, /* By now, the only difference should be the order of the stack,
not their depth or liveliness. */ not their depth or liveliness. */
gcc_assert (hard_reg_set_equal_p (old->reg_set, new->reg_set)); gcc_assert (hard_reg_set_equal_p (old->reg_set, new_stack->reg_set));
gcc_assert (old->top == new->top); gcc_assert (old->top == new_stack->top);
/* If the stack is not empty (new->top != -1), loop here emitting /* If the stack is not empty (new_stack->top != -1), loop here emitting
swaps until the stack is correct. swaps until the stack is correct.
The worst case number of swaps emitted is N + 2, where N is the The worst case number of swaps emitted is N + 2, where N is the
...@@ -2517,16 +2517,16 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2517,16 +2517,16 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
other regs. But since we never swap any other reg away from other regs. But since we never swap any other reg away from
its correct slot, this algorithm will converge. */ its correct slot, this algorithm will converge. */
if (new->top != -1) if (new_stack->top != -1)
do do
{ {
/* Swap the reg at top of stack into the position it is /* Swap the reg at top of stack into the position it is
supposed to be in, until the correct top of stack appears. */ supposed to be in, until the correct top of stack appears. */
while (old->reg[old->top] != new->reg[new->top]) while (old->reg[old->top] != new_stack->reg[new_stack->top])
{ {
for (reg = new->top; reg >= 0; reg--) for (reg = new_stack->top; reg >= 0; reg--)
if (new->reg[reg] == old->reg[old->top]) if (new_stack->reg[reg] == old->reg[old->top])
break; break;
gcc_assert (reg != -1); gcc_assert (reg != -1);
...@@ -2539,8 +2539,8 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2539,8 +2539,8 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
incorrect reg to the top of stack, and let the while loop incorrect reg to the top of stack, and let the while loop
above fix it. */ above fix it. */
for (reg = new->top; reg >= 0; reg--) for (reg = new_stack->top; reg >= 0; reg--)
if (new->reg[reg] != old->reg[reg]) if (new_stack->reg[reg] != old->reg[reg])
{ {
emit_swap_insn (insn, old, emit_swap_insn (insn, old,
FP_MODE_REG (old->reg[reg], DFmode)); FP_MODE_REG (old->reg[reg], DFmode));
...@@ -2551,7 +2551,7 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where) ...@@ -2551,7 +2551,7 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* At this point there must be no differences. */ /* At this point there must be no differences. */
for (reg = old->top; reg >= 0; reg--) for (reg = old->top; reg >= 0; reg--)
gcc_assert (old->reg[reg] == new->reg[reg]); gcc_assert (old->reg[reg] == new_stack->reg[reg]);
} }
if (update_end) if (update_end)
......
...@@ -738,7 +738,7 @@ init_fake_stack_mems (void) ...@@ -738,7 +738,7 @@ init_fake_stack_mems (void)
Only needed if secondary reloads are required for memory moves. */ Only needed if secondary reloads are required for memory moves. */
int int
memory_move_secondary_cost (enum machine_mode mode, enum reg_class class, int in) memory_move_secondary_cost (enum machine_mode mode, enum reg_class rclass, int in)
{ {
enum reg_class altclass; enum reg_class altclass;
int partial_cost = 0; int partial_cost = 0;
...@@ -747,17 +747,17 @@ memory_move_secondary_cost (enum machine_mode mode, enum reg_class class, int in ...@@ -747,17 +747,17 @@ memory_move_secondary_cost (enum machine_mode mode, enum reg_class class, int in
rtx mem ATTRIBUTE_UNUSED = top_of_stack[(int) mode]; rtx mem ATTRIBUTE_UNUSED = top_of_stack[(int) mode];
altclass = secondary_reload_class (in ? 1 : 0, class, mode, mem); altclass = secondary_reload_class (in ? 1 : 0, rclass, mode, mem);
if (altclass == NO_REGS) if (altclass == NO_REGS)
return 0; return 0;
if (in) if (in)
partial_cost = REGISTER_MOVE_COST (mode, altclass, class); partial_cost = REGISTER_MOVE_COST (mode, altclass, rclass);
else else
partial_cost = REGISTER_MOVE_COST (mode, class, altclass); partial_cost = REGISTER_MOVE_COST (mode, rclass, altclass);
if (class == altclass) if (rclass == altclass)
/* This isn't simply a copy-to-temporary situation. Can't guess /* This isn't simply a copy-to-temporary situation. Can't guess
what it is, so MEMORY_MOVE_COST really ought not to be calling what it is, so MEMORY_MOVE_COST really ought not to be calling
here in that case. here in that case.
...@@ -1087,23 +1087,23 @@ dump_regclass (FILE *dump) ...@@ -1087,23 +1087,23 @@ dump_regclass (FILE *dump)
int i; int i;
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++) for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
{ {
int /* enum reg_class */ class; int /* enum reg_class */ rclass;
if (REG_N_REFS (i)) if (REG_N_REFS (i))
{ {
fprintf (dump, " Register %i costs:", i); fprintf (dump, " Register %i costs:", i);
for (class = 0; class < (int) N_REG_CLASSES; class++) for (rclass = 0; rclass < (int) N_REG_CLASSES; rclass++)
if (contains_reg_of_mode [(enum reg_class) class][PSEUDO_REGNO_MODE (i)] if (contains_reg_of_mode [(enum reg_class) rclass][PSEUDO_REGNO_MODE (i)]
#ifdef FORBIDDEN_INC_DEC_CLASSES #ifdef FORBIDDEN_INC_DEC_CLASSES
&& (!in_inc_dec[i] && (!in_inc_dec[i]
|| !forbidden_inc_dec_class[(enum reg_class) class]) || !forbidden_inc_dec_class[(enum reg_class) rclass])
#endif #endif
#ifdef CANNOT_CHANGE_MODE_CLASS #ifdef CANNOT_CHANGE_MODE_CLASS
&& ! invalid_mode_change_p (i, (enum reg_class) class, && ! invalid_mode_change_p (i, (enum reg_class) rclass,
PSEUDO_REGNO_MODE (i)) PSEUDO_REGNO_MODE (i))
#endif #endif
) )
fprintf (dump, " %s:%i", reg_class_names[class], fprintf (dump, " %s:%i", reg_class_names[rclass],
costs[i].cost[(enum reg_class) class]); costs[i].cost[(enum reg_class) rclass]);
fprintf (dump, " MEM:%i\n", costs[i].mem_cost); fprintf (dump, " MEM:%i\n", costs[i].mem_cost);
} }
} }
...@@ -1382,7 +1382,7 @@ regclass (rtx f, int nregs) ...@@ -1382,7 +1382,7 @@ regclass (rtx f, int nregs)
enum reg_class best = ALL_REGS, alt = NO_REGS; enum reg_class best = ALL_REGS, alt = NO_REGS;
/* This is an enum reg_class, but we call it an int /* This is an enum reg_class, but we call it an int
to save lots of casts. */ to save lots of casts. */
int class; int rclass;
struct costs *p = &costs[i]; struct costs *p = &costs[i];
if (regno_reg_rtx[i] == NULL) if (regno_reg_rtx[i] == NULL)
...@@ -1393,27 +1393,27 @@ regclass (rtx f, int nregs) ...@@ -1393,27 +1393,27 @@ regclass (rtx f, int nregs)
if (optimize && !REG_N_REFS (i) && !REG_N_SETS (i)) if (optimize && !REG_N_REFS (i) && !REG_N_SETS (i))
continue; continue;
for (class = (int) ALL_REGS - 1; class > 0; class--) for (rclass = (int) ALL_REGS - 1; rclass > 0; rclass--)
{ {
/* Ignore classes that are too small for this operand or /* Ignore classes that are too small for this operand or
invalid for an operand that was auto-incremented. */ invalid for an operand that was auto-incremented. */
if (!contains_reg_of_mode [class][PSEUDO_REGNO_MODE (i)] if (!contains_reg_of_mode [rclass][PSEUDO_REGNO_MODE (i)]
#ifdef FORBIDDEN_INC_DEC_CLASSES #ifdef FORBIDDEN_INC_DEC_CLASSES
|| (in_inc_dec[i] && forbidden_inc_dec_class[class]) || (in_inc_dec[i] && forbidden_inc_dec_class[rclass])
#endif #endif
#ifdef CANNOT_CHANGE_MODE_CLASS #ifdef CANNOT_CHANGE_MODE_CLASS
|| invalid_mode_change_p (i, (enum reg_class) class, || invalid_mode_change_p (i, (enum reg_class) rclass,
PSEUDO_REGNO_MODE (i)) PSEUDO_REGNO_MODE (i))
#endif #endif
) )
; ;
else if (p->cost[class] < best_cost) else if (p->cost[rclass] < best_cost)
{ {
best_cost = p->cost[class]; best_cost = p->cost[rclass];
best = (enum reg_class) class; best = (enum reg_class) rclass;
} }
else if (p->cost[class] == best_cost) else if (p->cost[rclass] == best_cost)
best = reg_class_subunion[(int) best][class]; best = reg_class_subunion[(int) best][rclass];
} }
/* If no register class is better than memory, use memory. */ /* If no register class is better than memory, use memory. */
...@@ -1428,19 +1428,19 @@ regclass (rtx f, int nregs) ...@@ -1428,19 +1428,19 @@ regclass (rtx f, int nregs)
will be doing it again later. */ will be doing it again later. */
if ((pass == 1 || dump_file) || ! flag_expensive_optimizations) if ((pass == 1 || dump_file) || ! flag_expensive_optimizations)
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
if (p->cost[class] < p->mem_cost if (p->cost[rclass] < p->mem_cost
&& (reg_class_size[(int) reg_class_subunion[(int) alt][class]] && (reg_class_size[(int) reg_class_subunion[(int) alt][rclass]]
> reg_class_size[(int) alt]) > reg_class_size[(int) alt])
#ifdef FORBIDDEN_INC_DEC_CLASSES #ifdef FORBIDDEN_INC_DEC_CLASSES
&& ! (in_inc_dec[i] && forbidden_inc_dec_class[class]) && ! (in_inc_dec[i] && forbidden_inc_dec_class[rclass])
#endif #endif
#ifdef CANNOT_CHANGE_MODE_CLASS #ifdef CANNOT_CHANGE_MODE_CLASS
&& ! invalid_mode_change_p (i, (enum reg_class) class, && ! invalid_mode_change_p (i, (enum reg_class) rclass,
PSEUDO_REGNO_MODE (i)) PSEUDO_REGNO_MODE (i))
#endif #endif
) )
alt = reg_class_subunion[(int) alt][class]; alt = reg_class_subunion[(int) alt][rclass];
/* If we don't add any classes, nothing to try. */ /* If we don't add any classes, nothing to try. */
if (alt == best) if (alt == best)
...@@ -1517,7 +1517,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, ...@@ -1517,7 +1517,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
int alt_cost = 0; int alt_cost = 0;
enum reg_class classes[MAX_RECOG_OPERANDS]; enum reg_class classes[MAX_RECOG_OPERANDS];
int allows_mem[MAX_RECOG_OPERANDS]; int allows_mem[MAX_RECOG_OPERANDS];
int class; int rclass;
for (i = 0; i < n_ops; i++) for (i = 0; i < n_ops; i++)
{ {
...@@ -1617,17 +1617,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, ...@@ -1617,17 +1617,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
switch (recog_data.operand_type[i]) switch (recog_data.operand_type[i])
{ {
case OP_INOUT: case OP_INOUT:
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[class] = (intable[class][op_class] pp->cost[rclass] = (intable[rclass][op_class]
+ outtable[op_class][class]); + outtable[op_class][rclass]);
break; break;
case OP_IN: case OP_IN:
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[class] = intable[class][op_class]; pp->cost[rclass] = intable[rclass][op_class];
break; break;
case OP_OUT: case OP_OUT:
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[class] = outtable[op_class][class]; pp->cost[rclass] = outtable[op_class][rclass];
break; break;
} }
...@@ -1861,17 +1861,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, ...@@ -1861,17 +1861,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
switch (recog_data.operand_type[i]) switch (recog_data.operand_type[i])
{ {
case OP_INOUT: case OP_INOUT:
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[class] = (intable[class][op_class] pp->cost[rclass] = (intable[rclass][op_class]
+ outtable[op_class][class]); + outtable[op_class][rclass]);
break; break;
case OP_IN: case OP_IN:
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[class] = intable[class][op_class]; pp->cost[rclass] = intable[rclass][op_class];
break; break;
case OP_OUT: case OP_OUT:
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[class] = outtable[op_class][class]; pp->cost[rclass] = outtable[op_class][rclass];
break; break;
} }
...@@ -1949,9 +1949,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, ...@@ -1949,9 +1949,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
pp->mem_cost = MIN (pp->mem_cost, pp->mem_cost = MIN (pp->mem_cost,
(qq->mem_cost + alt_cost) * scale); (qq->mem_cost + alt_cost) * scale);
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[class] = MIN (pp->cost[class], pp->cost[rclass] = MIN (pp->cost[rclass],
(qq->cost[class] + alt_cost) * scale); (qq->cost[rclass] + alt_cost) * scale);
} }
} }
...@@ -1978,7 +1978,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, ...@@ -1978,7 +1978,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
{ {
unsigned int regno = REGNO (ops[!i]); unsigned int regno = REGNO (ops[!i]);
enum machine_mode mode = GET_MODE (ops[!i]); enum machine_mode mode = GET_MODE (ops[!i]);
int class; int rclass;
if (regno >= FIRST_PSEUDO_REGISTER && reg_pref != 0 if (regno >= FIRST_PSEUDO_REGISTER && reg_pref != 0
&& reg_pref[regno].prefclass != NO_REGS) && reg_pref[regno].prefclass != NO_REGS)
...@@ -1991,15 +1991,15 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, ...@@ -1991,15 +1991,15 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
op_costs[i].cost[(unsigned char) pref] = -1; op_costs[i].cost[(unsigned char) pref] = -1;
} }
else if (regno < FIRST_PSEUDO_REGISTER) else if (regno < FIRST_PSEUDO_REGISTER)
for (class = 0; class < N_REG_CLASSES; class++) for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
if (TEST_HARD_REG_BIT (reg_class_contents[class], regno) if (TEST_HARD_REG_BIT (reg_class_contents[rclass], regno)
&& reg_class_size[class] == (unsigned) CLASS_MAX_NREGS (class, mode)) && reg_class_size[rclass] == (unsigned) CLASS_MAX_NREGS (rclass, mode))
{ {
if (reg_class_size[class] == 1) if (reg_class_size[rclass] == 1)
op_costs[i].cost[class] = -1; op_costs[i].cost[rclass] = -1;
else if (in_hard_reg_set_p (reg_class_contents[class], else if (in_hard_reg_set_p (reg_class_contents[rclass],
mode, regno)) mode, regno))
op_costs[i].cost[class] = -1; op_costs[i].cost[rclass] = -1;
} }
} }
} }
...@@ -2010,7 +2010,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops, ...@@ -2010,7 +2010,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
X must not be a pseudo. */ X must not be a pseudo. */
static int static int
copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p, copy_cost (rtx x, enum machine_mode mode, enum reg_class rclass, int to_p,
secondary_reload_info *prev_sri) secondary_reload_info *prev_sri)
{ {
enum reg_class secondary_class = NO_REGS; enum reg_class secondary_class = NO_REGS;
...@@ -2023,7 +2023,7 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p, ...@@ -2023,7 +2023,7 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
return 0; return 0;
/* Get the class we will actually use for a reload. */ /* Get the class we will actually use for a reload. */
class = PREFERRED_RELOAD_CLASS (x, class); rclass = PREFERRED_RELOAD_CLASS (x, rclass);
/* If we need a secondary reload for an intermediate, the /* If we need a secondary reload for an intermediate, the
cost is that to load the input into the intermediate register, then cost is that to load the input into the intermediate register, then
...@@ -2031,13 +2031,13 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p, ...@@ -2031,13 +2031,13 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
sri.prev_sri = prev_sri; sri.prev_sri = prev_sri;
sri.extra_cost = 0; sri.extra_cost = 0;
secondary_class = targetm.secondary_reload (to_p, x, class, mode, &sri); secondary_class = targetm.secondary_reload (to_p, x, rclass, mode, &sri);
if (!move_cost[mode]) if (!move_cost[mode])
init_move_cost (mode); init_move_cost (mode);
if (secondary_class != NO_REGS) if (secondary_class != NO_REGS)
return (move_cost[mode][(int) secondary_class][(int) class] return (move_cost[mode][(int) secondary_class][(int) rclass]
+ sri.extra_cost + sri.extra_cost
+ copy_cost (x, mode, secondary_class, to_p, &sri)); + copy_cost (x, mode, secondary_class, to_p, &sri));
...@@ -2045,12 +2045,12 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p, ...@@ -2045,12 +2045,12 @@ copy_cost (rtx x, enum machine_mode mode, enum reg_class class, int to_p,
cost to move between the register classes, and use 2 for everything cost to move between the register classes, and use 2 for everything
else (constants). */ else (constants). */
if (MEM_P (x) || class == NO_REGS) if (MEM_P (x) || rclass == NO_REGS)
return sri.extra_cost + MEMORY_MOVE_COST (mode, class, to_p); return sri.extra_cost + MEMORY_MOVE_COST (mode, rclass, to_p);
else if (REG_P (x)) else if (REG_P (x))
return (sri.extra_cost return (sri.extra_cost
+ move_cost[mode][(int) REGNO_REG_CLASS (REGNO (x))][(int) class]); + move_cost[mode][(int) REGNO_REG_CLASS (REGNO (x))][(int) rclass]);
else else
/* If this is a constant, we may eventually want to call rtx_cost here. */ /* If this is a constant, we may eventually want to call rtx_cost here. */
...@@ -2076,12 +2076,12 @@ record_address_regs (enum machine_mode mode, rtx x, int context, ...@@ -2076,12 +2076,12 @@ record_address_regs (enum machine_mode mode, rtx x, int context,
int scale) int scale)
{ {
enum rtx_code code = GET_CODE (x); enum rtx_code code = GET_CODE (x);
enum reg_class class; enum reg_class rclass;
if (context == 1) if (context == 1)
class = INDEX_REG_CLASS; rclass = INDEX_REG_CLASS;
else else
class = base_reg_class (mode, outer_code, index_code); rclass = base_reg_class (mode, outer_code, index_code);
switch (code) switch (code)
{ {
...@@ -2234,12 +2234,12 @@ record_address_regs (enum machine_mode mode, rtx x, int context, ...@@ -2234,12 +2234,12 @@ record_address_regs (enum machine_mode mode, rtx x, int context,
struct costs *pp = &costs[REGNO (x)]; struct costs *pp = &costs[REGNO (x)];
int i; int i;
pp->mem_cost += (MEMORY_MOVE_COST (Pmode, class, 1) * scale) / 2; pp->mem_cost += (MEMORY_MOVE_COST (Pmode, rclass, 1) * scale) / 2;
if (!move_cost[Pmode]) if (!move_cost[Pmode])
init_move_cost (Pmode); init_move_cost (Pmode);
for (i = 0; i < N_REG_CLASSES; i++) for (i = 0; i < N_REG_CLASSES; i++)
pp->cost[i] += (may_move_in_cost[Pmode][i][(int) class] * scale) / 2; pp->cost[i] += (may_move_in_cost[Pmode][i][(int) rclass] * scale) / 2;
} }
break; break;
...@@ -2627,7 +2627,7 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from, ...@@ -2627,7 +2627,7 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
bool bool
invalid_mode_change_p (unsigned int regno, invalid_mode_change_p (unsigned int regno,
enum reg_class class ATTRIBUTE_UNUSED, enum reg_class rclass ATTRIBUTE_UNUSED,
enum machine_mode from) enum machine_mode from)
{ {
struct subregs_of_mode_node dummy, *node; struct subregs_of_mode_node dummy, *node;
...@@ -2644,7 +2644,7 @@ invalid_mode_change_p (unsigned int regno, ...@@ -2644,7 +2644,7 @@ invalid_mode_change_p (unsigned int regno,
mask = 1 << (regno & 7); mask = 1 << (regno & 7);
for (to = VOIDmode; to < NUM_MACHINE_MODES; to++) for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
if (node->modes[to] & mask) if (node->modes[to] & mask)
if (CANNOT_CHANGE_MODE_CLASS (from, to, class)) if (CANNOT_CHANGE_MODE_CLASS (from, to, rclass))
return true; return true;
return false; return false;
......
...@@ -222,13 +222,13 @@ regrename_optimize (void) ...@@ -222,13 +222,13 @@ regrename_optimize (void)
{ {
int new_reg, best_new_reg; int new_reg, best_new_reg;
int n_uses; int n_uses;
struct du_chain *this = all_chains; struct du_chain *this_du = all_chains;
struct du_chain *tmp, *last; struct du_chain *tmp, *last;
HARD_REG_SET this_unavailable; HARD_REG_SET this_unavailable;
int reg = REGNO (*this->loc); int reg = REGNO (*this_du->loc);
int i; int i;
all_chains = this->next_chain; all_chains = this_du->next_chain;
best_new_reg = reg; best_new_reg = reg;
...@@ -256,7 +256,7 @@ regrename_optimize (void) ...@@ -256,7 +256,7 @@ regrename_optimize (void)
count number of uses, and narrow the set of registers we can count number of uses, and narrow the set of registers we can
use for renaming. */ use for renaming. */
n_uses = 0; n_uses = 0;
for (last = this; last->next_use; last = last->next_use) for (last = this_du; last->next_use; last = last->next_use)
{ {
n_uses++; n_uses++;
IOR_COMPL_HARD_REG_SET (this_unavailable, IOR_COMPL_HARD_REG_SET (this_unavailable,
...@@ -268,16 +268,16 @@ regrename_optimize (void) ...@@ -268,16 +268,16 @@ regrename_optimize (void)
IOR_COMPL_HARD_REG_SET (this_unavailable, IOR_COMPL_HARD_REG_SET (this_unavailable,
reg_class_contents[last->cl]); reg_class_contents[last->cl]);
if (this->need_caller_save_reg) if (this_du->need_caller_save_reg)
IOR_HARD_REG_SET (this_unavailable, call_used_reg_set); IOR_HARD_REG_SET (this_unavailable, call_used_reg_set);
merge_overlapping_regs (bb, &this_unavailable, this); merge_overlapping_regs (bb, &this_unavailable, this_du);
/* Now potential_regs is a reasonable approximation, let's /* Now potential_regs is a reasonable approximation, let's
have a closer look at each register still in there. */ have a closer look at each register still in there. */
for (new_reg = 0; new_reg < FIRST_PSEUDO_REGISTER; new_reg++) for (new_reg = 0; new_reg < FIRST_PSEUDO_REGISTER; new_reg++)
{ {
int nregs = hard_regno_nregs[new_reg][GET_MODE (*this->loc)]; int nregs = hard_regno_nregs[new_reg][GET_MODE (*this_du->loc)];
for (i = nregs - 1; i >= 0; --i) for (i = nregs - 1; i >= 0; --i)
if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i) if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i)
...@@ -302,7 +302,7 @@ regrename_optimize (void) ...@@ -302,7 +302,7 @@ regrename_optimize (void)
/* See whether it accepts all modes that occur in /* See whether it accepts all modes that occur in
definition and uses. */ definition and uses. */
for (tmp = this; tmp; tmp = tmp->next_use) for (tmp = this_du; tmp; tmp = tmp->next_use)
if (! HARD_REGNO_MODE_OK (new_reg, GET_MODE (*tmp->loc)) if (! HARD_REGNO_MODE_OK (new_reg, GET_MODE (*tmp->loc))
|| (tmp->need_caller_save_reg || (tmp->need_caller_save_reg
&& ! (HARD_REGNO_CALL_PART_CLOBBERED && ! (HARD_REGNO_CALL_PART_CLOBBERED
...@@ -333,7 +333,7 @@ regrename_optimize (void) ...@@ -333,7 +333,7 @@ regrename_optimize (void)
continue; continue;
} }
do_replace (this, best_new_reg); do_replace (this_du, best_new_reg);
tick[best_new_reg] = ++this_tick; tick[best_new_reg] = ++this_tick;
df_set_regs_ever_live (best_new_reg, true); df_set_regs_ever_live (best_new_reg, true);
...@@ -385,15 +385,15 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, ...@@ -385,15 +385,15 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
{ {
if (type == OP_OUT) if (type == OP_OUT)
{ {
struct du_chain *this = XOBNEW (&rename_obstack, struct du_chain); struct du_chain *this_du = XOBNEW (&rename_obstack, struct du_chain);
this->next_use = 0; this_du->next_use = 0;
this->next_chain = open_chains; this_du->next_chain = open_chains;
this->loc = loc; this_du->loc = loc;
this->insn = insn; this_du->insn = insn;
this->cl = cl; this_du->cl = cl;
this->need_caller_save_reg = 0; this_du->need_caller_save_reg = 0;
this->earlyclobber = earlyclobber; this_du->earlyclobber = earlyclobber;
open_chains = this; open_chains = this_du;
} }
return; return;
} }
...@@ -403,7 +403,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, ...@@ -403,7 +403,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
for (p = &open_chains; *p;) for (p = &open_chains; *p;)
{ {
struct du_chain *this = *p; struct du_chain *this_du = *p;
/* Check if the chain has been terminated if it has then skip to /* Check if the chain has been terminated if it has then skip to
the next chain. the next chain.
...@@ -412,18 +412,18 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, ...@@ -412,18 +412,18 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
the chain in Step 3, but are trying to hide in-out operands the chain in Step 3, but are trying to hide in-out operands
from terminate_write in Step 5. */ from terminate_write in Step 5. */
if (*this->loc == cc0_rtx) if (*this_du->loc == cc0_rtx)
p = &this->next_chain; p = &this_du->next_chain;
else else
{ {
int regno = REGNO (*this->loc); int regno = REGNO (*this_du->loc);
int nregs = hard_regno_nregs[regno][GET_MODE (*this->loc)]; int nregs = hard_regno_nregs[regno][GET_MODE (*this_du->loc)];
int exact_match = (regno == this_regno && nregs == this_nregs); int exact_match = (regno == this_regno && nregs == this_nregs);
if (regno + nregs <= this_regno if (regno + nregs <= this_regno
|| this_regno + this_nregs <= regno) || this_regno + this_nregs <= regno)
{ {
p = &this->next_chain; p = &this_du->next_chain;
continue; continue;
} }
...@@ -437,23 +437,23 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, ...@@ -437,23 +437,23 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
be replaced with, terminate the chain. */ be replaced with, terminate the chain. */
if (cl != NO_REGS) if (cl != NO_REGS)
{ {
this = XOBNEW (&rename_obstack, struct du_chain); this_du = XOBNEW (&rename_obstack, struct du_chain);
this->next_use = 0; this_du->next_use = 0;
this->next_chain = (*p)->next_chain; this_du->next_chain = (*p)->next_chain;
this->loc = loc; this_du->loc = loc;
this->insn = insn; this_du->insn = insn;
this->cl = cl; this_du->cl = cl;
this->need_caller_save_reg = 0; this_du->need_caller_save_reg = 0;
while (*p) while (*p)
p = &(*p)->next_use; p = &(*p)->next_use;
*p = this; *p = this_du;
return; return;
} }
} }
if (action != terminate_overlapping_read || ! exact_match) if (action != terminate_overlapping_read || ! exact_match)
{ {
struct du_chain *next = this->next_chain; struct du_chain *next = this_du->next_chain;
/* Whether the terminated chain can be used for renaming /* Whether the terminated chain can be used for renaming
depends on the action and this being an exact match. depends on the action and this being an exact match.
...@@ -462,12 +462,12 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, ...@@ -462,12 +462,12 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
if ((action == terminate_dead || action == terminate_write) if ((action == terminate_dead || action == terminate_write)
&& exact_match) && exact_match)
{ {
this->next_chain = closed_chains; this_du->next_chain = closed_chains;
closed_chains = this; closed_chains = this_du;
if (dump_file) if (dump_file)
fprintf (dump_file, fprintf (dump_file,
"Closing chain %s at insn %d (%s)\n", "Closing chain %s at insn %d (%s)\n",
reg_names[REGNO (*this->loc)], INSN_UID (insn), reg_names[REGNO (*this_du->loc)], INSN_UID (insn),
scan_actions_name[(int) action]); scan_actions_name[(int) action]);
} }
else else
...@@ -475,13 +475,13 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl, ...@@ -475,13 +475,13 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
if (dump_file) if (dump_file)
fprintf (dump_file, fprintf (dump_file,
"Discarding chain %s at insn %d (%s)\n", "Discarding chain %s at insn %d (%s)\n",
reg_names[REGNO (*this->loc)], INSN_UID (insn), reg_names[REGNO (*this_du->loc)], INSN_UID (insn),
scan_actions_name[(int) action]); scan_actions_name[(int) action]);
} }
*p = next; *p = next;
} }
else else
p = &this->next_chain; p = &this_du->next_chain;
} }
} }
} }
...@@ -976,15 +976,15 @@ dump_def_use_chain (struct du_chain *chains) ...@@ -976,15 +976,15 @@ dump_def_use_chain (struct du_chain *chains)
{ {
while (chains) while (chains)
{ {
struct du_chain *this = chains; struct du_chain *this_du = chains;
int r = REGNO (*this->loc); int r = REGNO (*this_du->loc);
int nregs = hard_regno_nregs[r][GET_MODE (*this->loc)]; int nregs = hard_regno_nregs[r][GET_MODE (*this_du->loc)];
fprintf (dump_file, "Register %s (%d):", reg_names[r], nregs); fprintf (dump_file, "Register %s (%d):", reg_names[r], nregs);
while (this) while (this_du)
{ {
fprintf (dump_file, " %d [%s]", INSN_UID (this->insn), fprintf (dump_file, " %d [%s]", INSN_UID (this_du->insn),
reg_class_names[this->cl]); reg_class_names[this_du->cl]);
this = this->next_use; this_du = this_du->next_use;
} }
fprintf (dump_file, "\n"); fprintf (dump_file, "\n");
chains = chains->next_chain; chains = chains->next_chain;
...@@ -1365,17 +1365,17 @@ find_oldest_value_reg (enum reg_class cl, rtx reg, struct value_data *vd) ...@@ -1365,17 +1365,17 @@ find_oldest_value_reg (enum reg_class cl, rtx reg, struct value_data *vd)
for (i = vd->e[regno].oldest_regno; i != regno; i = vd->e[i].next_regno) for (i = vd->e[regno].oldest_regno; i != regno; i = vd->e[i].next_regno)
{ {
enum machine_mode oldmode = vd->e[i].mode; enum machine_mode oldmode = vd->e[i].mode;
rtx new; rtx new_rtx;
if (!in_hard_reg_set_p (reg_class_contents[cl], mode, i)) if (!in_hard_reg_set_p (reg_class_contents[cl], mode, i))
return NULL_RTX; return NULL_RTX;
new = maybe_mode_change (oldmode, vd->e[regno].mode, mode, i, regno); new_rtx = maybe_mode_change (oldmode, vd->e[regno].mode, mode, i, regno);
if (new) if (new_rtx)
{ {
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg); ORIGINAL_REGNO (new_rtx) = ORIGINAL_REGNO (reg);
REG_ATTRS (new) = REG_ATTRS (reg); REG_ATTRS (new_rtx) = REG_ATTRS (reg);
return new; return new_rtx;
} }
} }
...@@ -1389,14 +1389,14 @@ static bool ...@@ -1389,14 +1389,14 @@ static bool
replace_oldest_value_reg (rtx *loc, enum reg_class cl, rtx insn, replace_oldest_value_reg (rtx *loc, enum reg_class cl, rtx insn,
struct value_data *vd) struct value_data *vd)
{ {
rtx new = find_oldest_value_reg (cl, *loc, vd); rtx new_rtx = find_oldest_value_reg (cl, *loc, vd);
if (new) if (new_rtx)
{ {
if (dump_file) if (dump_file)
fprintf (dump_file, "insn %u: replaced reg %u with %u\n", fprintf (dump_file, "insn %u: replaced reg %u with %u\n",
INSN_UID (insn), REGNO (*loc), REGNO (new)); INSN_UID (insn), REGNO (*loc), REGNO (new_rtx));
validate_change (insn, loc, new, 1); validate_change (insn, loc, new_rtx, 1);
return true; return true;
} }
return false; return false;
...@@ -1634,7 +1634,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) ...@@ -1634,7 +1634,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
unsigned int regno = REGNO (src); unsigned int regno = REGNO (src);
enum machine_mode mode = GET_MODE (src); enum machine_mode mode = GET_MODE (src);
unsigned int i; unsigned int i;
rtx new; rtx new_rtx;
/* If we are accessing SRC in some mode other that what we /* If we are accessing SRC in some mode other that what we
set it in, make sure that the replacement is valid. */ set it in, make sure that the replacement is valid. */
...@@ -1649,13 +1649,13 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) ...@@ -1649,13 +1649,13 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
register in the same class. */ register in the same class. */
if (REG_P (SET_DEST (set))) if (REG_P (SET_DEST (set)))
{ {
new = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd); new_rtx = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd);
if (new && validate_change (insn, &SET_SRC (set), new, 0)) if (new_rtx && validate_change (insn, &SET_SRC (set), new_rtx, 0))
{ {
if (dump_file) if (dump_file)
fprintf (dump_file, fprintf (dump_file,
"insn %u: replaced reg %u with %u\n", "insn %u: replaced reg %u with %u\n",
INSN_UID (insn), regno, REGNO (new)); INSN_UID (insn), regno, REGNO (new_rtx));
changed = true; changed = true;
goto did_replacement; goto did_replacement;
} }
...@@ -1665,18 +1665,18 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) ...@@ -1665,18 +1665,18 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
for (i = vd->e[regno].oldest_regno; i != regno; for (i = vd->e[regno].oldest_regno; i != regno;
i = vd->e[i].next_regno) i = vd->e[i].next_regno)
{ {
new = maybe_mode_change (vd->e[i].mode, vd->e[regno].mode, new_rtx = maybe_mode_change (vd->e[i].mode, vd->e[regno].mode,
mode, i, regno); mode, i, regno);
if (new != NULL_RTX) if (new_rtx != NULL_RTX)
{ {
if (validate_change (insn, &SET_SRC (set), new, 0)) if (validate_change (insn, &SET_SRC (set), new_rtx, 0))
{ {
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (src); ORIGINAL_REGNO (new_rtx) = ORIGINAL_REGNO (src);
REG_ATTRS (new) = REG_ATTRS (src); REG_ATTRS (new_rtx) = REG_ATTRS (src);
if (dump_file) if (dump_file)
fprintf (dump_file, fprintf (dump_file,
"insn %u: replaced reg %u with %u\n", "insn %u: replaced reg %u with %u\n",
INSN_UID (insn), regno, REGNO (new)); INSN_UID (insn), regno, REGNO (new_rtx));
changed = true; changed = true;
goto did_replacement; goto did_replacement;
} }
...@@ -1729,13 +1729,13 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) ...@@ -1729,13 +1729,13 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
if (replaced[i]) if (replaced[i])
{ {
int j; int j;
rtx new; rtx new_rtx;
new = *recog_data.operand_loc[i]; new_rtx = *recog_data.operand_loc[i];
recog_data.operand[i] = new; recog_data.operand[i] = new_rtx;
for (j = 0; j < recog_data.n_dups; j++) for (j = 0; j < recog_data.n_dups; j++)
if (recog_data.dup_num[j] == i) if (recog_data.dup_num[j] == i)
validate_unshare_change (insn, recog_data.dup_loc[j], new, 1); validate_unshare_change (insn, recog_data.dup_loc[j], new_rtx, 1);
any_replacements = true; any_replacements = true;
} }
......
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