mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 05:10:25 +08:00
regs.h (reg_n_max): Don't declare.
* regs.h (reg_n_max): Don't declare. * flow.c (reg_n_max): Don't define. * regclass.c (renumber): Don't initialize to zero. (regno_allocated): Likewise. (reg_n_max): Define. (allocate_reg_info): Don't initialize unnecessarily. From-SVN: r33374
This commit is contained in:
parent
214701e2c3
commit
da668e9c92
@ -1,3 +1,12 @@
|
||||
2000-04-24 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* regs.h (reg_n_max): Don't declare.
|
||||
* flow.c (reg_n_max): Don't define.
|
||||
* regclass.c (renumber): Don't initialize to zero.
|
||||
(regno_allocated): Likewise.
|
||||
(reg_n_max): Define.
|
||||
(allocate_reg_info): Don't initialize unnecessarily.
|
||||
|
||||
Mon Apr 24 00:21:36 2000 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* genattrtab.c (find_attr): Initialize unsigned_p, func_units_p
|
||||
|
@ -221,10 +221,6 @@ int max_regno;
|
||||
|
||||
varray_type reg_n_info;
|
||||
|
||||
/* Size of the reg_n_info table. */
|
||||
|
||||
unsigned int reg_n_max;
|
||||
|
||||
/* Size of a regset for the current function,
|
||||
in (1) bytes and (2) elements. */
|
||||
|
||||
|
@ -1983,8 +1983,9 @@ auto_inc_dec_reg_p (reg, mode)
|
||||
}
|
||||
#endif
|
||||
|
||||
static short *renumber = (short *)0;
|
||||
static size_t regno_allocated = 0;
|
||||
static short *renumber;
|
||||
static size_t regno_allocated;
|
||||
static unsigned int reg_n_max;
|
||||
|
||||
/* Allocate enough space to hold NUM_REGS registers for the tables used for
|
||||
reg_scan and flow_analysis that are indexed by the register number. If
|
||||
@ -2003,7 +2004,6 @@ allocate_reg_info (num_regs, new_p, renumber_p)
|
||||
size_t size_renumber;
|
||||
size_t min = (new_p) ? 0 : reg_n_max;
|
||||
struct reg_info_data *reg_data;
|
||||
struct reg_info_data *reg_next;
|
||||
|
||||
if (num_regs > regno_allocated)
|
||||
{
|
||||
@ -2056,34 +2056,34 @@ allocate_reg_info (num_regs, new_p, renumber_p)
|
||||
{
|
||||
/* Loop through each of the segments allocated for the actual
|
||||
reg_info pages, and set up the pointers, zero the pages, etc. */
|
||||
for (reg_data = reg_info_head; reg_data; reg_data = reg_next)
|
||||
for (reg_data = reg_info_head;
|
||||
reg_data && reg_data->max_index >= min;
|
||||
reg_data = reg_data->next)
|
||||
{
|
||||
size_t min_index = reg_data->min_index;
|
||||
size_t max_index = reg_data->max_index;
|
||||
size_t max = MIN (max_index, num_regs);
|
||||
size_t local_min = min - min_index;
|
||||
size_t i;
|
||||
|
||||
reg_next = reg_data->next;
|
||||
if (min <= max_index)
|
||||
if (reg_data->min_index > num_regs)
|
||||
continue;
|
||||
|
||||
if (min < min_index)
|
||||
local_min = 0;
|
||||
if (!reg_data->used_p) /* page just allocated with calloc */
|
||||
reg_data->used_p = 1; /* no need to zero */
|
||||
else
|
||||
bzero ((char *) ®_data->data[local_min],
|
||||
sizeof (reg_info) * (max - min_index - local_min + 1));
|
||||
|
||||
for (i = min_index+local_min; i <= max; i++)
|
||||
{
|
||||
size_t max = max_index;
|
||||
size_t local_min = min - min_index;
|
||||
size_t i;
|
||||
|
||||
if (min < min_index)
|
||||
local_min = 0;
|
||||
if (!reg_data->used_p) /* page just allocated with calloc */
|
||||
reg_data->used_p = 1; /* no need to zero */
|
||||
else
|
||||
bzero ((char *) ®_data->data[local_min],
|
||||
sizeof (reg_info) * (max - min_index - local_min + 1));
|
||||
|
||||
for (i = min_index+local_min; i <= max; i++)
|
||||
{
|
||||
VARRAY_REG (reg_n_info, i) = ®_data->data[i-min_index];
|
||||
REG_BASIC_BLOCK (i) = REG_BLOCK_UNKNOWN;
|
||||
renumber[i] = -1;
|
||||
reg_pref_buffer[i].prefclass = (char) NO_REGS;
|
||||
reg_pref_buffer[i].altclass = (char) NO_REGS;
|
||||
}
|
||||
VARRAY_REG (reg_n_info, i) = ®_data->data[i-min_index];
|
||||
REG_BASIC_BLOCK (i) = REG_BLOCK_UNKNOWN;
|
||||
renumber[i] = -1;
|
||||
reg_pref_buffer[i].prefclass = (char) NO_REGS;
|
||||
reg_pref_buffer[i].altclass = (char) NO_REGS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,8 +60,6 @@ typedef struct reg_info_def
|
||||
|
||||
extern varray_type reg_n_info;
|
||||
|
||||
extern unsigned int reg_n_max;
|
||||
|
||||
/* Indexed by n, gives number of times (REG n) is used or set.
|
||||
References within loops may be counted more times. */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user