mirror of git://gcc.gnu.org/git/gcc.git
reginfo.c (init_reg_sets): Don't zero globals here.
gcc/ * reginfo.c (init_reg_sets): Don't zero globals here. Update comment to say that the function can be called more than once. * target-globals.c (save_target_globals): Call init_reg_sets. From-SVN: r162110
This commit is contained in:
parent
76ee381a9c
commit
77f558794e
|
|
@ -1,3 +1,9 @@
|
||||||
|
2010-07-12 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
|
* reginfo.c (init_reg_sets): Don't zero globals here. Update comment
|
||||||
|
to say that the function can be called more than once.
|
||||||
|
* target-globals.c (save_target_globals): Call init_reg_sets.
|
||||||
|
|
||||||
2010-07-12 Richard Sandiford <rdsandiford@googlemail.com>
|
2010-07-12 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
* Makefile.in (bb-reorder.o, target-globals.o): Depend on bb-reorder.h
|
* Makefile.in (bb-reorder.o, target-globals.o): Depend on bb-reorder.h
|
||||||
|
|
|
||||||
|
|
@ -142,8 +142,9 @@ reg_set_to_hard_reg_set (HARD_REG_SET *to, const_bitmap from)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function called only once to initialize the above data on reg usage.
|
/* Function called only once per target_globals to initialize the
|
||||||
Once this is done, various switches may override. */
|
target_hard_regs structure. Once this is done, various switches
|
||||||
|
may override. */
|
||||||
void
|
void
|
||||||
init_reg_sets (void)
|
init_reg_sets (void)
|
||||||
{
|
{
|
||||||
|
|
@ -186,7 +187,6 @@ init_reg_sets (void)
|
||||||
memcpy (reg_alloc_order, initial_reg_alloc_order, sizeof reg_alloc_order);
|
memcpy (reg_alloc_order, initial_reg_alloc_order, sizeof reg_alloc_order);
|
||||||
#endif
|
#endif
|
||||||
memcpy (reg_names, initial_reg_names, sizeof reg_names);
|
memcpy (reg_names, initial_reg_names, sizeof reg_names);
|
||||||
memset (global_regs, 0, sizeof global_regs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize may_move_cost and friends for mode M. */
|
/* Initialize may_move_cost and friends for mode M. */
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@ save_target_globals (void)
|
||||||
g->gcse = XCNEW (struct target_gcse);
|
g->gcse = XCNEW (struct target_gcse);
|
||||||
g->bb_reorder = XCNEW (struct target_bb_reorder);
|
g->bb_reorder = XCNEW (struct target_bb_reorder);
|
||||||
restore_target_globals (g);
|
restore_target_globals (g);
|
||||||
|
init_reg_sets ();
|
||||||
target_reinit ();
|
target_reinit ();
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue