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
This commit is contained in:
Kaveh R. Ghazi 2008-07-16 17:49:20 +00:00 committed by Kaveh Ghazi
parent 1bc39d2fcd
commit d858f35936
14 changed files with 297 additions and 273 deletions

View File

@ -1,3 +1,27 @@
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>
* config/rs6000/rs6000.c (processor_target_table): Remove duplicate

View File

@ -597,7 +597,7 @@ dump_reg_info (FILE *file)
fprintf (file, "%d registers.\n", max);
for (i = FIRST_PSEUDO_REGISTER; i < max; i++)
{
enum reg_class class, altclass;
enum reg_class rclass, altclass;
if (regstat_n_sets_and_refs)
fprintf (file, "\nRegister %d used %d times across %d insns",
@ -628,17 +628,17 @@ dump_reg_info (FILE *file)
&& PSEUDO_REGNO_BYTES (i) != UNITS_PER_WORD)
fprintf (file, "; %d bytes", PSEUDO_REGNO_BYTES (i));
class = reg_preferred_class (i);
rclass = reg_preferred_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)
fprintf (file, "; pref %s", reg_class_names[(int) class]);
if (altclass == ALL_REGS || rclass == ALL_REGS)
fprintf (file, "; pref %s", reg_class_names[(int) rclass]);
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
fprintf (file, "; pref %s, else %s",
reg_class_names[(int) class],
reg_class_names[(int) rclass],
reg_class_names[(int) altclass]);
}

View File

@ -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
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
"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). */
static rtx
dw2_force_const_mem (rtx x, bool public)
dw2_force_const_mem (rtx x, bool is_public)
{
splay_tree_node node;
const char *str;
@ -755,7 +755,7 @@ dw2_force_const_mem (rtx x, bool public)
{
tree id;
if (public && USE_LINKONCE_INDIRECT)
if (is_public && USE_LINKONCE_INDIRECT)
{
char *ref_name = XALLOCAVEC (char, strlen (str) + sizeof "DW.ref.");
@ -829,7 +829,7 @@ dw2_output_indirect_constants (void)
reference is shared across the entire application (or DSO). */
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, ...)
{
int size;
@ -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
share these constants across the entire unit of translation and
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;
goto restart;
}

View File

@ -419,30 +419,30 @@ init_eh_for_function (void)
static struct eh_region *
gen_eh_region (enum eh_region_type type, struct eh_region *outer)
{
struct eh_region *new;
struct eh_region *new_eh;
#ifdef ENABLE_CHECKING
gcc_assert (doing_eh (0));
#endif
/* Insert a new blank region as a leaf in the tree. */
new = GGC_CNEW (struct eh_region);
new->type = type;
new->outer = outer;
new_eh = GGC_CNEW (struct eh_region);
new_eh->type = type;
new_eh->outer = outer;
if (outer)
{
new->next_peer = outer->inner;
outer->inner = new;
new_eh->next_peer = outer->inner;
outer->inner = new_eh;
}
else
{
new->next_peer = cfun->eh->region_tree;
cfun->eh->region_tree = new;
new_eh->next_peer = cfun->eh->region_tree;
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 *
@ -3047,19 +3047,19 @@ action_record_hash (const void *pentry)
static int
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.next = next;
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->offset = VARRAY_ACTIVE_SIZE (crtl->eh.action_record_data) + 1;
new->filter = filter;
new->next = next;
*slot = new;
new_ar = XNEW (struct action_record);
new_ar->offset = VARRAY_ACTIVE_SIZE (crtl->eh.action_record_data) + 1;
new_ar->filter = filter;
new_ar->next = next;
*slot = new_ar;
/* The filter value goes in untouched. The link to the next
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)
push_sleb128 (&crtl->eh.action_record_data, next);
}
return new->offset;
return new_ar->offset;
}
static int
@ -3550,7 +3550,7 @@ static void
output_ttype (tree type, int tt_format, int tt_format_size)
{
rtx value;
bool public = true;
bool is_public = true;
if (type == NULL_TREE)
value = const0_rtx;
@ -3573,7 +3573,7 @@ output_ttype (tree type, int tt_format, int tt_format_size)
node = varpool_node (type);
if (node)
varpool_mark_needed_node (node);
public = TREE_PUBLIC (type);
is_public = TREE_PUBLIC (type);
}
}
else
@ -3588,7 +3588,7 @@ output_ttype (tree type, int tt_format, int tt_format_size)
assemble_integer (value, tt_format_size,
tt_format_size * BITS_PER_UNIT, 1);
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

View File

@ -2050,7 +2050,7 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
optab lrotate_optab = rotl_optab;
optab rrotate_optab = rotr_optab;
enum machine_mode op1_mode;
int try;
int attempt;
op1 = expand_normal (amount);
op1_mode = GET_MODE (op1);
@ -2105,13 +2105,13 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
return shifted;
}
for (try = 0; temp == 0 && try < 3; try++)
for (attempt = 0; temp == 0 && attempt < 3; attempt++)
{
enum optab_methods methods;
if (try == 0)
if (attempt == 0)
methods = OPTAB_DIRECT;
else if (try == 1)
else if (attempt == 1)
methods = OPTAB_WIDEN;
else
methods = OPTAB_LIB_WIDEN;

View File

@ -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;
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_preferred_class (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
if (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
if (allocno[num].no_eh_reg)

View File

@ -165,25 +165,25 @@ darkgrey\n shape: ellipse" : "white",
}
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;
switch (graph_dump_format)
{
case vcg:
color = "";
if (class == 2)
if (color_class == 2)
color = "color: red ";
else if (bb_edge)
color = "color: blue ";
else if (class == 3)
else if (color_class == 3)
color = "color: green ";
fprintf (fp,
"edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s",
current_function_name (), from,
current_function_name (), to, color);
if (class)
fprintf (fp, "class: %d ", class);
if (color_class)
fprintf (fp, "class: %d ", color_class);
fputs ("}\n", fp);
break;
case no_graph:

View File

@ -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. */
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);
return (reg_class_subset_p (rclass, class)
|| reg_class_subset_p (class, rclass));
enum reg_class rclass2 = reg_preferred_class (reg);
return (reg_class_subset_p (rclass2, rclass)
|| reg_class_subset_p (rclass, rclass2));
}
/* 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)
register is available. If not, return -1. */
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 born_index, int dead_index)
{
@ -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++)
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
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,
{
/* Don't try the copy-suggested regs again. */
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);
}
@ -2274,7 +2274,7 @@ find_free_reg (enum reg_class class, enum machine_mode mode, int qtyno,
optimize_size ? qty[qtyno].n_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)
caller_save_needed = 1;
return i;

View File

@ -1571,14 +1571,14 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
enum optab_methods next_methods
= (methods == OPTAB_LIB || methods == OPTAB_LIB_WIDEN
? OPTAB_WIDEN : methods);
enum mode_class class;
enum mode_class mclass;
enum machine_mode wider_mode;
rtx libfunc;
rtx temp;
rtx entry_last = get_last_insn ();
rtx last;
class = GET_MODE_CLASS (mode);
mclass = GET_MODE_CLASS (mode);
/* If subtracting an integer constant, convert this into an addition of
the negated constant. */
@ -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)
|| (binoptab == rotr_optab
&& 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);
rtx newop1;
@ -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
wider mode as well. */
if (CLASS_HAS_WIDER_MODES_P (class)
if (CLASS_HAS_WIDER_MODES_P (mclass)
&& methods != OPTAB_DIRECT && methods != OPTAB_LIB)
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@ -1683,7 +1683,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
|| binoptab == xor_optab
|| binoptab == add_optab || binoptab == sub_optab
|| binoptab == smul_optab || binoptab == ashl_optab)
&& class == MODE_INT)
&& mclass == MODE_INT)
{
no_extend = 1;
xop0 = avoid_expensive_constant (mode, binoptab,
@ -1703,7 +1703,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
unsignedp, OPTAB_DIRECT);
if (temp)
{
if (class != MODE_INT
if (mclass != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode)))
{
@ -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. */
if ((binoptab == and_optab || binoptab == ior_optab || binoptab == xor_optab)
&& class == MODE_INT
&& mclass == MODE_INT
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& 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,
/* Synthesize double word shifts from single word shifts. */
if ((binoptab == lshr_optab || binoptab == ashl_optab
|| binoptab == ashr_optab)
&& class == MODE_INT
&& mclass == MODE_INT
&& (GET_CODE (op1) == CONST_INT || !optimize_size)
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& 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,
/* Synthesize double word rotates from single word shifts. */
if ((binoptab == rotl_optab || binoptab == rotr_optab)
&& class == MODE_INT
&& mclass == MODE_INT
&& GET_CODE (op1) == CONST_INT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& 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,
/* These can be done a word at a time by propagating carries. */
if ((binoptab == add_optab || binoptab == sub_optab)
&& class == MODE_INT
&& mclass == MODE_INT
&& GET_MODE_SIZE (mode) >= 2 * UNITS_PER_WORD
&& 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,
try using a signed widening multiply. */
if (binoptab == smul_optab
&& class == MODE_INT
&& mclass == MODE_INT
&& GET_MODE_SIZE (mode) == 2 * UNITS_PER_WORD
&& optab_handler (smul_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,
/* Look for a wider mode of the same class for which it appears we can do
the operation. */
if (CLASS_HAS_WIDER_MODES_P (class))
if (CLASS_HAS_WIDER_MODES_P (mclass))
{
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@ -2219,7 +2219,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
|| binoptab == xor_optab
|| binoptab == add_optab || binoptab == sub_optab
|| binoptab == smul_optab || binoptab == ashl_optab)
&& class == MODE_INT)
&& mclass == MODE_INT)
no_extend = 1;
xop0 = widen_operand (xop0, wider_mode, mode,
@ -2233,7 +2233,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1,
unsignedp, methods);
if (temp)
{
if (class != MODE_INT
if (mclass != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode)))
{
@ -2327,12 +2327,12 @@ expand_twoval_unop (optab unoptab, rtx op0, rtx targ0, rtx targ1,
int unsignedp)
{
enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1);
enum mode_class class;
enum mode_class mclass;
enum machine_mode wider_mode;
rtx entry_last = get_last_insn ();
rtx last;
class = GET_MODE_CLASS (mode);
mclass = GET_MODE_CLASS (mode);
if (!targ0)
targ0 = gen_reg_rtx (mode);
@ -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? */
if (CLASS_HAS_WIDER_MODES_P (class))
if (CLASS_HAS_WIDER_MODES_P (mclass))
{
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@ -2420,12 +2420,12 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1,
int unsignedp)
{
enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1);
enum mode_class class;
enum mode_class mclass;
enum machine_mode wider_mode;
rtx entry_last = get_last_insn ();
rtx last;
class = GET_MODE_CLASS (mode);
mclass = GET_MODE_CLASS (mode);
if (!targ0)
targ0 = gen_reg_rtx (mode);
@ -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? */
if (CLASS_HAS_WIDER_MODES_P (class))
if (CLASS_HAS_WIDER_MODES_P (mclass))
{
for (wider_mode = GET_MODE_WIDER_MODE (mode);
wider_mode != VOIDmode;
@ -2591,8 +2591,8 @@ expand_simple_unop (enum machine_mode mode, enum rtx_code code, rtx op0,
static rtx
widen_clz (enum machine_mode mode, rtx op0, rtx target)
{
enum mode_class class = GET_MODE_CLASS (mode);
if (CLASS_HAS_WIDER_MODES_P (class))
enum mode_class mclass = GET_MODE_CLASS (mode);
if (CLASS_HAS_WIDER_MODES_P (mclass))
{
enum machine_mode wider_mode;
for (wider_mode = GET_MODE_WIDER_MODE (mode);
@ -2702,11 +2702,11 @@ expand_doubleword_clz (enum machine_mode mode, rtx op0, rtx target)
static rtx
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;
rtx x, last;
if (!CLASS_HAS_WIDER_MODES_P (class))
if (!CLASS_HAS_WIDER_MODES_P (mclass))
return NULL_RTX;
for (wider_mode = GET_MODE_WIDER_MODE (mode);
@ -2767,8 +2767,8 @@ expand_doubleword_bswap (enum machine_mode mode, rtx op, rtx target)
static rtx
expand_parity (enum machine_mode mode, rtx op0, rtx target)
{
enum mode_class class = GET_MODE_CLASS (mode);
if (CLASS_HAS_WIDER_MODES_P (class))
enum mode_class mclass = GET_MODE_CLASS (mode);
if (CLASS_HAS_WIDER_MODES_P (mclass))
{
enum machine_mode wider_mode;
for (wider_mode = mode; wider_mode != VOIDmode;
@ -3116,7 +3116,7 @@ rtx
expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
int unsignedp)
{
enum mode_class class = GET_MODE_CLASS (mode);
enum mode_class mclass = GET_MODE_CLASS (mode);
enum machine_mode wider_mode;
rtx temp;
rtx libfunc;
@ -3163,7 +3163,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
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);
wider_mode != VOIDmode;
wider_mode = GET_MODE_WIDER_MODE (wider_mode))
@ -3180,14 +3180,14 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
xop0 = widen_operand (xop0, wider_mode, mode, unsignedp,
(unoptab == neg_optab
|| unoptab == one_cmpl_optab)
&& class == MODE_INT);
&& mclass == MODE_INT);
temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX,
unsignedp);
if (temp)
{
if (class != MODE_INT
if (mclass != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode)))
{
@ -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. */
if (unoptab == one_cmpl_optab
&& class == MODE_INT
&& mclass == MODE_INT
&& GET_MODE_SIZE (mode) > UNITS_PER_WORD
&& 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,
/* 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);
wider_mode != VOIDmode;
@ -3343,7 +3343,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
xop0 = widen_operand (xop0, wider_mode, mode, unsignedp,
(unoptab == neg_optab
|| unoptab == one_cmpl_optab)
&& class == MODE_INT);
&& mclass == MODE_INT);
temp = expand_unop (wider_mode, unoptab, xop0, NULL_RTX,
unsignedp);
@ -3358,7 +3358,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target,
if (temp)
{
if (class != MODE_INT)
if (mclass != MODE_INT)
{
if (target == 0)
target = gen_reg_rtx (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)
{
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;
/* Try combined insns first. */
@ -4238,7 +4238,7 @@ emit_cmp_and_jump_insn_1 (rtx x, rtx y, enum machine_mode mode,
return;
}
if (!CLASS_HAS_WIDER_MODES_P (class))
if (!CLASS_HAS_WIDER_MODES_P (mclass))
break;
wider_mode = GET_MODE_WIDER_MODE (wider_mode);

View File

@ -518,7 +518,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
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))
continue;
@ -552,13 +552,13 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
break;
case 'g': case 'r':
class = reg_class_subunion[(int) class][(int) GENERAL_REGS];
rclass = reg_class_subunion[(int) rclass][(int) GENERAL_REGS];
break;
default:
class
rclass
= (reg_class_subunion
[(int) class]
[(int) rclass]
[(int) REG_CLASS_FROM_CONSTRAINT ((unsigned char) c, p)]);
break;
@ -568,7 +568,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
alternative yet and the operand being replaced is not
a cheap CONST_INT. */
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
|| (rtx_cost (recog_data.operand[i], SET)
> rtx_cost (testreg, SET))))
@ -577,7 +577,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg)
op_alt_regno[i][j] = regno;
}
j++;
class = (int) NO_REGS;
rclass = (int) NO_REGS;
break;
}
p += CONSTRAINT_LEN (c, p);

View File

@ -144,10 +144,10 @@ add_neighbor (int alloc_no, int neighbor)
if (adjlist == NULL || adjlist->index == ADJACENCY_VEC_LENGTH)
{
adjacency_t *new = (adjacency_t *) pool_alloc (adjacency_pool);
new->index = 0;
new->next = adjlist;
adjlist = new;
adjacency_t *new_adj = (adjacency_t *) pool_alloc (adjacency_pool);
new_adj->index = 0;
new_adj->next = adjlist;
adjlist = new_adj;
adjacency[alloc_no] = adjlist;
}

View File

@ -713,18 +713,18 @@ replace_reg (rtx *reg, int regno)
static void
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);
for (this = *note_link; this; this = XEXP (this, 1))
if (REG_NOTE_KIND (this) == note
&& REG_P (XEXP (this, 0)) && REGNO (XEXP (this, 0)) == regno)
for (this_rtx = *note_link; this_rtx; this_rtx = XEXP (this_rtx, 1))
if (REG_NOTE_KIND (this_rtx) == note
&& REG_P (XEXP (this_rtx, 0)) && REGNO (XEXP (this_rtx, 0)) == regno)
{
*note_link = XEXP (this, 1);
*note_link = XEXP (this_rtx, 1);
return;
}
else
note_link = &XEXP (this, 1);
note_link = &XEXP (this_rtx, 1);
gcc_unreachable ();
}
@ -2355,7 +2355,7 @@ subst_stack_regs (rtx insn, stack regstack)
is no longer needed once this has executed. */
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 update_end = 0;
@ -2368,9 +2368,9 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
&& starting_stack_p
&& where == EMIT_BEFORE)
{
BLOCK_INFO (current_block)->stack_in = *new;
BLOCK_INFO (current_block)->stack_in = *new_stack;
starting_stack_p = false;
*old = *new;
*old = *new_stack;
return;
}
@ -2386,7 +2386,7 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* Initialize partially dead variables. */
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))
{
old->reg[++old->top] = i;
@ -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
and contains two or more registers, use a more intelligent algorithm
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];
int pops[REG_STACK_SIZE];
int next, dest, topsrc;
/* First pass to determine the free slots. */
for (reg = 0; reg <= new->top; reg++)
slots[reg] = TEST_HARD_REG_BIT (new->reg_set, old->reg[reg]);
for (reg = 0; reg <= new_stack->top; reg++)
slots[reg] = TEST_HARD_REG_BIT (new_stack->reg_set, old->reg[reg]);
/* Second pass to allocate preferred slots. */
topsrc = -1;
for (reg = old->top; reg > new->top; reg--)
if (TEST_HARD_REG_BIT (new->reg_set, old->reg[reg]))
for (reg = old->top; reg > new_stack->top; reg--)
if (TEST_HARD_REG_BIT (new_stack->reg_set, old->reg[reg]))
{
dest = -1;
for (next = 0; next <= new->top; next++)
if (!slots[next] && new->reg[next] == old->reg[reg])
for (next = 0; next <= new_stack->top; next++)
if (!slots[next] && new_stack->reg[next] == old->reg[reg])
{
/* If this is a preference for the new top of stack, record
the fact by remembering it's old->reg in topsrc. */
if (next == new->top)
if (next == new_stack->top)
topsrc = reg;
slots[next] = true;
dest = next;
@ -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
top of stack there. */
if (topsrc != -1)
for (reg = 0; reg < new->top; reg++)
for (reg = 0; reg < new_stack->top; reg++)
if (!slots[reg])
{
pops[topsrc] = reg;
slots[new->top] = false;
slots[new_stack->top] = false;
slots[reg] = true;
break;
}
/* Third pass allocates remaining slots and emits pop insns. */
next = new->top;
for (reg = old->top; reg > new->top; reg--)
next = new_stack->top;
for (reg = old->top; reg > new_stack->top; reg--)
{
dest = pops[reg];
if (dest == -1)
@ -2472,14 +2472,14 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
live = 0;
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++;
next = 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--;
emit_pop_insn (insn, old, FP_MODE_REG (old->reg[next], DFmode),
EMIT_BEFORE);
@ -2489,13 +2489,13 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
EMIT_BEFORE);
}
if (new->top == -2)
if (new_stack->top == -2)
{
/* If the new block has never been processed, then it can inherit
the old stack order. */
new->top = old->top;
memcpy (new->reg, old->reg, sizeof (new->reg));
new_stack->top = old->top;
memcpy (new_stack->reg, old->reg, sizeof (new_stack->reg));
}
else
{
@ -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,
not their depth or liveliness. */
gcc_assert (hard_reg_set_equal_p (old->reg_set, new->reg_set));
gcc_assert (old->top == new->top);
gcc_assert (hard_reg_set_equal_p (old->reg_set, new_stack->reg_set));
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.
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)
other regs. But since we never swap any other reg away from
its correct slot, this algorithm will converge. */
if (new->top != -1)
if (new_stack->top != -1)
do
{
/* Swap the reg at top of stack into the position it is
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--)
if (new->reg[reg] == old->reg[old->top])
for (reg = new_stack->top; reg >= 0; reg--)
if (new_stack->reg[reg] == old->reg[old->top])
break;
gcc_assert (reg != -1);
@ -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
above fix it. */
for (reg = new->top; reg >= 0; reg--)
if (new->reg[reg] != old->reg[reg])
for (reg = new_stack->top; reg >= 0; reg--)
if (new_stack->reg[reg] != old->reg[reg])
{
emit_swap_insn (insn, old,
FP_MODE_REG (old->reg[reg], DFmode));
@ -2551,7 +2551,7 @@ change_stack (rtx insn, stack old, stack new, enum emit_where where)
/* At this point there must be no differences. */
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)

View File

@ -738,7 +738,7 @@ init_fake_stack_mems (void)
Only needed if secondary reloads are required for memory moves. */
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;
int partial_cost = 0;
@ -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];
altclass = secondary_reload_class (in ? 1 : 0, class, mode, mem);
altclass = secondary_reload_class (in ? 1 : 0, rclass, mode, mem);
if (altclass == NO_REGS)
return 0;
if (in)
partial_cost = REGISTER_MOVE_COST (mode, altclass, class);
partial_cost = REGISTER_MOVE_COST (mode, altclass, rclass);
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
what it is, so MEMORY_MOVE_COST really ought not to be calling
here in that case.
@ -1087,23 +1087,23 @@ dump_regclass (FILE *dump)
int 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))
{
fprintf (dump, " Register %i costs:", i);
for (class = 0; class < (int) N_REG_CLASSES; class++)
if (contains_reg_of_mode [(enum reg_class) class][PSEUDO_REGNO_MODE (i)]
for (rclass = 0; rclass < (int) N_REG_CLASSES; rclass++)
if (contains_reg_of_mode [(enum reg_class) rclass][PSEUDO_REGNO_MODE (i)]
#ifdef FORBIDDEN_INC_DEC_CLASSES
&& (!in_inc_dec[i]
|| !forbidden_inc_dec_class[(enum reg_class) class])
|| !forbidden_inc_dec_class[(enum reg_class) rclass])
#endif
#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))
#endif
)
fprintf (dump, " %s:%i", reg_class_names[class],
costs[i].cost[(enum reg_class) class]);
fprintf (dump, " %s:%i", reg_class_names[rclass],
costs[i].cost[(enum reg_class) rclass]);
fprintf (dump, " MEM:%i\n", costs[i].mem_cost);
}
}
@ -1382,7 +1382,7 @@ regclass (rtx f, int nregs)
enum reg_class best = ALL_REGS, alt = NO_REGS;
/* This is an enum reg_class, but we call it an int
to save lots of casts. */
int class;
int rclass;
struct costs *p = &costs[i];
if (regno_reg_rtx[i] == NULL)
@ -1393,27 +1393,27 @@ regclass (rtx f, int nregs)
if (optimize && !REG_N_REFS (i) && !REG_N_SETS (i))
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
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
|| (in_inc_dec[i] && forbidden_inc_dec_class[class])
|| (in_inc_dec[i] && forbidden_inc_dec_class[rclass])
#endif
#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))
#endif
)
;
else if (p->cost[class] < best_cost)
else if (p->cost[rclass] < best_cost)
{
best_cost = p->cost[class];
best = (enum reg_class) class;
best_cost = p->cost[rclass];
best = (enum reg_class) rclass;
}
else if (p->cost[class] == best_cost)
best = reg_class_subunion[(int) best][class];
else if (p->cost[rclass] == best_cost)
best = reg_class_subunion[(int) best][rclass];
}
/* If no register class is better than memory, use memory. */
@ -1428,19 +1428,19 @@ regclass (rtx f, int nregs)
will be doing it again later. */
if ((pass == 1 || dump_file) || ! flag_expensive_optimizations)
for (class = 0; class < N_REG_CLASSES; class++)
if (p->cost[class] < p->mem_cost
&& (reg_class_size[(int) reg_class_subunion[(int) alt][class]]
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
if (p->cost[rclass] < p->mem_cost
&& (reg_class_size[(int) reg_class_subunion[(int) alt][rclass]]
> reg_class_size[(int) alt])
#ifdef FORBIDDEN_INC_DEC_CLASSES
&& ! (in_inc_dec[i] && forbidden_inc_dec_class[class])
&& ! (in_inc_dec[i] && forbidden_inc_dec_class[rclass])
#endif
#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))
#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 (alt == best)
@ -1517,7 +1517,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
int alt_cost = 0;
enum reg_class classes[MAX_RECOG_OPERANDS];
int allows_mem[MAX_RECOG_OPERANDS];
int class;
int rclass;
for (i = 0; i < n_ops; i++)
{
@ -1617,17 +1617,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
switch (recog_data.operand_type[i])
{
case OP_INOUT:
for (class = 0; class < N_REG_CLASSES; class++)
pp->cost[class] = (intable[class][op_class]
+ outtable[op_class][class]);
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[rclass] = (intable[rclass][op_class]
+ outtable[op_class][rclass]);
break;
case OP_IN:
for (class = 0; class < N_REG_CLASSES; class++)
pp->cost[class] = intable[class][op_class];
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[rclass] = intable[rclass][op_class];
break;
case OP_OUT:
for (class = 0; class < N_REG_CLASSES; class++)
pp->cost[class] = outtable[op_class][class];
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[rclass] = outtable[op_class][rclass];
break;
}
@ -1861,17 +1861,17 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
switch (recog_data.operand_type[i])
{
case OP_INOUT:
for (class = 0; class < N_REG_CLASSES; class++)
pp->cost[class] = (intable[class][op_class]
+ outtable[op_class][class]);
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[rclass] = (intable[rclass][op_class]
+ outtable[op_class][rclass]);
break;
case OP_IN:
for (class = 0; class < N_REG_CLASSES; class++)
pp->cost[class] = intable[class][op_class];
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[rclass] = intable[rclass][op_class];
break;
case OP_OUT:
for (class = 0; class < N_REG_CLASSES; class++)
pp->cost[class] = outtable[op_class][class];
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[rclass] = outtable[op_class][rclass];
break;
}
@ -1949,9 +1949,9 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
pp->mem_cost = MIN (pp->mem_cost,
(qq->mem_cost + alt_cost) * scale);
for (class = 0; class < N_REG_CLASSES; class++)
pp->cost[class] = MIN (pp->cost[class],
(qq->cost[class] + alt_cost) * scale);
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
pp->cost[rclass] = MIN (pp->cost[rclass],
(qq->cost[rclass] + alt_cost) * scale);
}
}
@ -1978,7 +1978,7 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
{
unsigned int regno = REGNO (ops[!i]);
enum machine_mode mode = GET_MODE (ops[!i]);
int class;
int rclass;
if (regno >= FIRST_PSEUDO_REGISTER && reg_pref != 0
&& reg_pref[regno].prefclass != NO_REGS)
@ -1991,15 +1991,15 @@ record_reg_classes (int n_alts, int n_ops, rtx *ops,
op_costs[i].cost[(unsigned char) pref] = -1;
}
else if (regno < FIRST_PSEUDO_REGISTER)
for (class = 0; class < N_REG_CLASSES; class++)
if (TEST_HARD_REG_BIT (reg_class_contents[class], regno)
&& reg_class_size[class] == (unsigned) CLASS_MAX_NREGS (class, mode))
for (rclass = 0; rclass < N_REG_CLASSES; rclass++)
if (TEST_HARD_REG_BIT (reg_class_contents[rclass], regno)
&& reg_class_size[rclass] == (unsigned) CLASS_MAX_NREGS (rclass, mode))
{
if (reg_class_size[class] == 1)
op_costs[i].cost[class] = -1;
else if (in_hard_reg_set_p (reg_class_contents[class],
if (reg_class_size[rclass] == 1)
op_costs[i].cost[rclass] = -1;
else if (in_hard_reg_set_p (reg_class_contents[rclass],
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,
X must not be a pseudo. */
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)
{
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,
return 0;
/* 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
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,
sri.prev_sri = prev_sri;
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])
init_move_cost (mode);
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
+ 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,
cost to move between the register classes, and use 2 for everything
else (constants). */
if (MEM_P (x) || class == NO_REGS)
return sri.extra_cost + MEMORY_MOVE_COST (mode, class, to_p);
if (MEM_P (x) || rclass == NO_REGS)
return sri.extra_cost + MEMORY_MOVE_COST (mode, rclass, to_p);
else if (REG_P (x))
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
/* 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,
int scale)
{
enum rtx_code code = GET_CODE (x);
enum reg_class class;
enum reg_class rclass;
if (context == 1)
class = INDEX_REG_CLASS;
rclass = INDEX_REG_CLASS;
else
class = base_reg_class (mode, outer_code, index_code);
rclass = base_reg_class (mode, outer_code, index_code);
switch (code)
{
@ -2234,12 +2234,12 @@ record_address_regs (enum machine_mode mode, rtx x, int context,
struct costs *pp = &costs[REGNO (x)];
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])
init_move_cost (Pmode);
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;
@ -2627,7 +2627,7 @@ cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
bool
invalid_mode_change_p (unsigned int regno,
enum reg_class class ATTRIBUTE_UNUSED,
enum reg_class rclass ATTRIBUTE_UNUSED,
enum machine_mode from)
{
struct subregs_of_mode_node dummy, *node;
@ -2644,7 +2644,7 @@ invalid_mode_change_p (unsigned int regno,
mask = 1 << (regno & 7);
for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
if (node->modes[to] & mask)
if (CANNOT_CHANGE_MODE_CLASS (from, to, class))
if (CANNOT_CHANGE_MODE_CLASS (from, to, rclass))
return true;
return false;

View File

@ -222,13 +222,13 @@ regrename_optimize (void)
{
int new_reg, best_new_reg;
int n_uses;
struct du_chain *this = all_chains;
struct du_chain *this_du = all_chains;
struct du_chain *tmp, *last;
HARD_REG_SET this_unavailable;
int reg = REGNO (*this->loc);
int reg = REGNO (*this_du->loc);
int i;
all_chains = this->next_chain;
all_chains = this_du->next_chain;
best_new_reg = reg;
@ -256,7 +256,7 @@ regrename_optimize (void)
count number of uses, and narrow the set of registers we can
use for renaming. */
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++;
IOR_COMPL_HARD_REG_SET (this_unavailable,
@ -268,16 +268,16 @@ regrename_optimize (void)
IOR_COMPL_HARD_REG_SET (this_unavailable,
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);
merge_overlapping_regs (bb, &this_unavailable, this);
merge_overlapping_regs (bb, &this_unavailable, this_du);
/* Now potential_regs is a reasonable approximation, let's
have a closer look at each register still in there. */
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)
if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i)
@ -302,7 +302,7 @@ regrename_optimize (void)
/* See whether it accepts all modes that occur in
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))
|| (tmp->need_caller_save_reg
&& ! (HARD_REGNO_CALL_PART_CLOBBERED
@ -333,7 +333,7 @@ regrename_optimize (void)
continue;
}
do_replace (this, best_new_reg);
do_replace (this_du, best_new_reg);
tick[best_new_reg] = ++this_tick;
df_set_regs_ever_live (best_new_reg, true);
@ -385,15 +385,15 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
{
if (type == OP_OUT)
{
struct du_chain *this = XOBNEW (&rename_obstack, struct du_chain);
this->next_use = 0;
this->next_chain = open_chains;
this->loc = loc;
this->insn = insn;
this->cl = cl;
this->need_caller_save_reg = 0;
this->earlyclobber = earlyclobber;
open_chains = this;
struct du_chain *this_du = XOBNEW (&rename_obstack, struct du_chain);
this_du->next_use = 0;
this_du->next_chain = open_chains;
this_du->loc = loc;
this_du->insn = insn;
this_du->cl = cl;
this_du->need_caller_save_reg = 0;
this_du->earlyclobber = earlyclobber;
open_chains = this_du;
}
return;
}
@ -403,7 +403,7 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
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
the next chain.
@ -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
from terminate_write in Step 5. */
if (*this->loc == cc0_rtx)
p = &this->next_chain;
if (*this_du->loc == cc0_rtx)
p = &this_du->next_chain;
else
{
int regno = REGNO (*this->loc);
int nregs = hard_regno_nregs[regno][GET_MODE (*this->loc)];
int regno = REGNO (*this_du->loc);
int nregs = hard_regno_nregs[regno][GET_MODE (*this_du->loc)];
int exact_match = (regno == this_regno && nregs == this_nregs);
if (regno + nregs <= this_regno
|| this_regno + this_nregs <= regno)
{
p = &this->next_chain;
p = &this_du->next_chain;
continue;
}
@ -437,23 +437,23 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
be replaced with, terminate the chain. */
if (cl != NO_REGS)
{
this = XOBNEW (&rename_obstack, struct du_chain);
this->next_use = 0;
this->next_chain = (*p)->next_chain;
this->loc = loc;
this->insn = insn;
this->cl = cl;
this->need_caller_save_reg = 0;
this_du = XOBNEW (&rename_obstack, struct du_chain);
this_du->next_use = 0;
this_du->next_chain = (*p)->next_chain;
this_du->loc = loc;
this_du->insn = insn;
this_du->cl = cl;
this_du->need_caller_save_reg = 0;
while (*p)
p = &(*p)->next_use;
*p = this;
*p = this_du;
return;
}
}
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
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,
if ((action == terminate_dead || action == terminate_write)
&& exact_match)
{
this->next_chain = closed_chains;
closed_chains = this;
this_du->next_chain = closed_chains;
closed_chains = this_du;
if (dump_file)
fprintf (dump_file,
"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]);
}
else
@ -475,13 +475,13 @@ scan_rtx_reg (rtx insn, rtx *loc, enum reg_class cl,
if (dump_file)
fprintf (dump_file,
"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]);
}
*p = next;
}
else
p = &this->next_chain;
p = &this_du->next_chain;
}
}
}
@ -976,15 +976,15 @@ dump_def_use_chain (struct du_chain *chains)
{
while (chains)
{
struct du_chain *this = chains;
int r = REGNO (*this->loc);
int nregs = hard_regno_nregs[r][GET_MODE (*this->loc)];
struct du_chain *this_du = chains;
int r = REGNO (*this_du->loc);
int nregs = hard_regno_nregs[r][GET_MODE (*this_du->loc)];
fprintf (dump_file, "Register %s (%d):", reg_names[r], nregs);
while (this)
while (this_du)
{
fprintf (dump_file, " %d [%s]", INSN_UID (this->insn),
reg_class_names[this->cl]);
this = this->next_use;
fprintf (dump_file, " %d [%s]", INSN_UID (this_du->insn),
reg_class_names[this_du->cl]);
this_du = this_du->next_use;
}
fprintf (dump_file, "\n");
chains = chains->next_chain;
@ -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)
{
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))
return NULL_RTX;
new = maybe_mode_change (oldmode, vd->e[regno].mode, mode, i, regno);
if (new)
new_rtx = maybe_mode_change (oldmode, vd->e[regno].mode, mode, i, regno);
if (new_rtx)
{
ORIGINAL_REGNO (new) = ORIGINAL_REGNO (reg);
REG_ATTRS (new) = REG_ATTRS (reg);
return new;
ORIGINAL_REGNO (new_rtx) = ORIGINAL_REGNO (reg);
REG_ATTRS (new_rtx) = REG_ATTRS (reg);
return new_rtx;
}
}
@ -1389,14 +1389,14 @@ static bool
replace_oldest_value_reg (rtx *loc, enum reg_class cl, rtx insn,
struct value_data *vd)
{
rtx new = find_oldest_value_reg (cl, *loc, vd);
if (new)
rtx new_rtx = find_oldest_value_reg (cl, *loc, vd);
if (new_rtx)
{
if (dump_file)
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 false;
@ -1634,7 +1634,7 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
unsigned int regno = REGNO (src);
enum machine_mode mode = GET_MODE (src);
unsigned int i;
rtx new;
rtx new_rtx;
/* If we are accessing SRC in some mode other that what we
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)
register in the same class. */
if (REG_P (SET_DEST (set)))
{
new = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd);
if (new && validate_change (insn, &SET_SRC (set), new, 0))
new_rtx = find_oldest_value_reg (REGNO_REG_CLASS (regno), src, vd);
if (new_rtx && validate_change (insn, &SET_SRC (set), new_rtx, 0))
{
if (dump_file)
fprintf (dump_file,
"insn %u: replaced reg %u with %u\n",
INSN_UID (insn), regno, REGNO (new));
INSN_UID (insn), regno, REGNO (new_rtx));
changed = true;
goto did_replacement;
}
@ -1665,18 +1665,18 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
for (i = vd->e[regno].oldest_regno; i != 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);
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);
REG_ATTRS (new) = REG_ATTRS (src);
ORIGINAL_REGNO (new_rtx) = ORIGINAL_REGNO (src);
REG_ATTRS (new_rtx) = REG_ATTRS (src);
if (dump_file)
fprintf (dump_file,
"insn %u: replaced reg %u with %u\n",
INSN_UID (insn), regno, REGNO (new));
INSN_UID (insn), regno, REGNO (new_rtx));
changed = true;
goto did_replacement;
}
@ -1729,13 +1729,13 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
if (replaced[i])
{
int j;
rtx new;
rtx new_rtx;
new = *recog_data.operand_loc[i];
recog_data.operand[i] = new;
new_rtx = *recog_data.operand_loc[i];
recog_data.operand[i] = new_rtx;
for (j = 0; j < recog_data.n_dups; j++)
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;
}