From 03a75ccf13890665c526af2ed013c1bd3d043d8a Mon Sep 17 00:00:00 2001 From: rsandifo Date: Mon, 12 Jul 2010 19:04:21 +0000 Subject: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162110 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/reginfo.c | 6 +++--- gcc/target-globals.c | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f8075c596fa..0f2a7defaba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-07-12 Richard Sandiford + + * 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 * Makefile.in (bb-reorder.o, target-globals.o): Depend on bb-reorder.h diff --git a/gcc/reginfo.c b/gcc/reginfo.c index deb62b761a4..0fc86d3627f 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -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. - Once this is done, various switches may override. */ +/* Function called only once per target_globals to initialize the + target_hard_regs structure. Once this is done, various switches + may override. */ 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); #endif 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. */ diff --git a/gcc/target-globals.c b/gcc/target-globals.c index 49b9dc85457..7a4058ebd18 100644 --- a/gcc/target-globals.c +++ b/gcc/target-globals.c @@ -80,6 +80,7 @@ save_target_globals (void) g->gcse = XCNEW (struct target_gcse); g->bb_reorder = XCNEW (struct target_bb_reorder); restore_target_globals (g); + init_reg_sets (); target_reinit (); return g; } -- cgit v1.2.1