From 360d045b059b4ca15f440fa0db81a0dac9d744ba Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 12 Jul 2010 18:53:42 +0000 Subject: [PATCH] Makefile.in (reginfo.o): Don't depend on $(GGC_H) or gt-reginfo.h. gcc/ * Makefile.in (reginfo.o): Don't depend on $(GGC_H) or gt-reginfo.h. (GTFILES): Remove reginfo.c. * rtl.h (target_rtl): Add x_top_of_stack. (top_of_stack): New macro. * reginfo.c: Don't include ggc.h or gt-reginfo.h. (top_of_stack): Delete. From-SVN: r162091 --- gcc/ChangeLog | 9 +++++++++ gcc/Makefile.in | 8 ++++---- gcc/reginfo.c | 6 ------ gcc/rtl.h | 5 +++++ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36f4ea62ea2..ff43917f4c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2010-07-12 Richard Sandiford + + * Makefile.in (reginfo.o): Don't depend on $(GGC_H) or gt-reginfo.h. + (GTFILES): Remove reginfo.c. + * rtl.h (target_rtl): Add x_top_of_stack. + (top_of_stack): New macro. + * reginfo.c: Don't include ggc.h or gt-reginfo.h. + (top_of_stack): Delete. + 2010-07-12 Richard Sandiford * regs.h (target_regs): Add x_hard_regs_of_mode, x_contains_reg_of_mode, diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 919c5ae8c5e..4c7c0cd6ded 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3260,9 +3260,9 @@ combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) $(TM_P_H) $(TREE_H) $(TARGET_H) output.h $(PARAMS_H) $(OPTABS_H) \ insn-codes.h $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) vecprim.h $(CGRAPH_H) reginfo.o : reginfo.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 $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) $(FUNCTION_H) output.h $(GGC_H) \ - $(TM_P_H) $(EXPR_H) $(TIMEVAR_H) gt-reginfo.h $(HASHTAB_H) \ + hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) addresses.h $(REGS_H) \ + insn-config.h $(RECOG_H) reload.h $(TOPLEV_H) $(DIAGNOSTIC_CORE_H) \ + $(FUNCTION_H) output.h $(TM_P_H) $(EXPR_H) $(TIMEVAR_H) $(HASHTAB_H) \ $(TARGET_H) $(TREE_PASS_H) $(DF_H) ira.h bitmap.o : bitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ $(FLAGS_H) $(GGC_H) gt-bitmap.h $(BITMAP_H) $(OBSTACK_H) $(HASHTAB_H) @@ -3730,7 +3730,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ $(srcdir)/expr.h \ $(srcdir)/function.c $(srcdir)/except.c \ $(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \ - $(srcdir)/profile.c $(srcdir)/reginfo.c $(srcdir)/mcf.c \ + $(srcdir)/profile.c $(srcdir)/mcf.c \ $(srcdir)/reg-stack.c $(srcdir)/cfglayout.c $(srcdir)/cfglayout.h \ $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \ $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \ diff --git a/gcc/reginfo.c b/gcc/reginfo.c index f17084c46ef..deb62b761a4 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -46,7 +46,6 @@ along with GCC; see the file COPYING3. If not see #include "toplev.h" #include "diagnostic-core.h" #include "output.h" -#include "ggc.h" #include "timevar.h" #include "hashtab.h" #include "target.h" @@ -121,9 +120,6 @@ const char * reg_class_names[] = REG_CLASS_NAMES; #define last_mode_for_init_move_cost \ (this_target_regs->x_last_mode_for_init_move_cost) -/* Sample MEM values for use by memory_move_secondary_cost. */ -static GTY(()) rtx top_of_stack[MAX_MACHINE_MODE]; - /* No more global register variables may be declared; true once reginfo has been initialized. */ static int no_global_reg_vars = 0; @@ -1347,5 +1343,3 @@ finish_subregs_of_mode (void) } #endif /* CANNOT_CHANGE_MODE_CLASS */ - -#include "gt-reginfo.h" diff --git a/gcc/rtl.h b/gcc/rtl.h index 366b5fd8795..aef8da5dc55 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2038,6 +2038,9 @@ struct GTY(()) target_rtl { They are initialized once per compilation unit, then copied into regno_reg_rtx at the beginning of each function. */ rtx x_initial_regno_reg_rtx[FIRST_PSEUDO_REGISTER]; + + /* A sample (mem:M stack_pointer_rtx) rtx for each mode M. */ + rtx x_top_of_stack[MAX_MACHINE_MODE]; }; extern GTY(()) struct target_rtl default_target_rtl; @@ -2053,6 +2056,8 @@ extern struct target_rtl *this_target_rtl; (this_target_rtl->x_pic_offset_table_rtx) #define return_address_pointer_rtx \ (this_target_rtl->x_return_address_pointer_rtx) +#define top_of_stack \ + (this_target_rtl->x_top_of_stack) /* Standard pieces of rtx, to be substituted directly into things. */ #define pc_rtx (global_rtl[GR_PC])