summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-19 17:17:14 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-19 17:17:14 +0000
commitc950adc6e1f2c8cab7e6bfa81c22b25158623e69 (patch)
tree636c6c6ae7b7900c93b28174728969e1fb0ea8bc
parent31a2d6c7fcdd06af12f9672d23531fd663e051fa (diff)
downloadgcc-c950adc6e1f2c8cab7e6bfa81c22b25158623e69.tar.gz
2009-01-19 Vladimir Makarov <vmakarov@redhat.com>
PR c/38869 * rtl.h (reinit_regs): New prototype. * regclass.c: Include ira.h. (reinit_regs): New. * Makefile.in (regclass.o): Add ira.h. * config/i386/i386.c (ix86_maybe_switch_abi): Use reinit_regs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143498 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/regclass.c12
-rw-r--r--gcc/rtl.h1
5 files changed, 24 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76c5e15a420..c36c6122fd4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-19 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR c/38869
+ * rtl.h (reinit_regs): New prototype.
+ * regclass.c: Include ira.h.
+ (reinit_regs): New.
+ * Makefile.in (regclass.o): Add ira.h.
+ * config/i386/i386.c (ix86_maybe_switch_abi): Use reinit_regs.
+
2009-01-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/38736
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 309a6425ad5..595366812ea 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2848,7 +2848,7 @@ regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) insn-config.h \
$(RECOG_H) reload.h $(REAL_H) $(TOPLEV_H) $(FUNCTION_H) output.h $(GGC_H) \
$(TM_P_H) $(EXPR_H) $(TIMEVAR_H) gt-regclass.h $(HASHTAB_H) \
- $(TARGET_H) tree-pass.h $(DF_H)
+ $(TARGET_H) tree-pass.h $(DF_H) ira.h
local-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(RTL_H) $(FLAGS_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
output.h $(FUNCTION_H) $(INSN_ATTR_H) $(TOPLEV_H) except.h reload.h $(TM_P_H) \
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d02f5c16fae..d7e56bdd96d 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4624,7 +4624,7 @@ ix86_maybe_switch_abi (void)
{
if (TARGET_64BIT &&
call_used_regs[4 /*RSI*/] == (cfun->machine->call_abi == MS_ABI))
- init_regs ();
+ reinit_regs ();
}
/* Initialize a variable CUM of type CUMULATIVE_ARGS
diff --git a/gcc/regclass.c b/gcc/regclass.c
index f31ccd15e40..2f665d874a3 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "tree-pass.h"
#include "df.h"
+#include "ira.h"
/* Maximum register number used in this function, plus one. */
@@ -740,6 +741,17 @@ init_regs (void)
init_reg_autoinc ();
}
+/* The same as previous function plus initializing IRA if it is
+ necessary. */
+void
+reinit_regs (void)
+{
+ init_regs ();
+
+ if (flag_ira)
+ ira_init ();
+}
+
/* Initialize some fake stack-frame MEM references for use in
memory_move_secondary_cost. */
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 5bd79053c1d..5394ea6f6e2 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2230,6 +2230,7 @@ extern int reg_class_subset_p (enum reg_class, enum reg_class);
extern void globalize_reg (int);
extern void init_reg_modes_target (void);
extern void init_regs (void);
+extern void reinit_regs (void);
extern void init_fake_stack_mems (void);
extern void save_register_info (void);
extern void init_reg_sets (void);