GCC Middle and Back End API Reference
|
Data Fields | |
rtx | last_death |
rtx | last_set |
rtx | last_set_value |
int | last_set_table_tick |
int | last_set_label |
unsigned HOST_WIDE_INT | last_set_nonzero_bits |
char | last_set_sign_bit_copies |
rtx reg_stat_struct::last_death |
Record last point of death of (hard or pseudo) register n.
rtx reg_stat_struct::last_set |
Record last point of modification of (hard or pseudo) register n.
int reg_stat_struct::last_set_label |
Record the value of label_tick when the value for register n is placed in last_set_value.
unsigned HOST_WIDE_INT reg_stat_struct::last_set_nonzero_bits |
These fields are maintained in parallel with last_set_value and are used to store the mode in which the register was last set, the bits that were known to be zero when it was last set, and the number of sign bits copies it was known to have when it was last set.
char reg_stat_struct::last_set_sign_bit_copies |
Referenced by rtx_equal_for_field_assignment_p().
int reg_stat_struct::last_set_table_tick |
Record the value of label_tick when an expression involving register n is placed in last_set_value.
rtx reg_stat_struct::last_set_value |
The next group of fields allows the recording of the last value assigned to (hard or pseudo) register n. We use this information to see if an operation being processed is redundant given a prior operation performed on the register. For example, an `and' with a constant is redundant if all the zero bits are already known to be turned off.
We use an approach similar to that used by cse, but change it in the following ways:
(1) We do not want to reinitialize at each label. (2) It is useful, but not critical, to know the actual value assigned to a register. Often just its form is helpful.
Therefore, we maintain the following fields:
last_set_value the last value assigned last_set_label records the value of label_tick when the register was assigned last_set_table_tick records the value of label_tick when a value using the register is assigned last_set_invalid set to nonzero when it is not valid to use the value of this register in some register's value
To understand the usage of these tables, it is important to understand the distinction between the value in last_set_value being valid and the register being validly contained in some other expression in the table.
(The next two parameters are out of date).
reg_stat[i].last_set_value is valid if it is nonzero, and either reg_n_sets[i] is 1 or reg_stat[i].last_set_label == label_tick.
Register I may validly appear in any expression returned for the value of another register if reg_n_sets[i] is 1. It may also appear in the value for register J if reg_stat[j].last_set_invalid is zero, or reg_stat[i].last_set_label < reg_stat[j].last_set_label.
If an expression is found in the table containing a register which may not validly appear in an expression, the register is replaced by something that won't match, (clobber (const_int 0)). Record last value assigned to (hard or pseudo) register n.