* cse.c: Update comments.

From-SVN: r94705
This commit is contained in:
Kazu Hirata 2005-02-07 17:10:27 +00:00 committed by Kazu Hirata
parent 17385e0d3b
commit 459281be31
2 changed files with 17 additions and 13 deletions

View File

@ -5,6 +5,8 @@
config/rs6000/altivec.md, config/rs6000/darwin-tramp.asm: config/rs6000/altivec.md, config/rs6000/darwin-tramp.asm:
Update copyright. Update copyright.
* cse.c: Update comments.
2005-02-07 Richard Guenther <rguenth@gcc.gnu.org> 2005-02-07 Richard Guenther <rguenth@gcc.gnu.org>
PR middle-end/19775 PR middle-end/19775

View File

@ -80,11 +80,11 @@ Registers and "quantity numbers":
copies one register into another, we copy the quantity number. copies one register into another, we copy the quantity number.
When a register is loaded in any other way, we allocate a new When a register is loaded in any other way, we allocate a new
quantity number to describe the value generated by this operation. quantity number to describe the value generated by this operation.
`reg_qty' records what quantity a register is currently thought `REG_QTY (N)' records what quantity register N is currently thought
of as containing. of as containing.
All real quantity numbers are greater than or equal to zero. All real quantity numbers are greater than or equal to zero.
If register N has not been assigned a quantity, reg_qty[N] will If register N has not been assigned a quantity, `REG_QTY (N)' will
equal -N - 1, which is always negative. equal -N - 1, which is always negative.
Quantity numbers below zero do not exist and none of the `qty_table' Quantity numbers below zero do not exist and none of the `qty_table'
@ -172,18 +172,20 @@ Other expressions:
the register's new value. This sequence of circumstances is rare the register's new value. This sequence of circumstances is rare
within any one basic block. within any one basic block.
The vectors `reg_tick' and `reg_in_table' are used to detect this case. `REG_TICK' and `REG_IN_TABLE', accessors for members of
reg_tick[i] is incremented whenever a value is stored in register i. cse_reg_info, are used to detect this case. REG_TICK (i) is
reg_in_table[i] holds -1 if no references to register i have been incremented whenever a value is stored in register i.
entered in the table; otherwise, it contains the value reg_tick[i] had REG_IN_TABLE (i) holds -1 if no references to register i have been
when the references were entered. If we want to enter a reference entered in the table; otherwise, it contains the value REG_TICK (i)
and reg_in_table[i] != reg_tick[i], we must scan and remove old references. had when the references were entered. If we want to enter a
Until we want to enter a new entry, the mere fact that the two vectors reference and REG_IN_TABLE (i) != REG_TICK (i), we must scan and
don't match makes the entries be ignored if anyone tries to match them. remove old references. Until we want to enter a new entry, the
mere fact that the two vectors don't match makes the entries be
ignored if anyone tries to match them.
Registers themselves are entered in the hash table as well as in Registers themselves are entered in the hash table as well as in
the equivalent-register chains. However, the vectors `reg_tick' the equivalent-register chains. However, `REG_TICK' and
and `reg_in_table' do not apply to expressions which are simple `REG_IN_TABLE' do not apply to expressions which are simple
register references. These expressions are removed from the table register references. These expressions are removed from the table
immediately when they become invalid, and this can be done even if immediately when they become invalid, and this can be done even if
we do not immediately search for all the expressions that refer to we do not immediately search for all the expressions that refer to
@ -289,7 +291,7 @@ static rtx this_insn;
Or -1 if this register is at the end of the chain. Or -1 if this register is at the end of the chain.
If reg_qty[N] == N, reg_eqv_table[N].next is undefined. */ If REG_QTY (N) == -N - 1, reg_eqv_table[N].next is undefined. */
/* Per-register equivalence chain. */ /* Per-register equivalence chain. */
struct reg_eqv_elem struct reg_eqv_elem