* 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
+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
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",
&& 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]);
}
/* 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;
{
tree id;
- if (public && USE_LINKONCE_INDIRECT)
+ if (is_public && USE_LINKONCE_INDIRECT)
{
char *ref_name = XALLOCAVEC (char, strlen (str) + sizeof "DW.ref.");
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;
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;
}
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 *
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
push_sleb128 (&crtl->eh.action_record_data, next);
}
- return new->offset;
+ return new_ar->offset;
}
static int
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;
node = varpool_node (type);
if (node)
varpool_mark_needed_node (node);
- public = TREE_PUBLIC (type);
+ is_public = TREE_PUBLIC (type);
}
}
else
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
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);
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;
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);
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)
}
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:
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. */
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)
{
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
{
/* 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);
}
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;
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. */
&& 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;
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;
|| 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,
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)))
{
/* 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)
{
/* 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
/* 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
/* 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)
{
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)
/* 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;
|| 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,
unsignedp, methods);
if (temp)
{
- if (class != MODE_INT
+ if (mclass != MODE_INT
|| !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode),
GET_MODE_BITSIZE (wider_mode)))
{
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);
/* 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;
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);
/* 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;
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);
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);
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;
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;
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))
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)))
{
/* 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)
{
/* 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;
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)
{
if (target == 0)
target = gen_reg_rtx (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. */
return;
}
- if (!CLASS_HAS_WIDER_MODES_P (class))
+ if (!CLASS_HAS_WIDER_MODES_P (mclass))
break;
wider_mode = GET_MODE_WIDER_MODE (wider_mode);
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;
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;
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))))
op_alt_regno[i][j] = regno;
}
j++;
- class = (int) NO_REGS;
+ rclass = (int) NO_REGS;
break;
}
p += CONSTRAINT_LEN (c, p);
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;
}
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 = ®_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 ();
}
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;
&& 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;
}
/* 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;
/* 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;
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)
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);
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
{
/* 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
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);
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));
/* 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)
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;
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.
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);
}
}
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)
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. */
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)
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++)
{
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;
}
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;
}
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);
}
}
{
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)
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;
}
}
}
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;
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
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));
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. */
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)
{
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;
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;
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;
{
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;
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,
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)
/* 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
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);
{
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;
}
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.
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;
}
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.
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
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;
}
}
}
{
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;
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;
}
}
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;
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. */
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;
}
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;
}
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;
}