return 0;
/* Sanity for funny modes. */
- size = HARD_REGNO_NREGS (color, GET_MODE (target->orig_x));
+ size = hard_regno_nregs[color][GET_MODE (target->orig_x)];
if (!size)
return 0;
struct web *web = u;
int nregs = 1 + v->add_hardregs;
if (u->type == PRECOLORED)
- nregs = HARD_REGNO_NREGS (u->color, GET_MODE (v->orig_x));
+ nregs = hard_regno_nregs[u->color][GET_MODE (v->orig_x)];
/* For precolored U's we need to make conflicts between V's
neighbors and as many hardregs from U as V needed if it gets
&& HARD_REGNO_MODE_OK (c, mode))
{
int i, size;
- size = HARD_REGNO_NREGS (c, mode);
+ size = hard_regno_nregs[c][mode];
for (i = 1; i < size && TEST_HARD_REG_BIT (free_colors, c + i); i++);
if (i == size)
return 1;
&& HARD_REGNO_MODE_OK (c, mode))
{
int i, size;
- size = HARD_REGNO_NREGS (c, mode);
+ size = hard_regno_nregs[c][mode];
for (i = 1; i < size && TEST_HARD_REG_BIT (free_colors, c + i); i++);
if (i != size)
{
if (ptarget->type == COLORED || ptarget->type == PRECOLORED)
{
struct web *source = (sl) ? sl->s : web;
- unsigned int tsize = HARD_REGNO_NREGS (ptarget->color,
- GET_MODE (w->orig_x));
+ unsigned int tsize = hard_regno_nregs[ptarget->color]
+ [GET_MODE (w->orig_x)];
/* ssize is only a first guess for the size. */
- unsigned int ssize = HARD_REGNO_NREGS (ptarget->color, GET_MODE
- (source->orig_x));
+ unsigned int ssize = hard_regno_nregs[ptarget->color][GET_MODE
+ (source->orig_x)];
unsigned int tofs = 0;
unsigned int sofs = 0;
/* C1 and C2 can become negative, so unsigned
c1 to a place, where the last of sources hardregs does not
overlap the first of targets colors. */
while (c1 + sofs
- + HARD_REGNO_NREGS (c1, GET_MODE (source->orig_x)) - 1
+ + hard_regno_nregs[c1][GET_MODE (source->orig_x)] - 1
< ptarget->color + tofs)
c1++;
while (c1 > 0 && c1 + sofs
- + HARD_REGNO_NREGS (c1, GET_MODE (source->orig_x)) - 1
+ + hard_regno_nregs[c1][GET_MODE (source->orig_x)] - 1
> ptarget->color + tofs)
c1--;
for (; c1 <= c2; c1++)
web->color = c;
if (flag_ra_biased)
{
- int nregs = HARD_REGNO_NREGS (c, GET_MODE (web->orig_x));
+ int nregs = hard_regno_nregs[c][GET_MODE (web->orig_x)];
for (wl = web->conflict_list; wl; wl = wl->next)
{
struct web *ptarget = alias (wl->t);
int i, nregs;
if (!HARD_REGNO_MODE_OK (c, GET_MODE (web->orig_x)))
continue;
- nregs = HARD_REGNO_NREGS (c, GET_MODE (web->orig_x));
+ nregs = hard_regno_nregs[c][GET_MODE (web->orig_x)];
for (i = 0; i < nregs; i++)
if (!TEST_HARD_REG_BIT (web->usable_regs, c + i))
break;
/* Note that min_color[] contains 1-based values (zero means
undef). */
c1 = c1 == 0 ? web2->color : (c1 - 1);
- c2 = web2->color + HARD_REGNO_NREGS (web2->color, GET_MODE
- (web2->orig_x)) - 1;
+ c2 = web2->color + hard_regno_nregs[web2->color][GET_MODE
+ (web2->orig_x)] - 1;
for (; c1 <= c2; c1++)
if (TEST_HARD_REG_BIT (possible_begin, c1))
{
int nregs;
HARD_REG_SET colors;
- nregs = HARD_REGNO_NREGS (c1, GET_MODE (web->orig_x));
+ nregs = hard_regno_nregs[c1][GET_MODE (web->orig_x)];
COPY_HARD_REG_SET (colors, web2->usable_regs);
for (; nregs--;)
CLEAR_HARD_REG_BIT (colors, c1 + nregs);
newcol = c;
if (newcol >= 0 && cost_neighbors[newcol] < web->spill_cost)
{
- int nregs = HARD_REGNO_NREGS (newcol, GET_MODE (web->orig_x));
+ int nregs = hard_regno_nregs[newcol][GET_MODE (web->orig_x)];
unsigned HOST_WIDE_INT cost = 0;
int *old_colors;
struct conflict_link *wl_next;
wl_next = wl->next;
if (web2->type == COLORED)
{
- int nregs2 = HARD_REGNO_NREGS (web2->color, GET_MODE
- (web2->orig_x));
+ int nregs2 = hard_regno_nregs[web2->color][GET_MODE
+ (web2->orig_x)];
if (web->color >= web2->color + nregs2
|| web2->color >= web->color + nregs)
continue;
int i;
int nregs = 1 + web->add_hardregs;
if (aweb->type == PRECOLORED)
- nregs = HARD_REGNO_NREGS (aweb->color, GET_MODE (web->orig_x));
+ nregs = hard_regno_nregs[aweb->color][GET_MODE (web->orig_x)];
for (i = 0; i < nregs; i++)
{
if (aweb->type == PRECOLORED)
if (aweb->type == SPILLED || web->regno >= max_normal_pseudo)
continue;
else if (aweb->type == COLORED)
- nregs = HARD_REGNO_NREGS (aweb->color, GET_MODE (web->orig_x));
+ nregs = hard_regno_nregs[aweb->color][GET_MODE (web->orig_x)];
else if (aweb->type == PRECOLORED)
nregs = 1;
else
struct web *web2 = alias (wl->t);
int nregs2;
if (web2->type == COLORED)
- nregs2 = HARD_REGNO_NREGS (web2->color, GET_MODE (web2->orig_x));
+ nregs2 = hard_regno_nregs[web2->color][GET_MODE (web2->orig_x)];
else if (web2->type == PRECOLORED)
nregs2 = 1;
else
continue;
for (sl = wl->sub; sl; sl = sl->next)
{
- int ssize = HARD_REGNO_NREGS (scol, GET_MODE (sl->s->orig_x));
- int tsize = HARD_REGNO_NREGS (tcol, GET_MODE (sl->t->orig_x));
+ int ssize = hard_regno_nregs[scol][GET_MODE (sl->s->orig_x)];
+ int tsize = hard_regno_nregs[tcol][GET_MODE (sl->t->orig_x)];
int sofs = 0, tofs = 0;
if (SUBWEB_P (sl->t)
&& GET_MODE_SIZE (GET_MODE (sl->t->orig_x)) >= UNITS_PER_WORD)
struct web *pre = web->alias;
struct conflict_link *wl;
unsigned int c = pre->color;
- unsigned int nregs = HARD_REGNO_NREGS (c, GET_MODE (web->orig_x));
+ unsigned int nregs = hard_regno_nregs[c][GET_MODE (web->orig_x)];
if (pre->type != PRECOLORED)
abort ();
unalias_web (web);
void
ra_colorize_graph (struct df *df)
{
- if (rtl_dump_file)
+ if (dump_file)
dump_igraph (df);
build_worklists (df);