#include "config.h"
#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
#include "rtl.h"
#include "tm_p.h"
#include "function.h"
backed by a new pseudo, but conceptually can stand for a stackslot,
i.e. it doesn't really matter if they get a color or not), on
the SELECT stack first, those with lowest cost first. This way
- they will be colored last, so do not contrain the coloring of the
+ they will be colored last, so do not constrain the coloring of the
normal webs. But still those with the highest count are colored
before, i.e. get a color more probable. The use of stackregs is
a pure optimization, and all would work, if we used real stackslots
struct web *u, *v;
{
regset seen;
- struct move_list *ml;
+ struct move_list *ml, *ml_next;
seen = BITMAP_XMALLOC ();
for (ml = u->moves; ml; ml = ml->next)
bitmap_set_bit (seen, INSN_UID (ml->move->insn));
- for (ml = v->moves; ml; ml = ml->next)
+ for (ml = v->moves; ml; ml = ml_next)
{
+ ml_next = ml->next;
if (! bitmap_bit_p (seen, INSN_UID (ml->move->insn)))
{
ml->next = u->moves;
int c = -1;
int bestc = -1;
int neighbor_needs= 0;
- struct web *fat_neighbor = NULL;
struct web *fats_parent = NULL;
int num_fat = 0;
int long_blocks = 0;
HARD_REG_SET fat_colors;
HARD_REG_SET bias;
+ CLEAR_HARD_REG_SET (fat_colors);
+
if (web->regno >= max_normal_pseudo)
hard = 0;
&& w->add_hardregs >= neighbor_needs)
{
neighbor_needs = w->add_hardregs;
- fat_neighbor = w;
fats_parent = ptarget;
num_fat++;
}
HARD_REG_SET call_clobbered;
/* Here we choose a hard-reg for the current web. For non spill
- temporaries we first search in the hardregs for it's prefered
+ temporaries we first search in the hardregs for it's preferred
class, then, if we found nothing appropriate, in those of the
alternate class. For spill temporaries we only search in
usable_regs of this web (which is probably larger than that of
else
COPY_HARD_REG_SET (colors,
usable_regs[reg_preferred_class (web->regno)]);
-#ifdef CLASS_CANNOT_CHANGE_MODE
+#ifdef CANNOT_CHANGE_MODE_CLASS
if (web->mode_changed)
- AND_COMPL_HARD_REG_SET (colors, reg_class_contents[
- (int) CLASS_CANNOT_CHANGE_MODE]);
+ AND_COMPL_HARD_REG_SET (colors, invalid_mode_change_regs);
#endif
COPY_HARD_REG_SET (call_clobbered, colors);
AND_HARD_REG_SET (call_clobbered, call_used_reg_set);
else
IOR_HARD_REG_SET (colors, usable_regs
[reg_alternate_class (web->regno)]);
-#ifdef CLASS_CANNOT_CHANGE_MODE
+#ifdef CANNOT_CHANGE_MODE_CLASS
if (web->mode_changed)
- AND_COMPL_HARD_REG_SET (colors, reg_class_contents[
- (int) CLASS_CANNOT_CHANGE_MODE]);
+ AND_COMPL_HARD_REG_SET (colors, invalid_mode_change_regs);
#endif
COPY_HARD_REG_SET (call_clobbered, colors);
AND_HARD_REG_SET (call_clobbered, call_used_reg_set);
struct web *aw = alias (w);
/* If we are a spill-temp, we also look at webs coalesced
to precolored ones. Otherwise we only look at webs which
- themself were colored, or coalesced to one. */
+ themselves were colored, or coalesced to one. */
if (aw->type == PRECOLORED && w != aw && web->spill_temp
&& flag_ra_optimistic_coalescing)
{
set_cand (6, aw);
/* For boehm-gc/misc.c. If we are a difficult spilltemp,
also coalesced neighbors are a chance, _even_ if they
- too are spilltemps. At least their coalscing can be
+ too are spilltemps. At least their coalescing can be
broken up, which may be reset usable_regs, and makes
it easier colorable. */
if (web->spill_temp != 2 && aw->is_coalesced
while (WEBS(SELECT))
{
- struct web *web;
d = pop_list (&WEBS(SELECT));
- web = DLIST_WEB (d);
colorize_one_web (DLIST_WEB (d), 1);
}
}
/* Mark colors for which some wide webs are involved. For
those the independent sets are not simply one-node graphs, so
- they can't be recolored independ from their neighborhood. This
+ they can't be recolored independent from their neighborhood. This
means, that our cost calculation can be incorrect (assuming it
can avoid spilling a web because it thinks some colors are available,
although it's neighbors which itself need recoloring might take
if (!TEST_HARD_REG_BIT (web->usable_regs, aweb->color + c))
abort ();
/* Search the original (pre-coalesce) conflict list. In the current
- one some inprecise conflicts may be noted (due to combine() or
+ one some imprecise conflicts may be noted (due to combine() or
insert_coalesced_conflicts() relocating partial conflicts) making
it look like some wide webs are in conflict and having the same
color. */
put_web (DLIST_WEB (d), INITIAL);
while ((d = pop_list (&WEBS(INITIAL))) != NULL)
{
- struct web *web =DLIST_WEB (d);
+ struct web *web = DLIST_WEB (d);
struct web *wnext;
web->orig_conflict_list = NULL;
web->conflict_list = NULL;