diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2012-10-16 07:46:11 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2012-10-16 07:46:11 +0000 |
commit | 2a13d4c023874ad4cd36ee4dfb8d3c1b7763ed4b (patch) | |
tree | 7cc7af884adbbe7057d2fd5848ebd5f7283ab7c8 /gcc/cse.c | |
parent | 270a68d654b3b8c0e849268a528e570a5c7cd389 (diff) |
* 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.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@192490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 16255988fc5..b5631f363da 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -2096,24 +2096,22 @@ invalidate_for_call (void) unsigned hash; struct table_elt *p, *next; int in_table = 0; + hard_reg_set_iterator hrsi; /* Go through all the hard registers. For each that is clobbered in a CALL_INSN, remove the register from quantity chains and update reg_tick if defined. Also see if any of these registers is currently in the table. */ - - 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) - { - REG_TICK (regno)++; - SUBREG_TICKED (regno) = -1; - } - - in_table |= (TEST_HARD_REG_BIT (hard_regs_in_table, regno) != 0); - } + EXECUTE_IF_SET_IN_HARD_REG_SET (regs_invalidated_by_call, 0, regno, hrsi) + { + delete_reg_equiv (regno); + if (REG_TICK (regno) >= 0) + { + REG_TICK (regno)++; + SUBREG_TICKED (regno) = -1; + } + 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 table, we are done. Otherwise, scan the table and remove any |