mirror of git://gcc.gnu.org/git/gcc.git
combine.c (record_dead_and_set_regs): Iterate over hard register set with a hard_reg_set_iterator.
* combine.c (record_dead_and_set_regs): Iterate over hard register set with a hard_reg_set_iterator. * cse.c (invalidate_for_call): Likewise. * gcse.c (compute_hash_table_work): Likewise. * loop-iv.c (simplify_using_initial_values): Likewise. * postreload-gcse.c (record_opr_changes): Likewise. * regcprop.c (copyprop_hardreg_forward_1): Likewise. * var-tracking.c (dataflow_set_clear_at_call): Likewise. From-SVN: r192490
This commit is contained in:
parent
909881cb25
commit
c7fb4c7aae
|
|
@ -1,3 +1,14 @@
|
||||||
|
2012-10-16 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
* combine.c (record_dead_and_set_regs): Iterate over hard register set
|
||||||
|
with a hard_reg_set_iterator.
|
||||||
|
* cse.c (invalidate_for_call): Likewise.
|
||||||
|
* gcse.c (compute_hash_table_work): Likewise.
|
||||||
|
* loop-iv.c (simplify_using_initial_values): Likewise.
|
||||||
|
* postreload-gcse.c (record_opr_changes): Likewise.
|
||||||
|
* regcprop.c (copyprop_hardreg_forward_1): Likewise.
|
||||||
|
* var-tracking.c (dataflow_set_clear_at_call): Likewise.
|
||||||
|
|
||||||
2012-10-15 Easwaran Raman <eraman@google.com>
|
2012-10-15 Easwaran Raman <eraman@google.com>
|
||||||
|
|
||||||
* optabs.c (emit_cmp_and_jump_insn_1): Add a new parameter to
|
* optabs.c (emit_cmp_and_jump_insn_1): Add a new parameter to
|
||||||
|
|
|
||||||
|
|
@ -12317,21 +12317,21 @@ record_dead_and_set_regs (rtx insn)
|
||||||
|
|
||||||
if (CALL_P (insn))
|
if (CALL_P (insn))
|
||||||
{
|
{
|
||||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
hard_reg_set_iterator hrsi;
|
||||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
|
EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, i, hrsi)
|
||||||
{
|
{
|
||||||
reg_stat_type *rsp;
|
reg_stat_type *rsp;
|
||||||
|
|
||||||
rsp = &VEC_index (reg_stat_type, reg_stat, i);
|
rsp = &VEC_index (reg_stat_type, reg_stat, i);
|
||||||
rsp->last_set_invalid = 1;
|
rsp->last_set_invalid = 1;
|
||||||
rsp->last_set = insn;
|
rsp->last_set = insn;
|
||||||
rsp->last_set_value = 0;
|
rsp->last_set_value = 0;
|
||||||
rsp->last_set_mode = VOIDmode;
|
rsp->last_set_mode = VOIDmode;
|
||||||
rsp->last_set_nonzero_bits = 0;
|
rsp->last_set_nonzero_bits = 0;
|
||||||
rsp->last_set_sign_bit_copies = 0;
|
rsp->last_set_sign_bit_copies = 0;
|
||||||
rsp->last_death = 0;
|
rsp->last_death = 0;
|
||||||
rsp->truncated_to_mode = VOIDmode;
|
rsp->truncated_to_mode = VOIDmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
last_call_luid = mem_last_set = DF_INSN_LUID (insn);
|
last_call_luid = mem_last_set = DF_INSN_LUID (insn);
|
||||||
|
|
||||||
|
|
|
||||||
24
gcc/cse.c
24
gcc/cse.c
|
|
@ -2096,24 +2096,22 @@ invalidate_for_call (void)
|
||||||
unsigned hash;
|
unsigned hash;
|
||||||
struct table_elt *p, *next;
|
struct table_elt *p, *next;
|
||||||
int in_table = 0;
|
int in_table = 0;
|
||||||
|
hard_reg_set_iterator hrsi;
|
||||||
|
|
||||||
/* Go through all the hard registers. For each that is clobbered in
|
/* Go through all the hard registers. For each that is clobbered in
|
||||||
a CALL_INSN, remove the register from quantity chains and update
|
a CALL_INSN, remove the register from quantity chains and update
|
||||||
reg_tick if defined. Also see if any of these registers is currently
|
reg_tick if defined. Also see if any of these registers is currently
|
||||||
in the table. */
|
in the table. */
|
||||||
|
EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi)
|
||||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
|
{
|
||||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
|
delete_reg_equiv (regno);
|
||||||
{
|
if (REG_TICK (regno) >= 0)
|
||||||
delete_reg_equiv (regno);
|
{
|
||||||
if (REG_TICK (regno) >= 0)
|
REG_TICK (regno)++;
|
||||||
{
|
SUBREG_TICKED (regno) = -1;
|
||||||
REG_TICK (regno)++;
|
}
|
||||||
SUBREG_TICKED (regno) = -1;
|
in_table |= (TEST_HARD_REG_BIT (hard_regs_in_table, regno) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
in_table |= (TEST_HARD_REG_BIT (hard_regs_in_table, regno) != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* In the case where we have no call-clobbered hard registers in the
|
/* In the case where we have no call-clobbered hard registers in the
|
||||||
table, we are done. Otherwise, scan the table and remove any
|
table, we are done. Otherwise, scan the table and remove any
|
||||||
|
|
|
||||||
|
|
@ -1519,9 +1519,10 @@ compute_hash_table_work (struct hash_table_d *table)
|
||||||
|
|
||||||
if (CALL_P (insn))
|
if (CALL_P (insn))
|
||||||
{
|
{
|
||||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
|
hard_reg_set_iterator hrsi;
|
||||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
|
EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call,
|
||||||
record_last_reg_set_info (insn, regno);
|
0, regno, hrsi)
|
||||||
|
record_last_reg_set_info (insn, regno);
|
||||||
|
|
||||||
if (! RTL_CONST_OR_PURE_CALL_P (insn))
|
if (! RTL_CONST_OR_PURE_CALL_P (insn))
|
||||||
record_last_mem_set_info (insn);
|
record_last_mem_set_info (insn);
|
||||||
|
|
|
||||||
|
|
@ -1964,12 +1964,12 @@ simplify_using_initial_values (struct loop *loop, enum rtx_code op, rtx *expr)
|
||||||
note_stores (PATTERN (insn), mark_altered, this_altered);
|
note_stores (PATTERN (insn), mark_altered, this_altered);
|
||||||
if (CALL_P (insn))
|
if (CALL_P (insn))
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
/* Kill all call clobbered registers. */
|
/* Kill all call clobbered registers. */
|
||||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
unsigned int i;
|
||||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
|
hard_reg_set_iterator hrsi;
|
||||||
SET_REGNO_REG_SET (this_altered, i);
|
EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call,
|
||||||
|
0, i, hrsi)
|
||||||
|
SET_REGNO_REG_SET (this_altered, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (suitable_set_for_replacement (insn, &dest, &src))
|
if (suitable_set_for_replacement (insn, &dest, &src))
|
||||||
|
|
|
||||||
|
|
@ -736,10 +736,9 @@ record_opr_changes (rtx insn)
|
||||||
{
|
{
|
||||||
unsigned int regno;
|
unsigned int regno;
|
||||||
rtx link, x;
|
rtx link, x;
|
||||||
|
hard_reg_set_iterator hrsi;
|
||||||
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
|
EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi)
|
||||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
|
record_last_reg_set_info_regno (insn, regno);
|
||||||
record_last_reg_set_info_regno (insn, regno);
|
|
||||||
|
|
||||||
for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
|
for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
|
||||||
if (GET_CODE (XEXP (link, 0)) == CLOBBER)
|
if (GET_CODE (XEXP (link, 0)) == CLOBBER)
|
||||||
|
|
|
||||||
|
|
@ -990,9 +990,12 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
|
||||||
/* Clobber call-clobbered registers. */
|
/* Clobber call-clobbered registers. */
|
||||||
if (CALL_P (insn))
|
if (CALL_P (insn))
|
||||||
{
|
{
|
||||||
int set_regno = INVALID_REGNUM;
|
unsigned int set_regno = INVALID_REGNUM;
|
||||||
int set_nregs = 0;
|
unsigned int set_nregs = 0;
|
||||||
|
unsigned int regno;
|
||||||
rtx exp;
|
rtx exp;
|
||||||
|
hard_reg_set_iterator hrsi;
|
||||||
|
|
||||||
for (exp = CALL_INSN_FUNCTION_USAGE (insn); exp; exp = XEXP (exp, 1))
|
for (exp = CALL_INSN_FUNCTION_USAGE (insn); exp; exp = XEXP (exp, 1))
|
||||||
{
|
{
|
||||||
rtx x = XEXP (exp, 0);
|
rtx x = XEXP (exp, 0);
|
||||||
|
|
@ -1009,10 +1012,10 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
|
||||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
|
EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi)
|
||||||
&& (i < set_regno || i >= set_regno + set_nregs))
|
if (regno < set_regno || regno >= set_regno + set_nregs)
|
||||||
kill_value_regno (i, 1, vd);
|
kill_value_regno (regno, 1, vd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Notice stores. */
|
/* Notice stores. */
|
||||||
|
|
|
||||||
|
|
@ -4680,11 +4680,11 @@ dataflow_set_remove_mem_locs (void **slot, void *data)
|
||||||
static void
|
static void
|
||||||
dataflow_set_clear_at_call (dataflow_set *set)
|
dataflow_set_clear_at_call (dataflow_set *set)
|
||||||
{
|
{
|
||||||
int r;
|
unsigned int r;
|
||||||
|
hard_reg_set_iterator hrsi;
|
||||||
|
|
||||||
for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
|
EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, r, hrsi)
|
||||||
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, r))
|
var_regno_delete (set, r);
|
||||||
var_regno_delete (set, r);
|
|
||||||
|
|
||||||
if (MAY_HAVE_DEBUG_INSNS)
|
if (MAY_HAVE_DEBUG_INSNS)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue