This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove new-ra
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 16 Jan 2005 13:08:57 +0100
- Subject: [PATCH] Remove new-ra
Bootstrapped, regtested on powerpc-darwin (all languages).
Will commit soon as preapproved by Mark.
Paolo
2005-01-15 Paolo Bonzini <bonzini@gnu.org>
* common.opt (-fnew-ra): Remove.
* ra*.*: Remove.
* toplev.h (flag_new_regalloc): Remove.
* Makefile.in (ra*.*): Don't mention.
* passes.c (rest_of_handle_new_regalloc): Remove.
(rest_of_handle_combine, rest_of_compilation): Always consider
flag_new_regalloc as false.
* doc/invoke.texi: Don't document -fnew-ra.
Index: common.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/common.opt,v
retrieving revision 1.59
diff -u -r1.59 common.opt
--- common.opt 28 Oct 2004 03:42:22 -0000 1.59
+++ common.opt 16 Jan 2005 12:02:30 -0000
@@ -539,10 +539,6 @@
Common RejectNegative Report Var(flag_mudflap_ignore_reads)
Ignore read operations when inserting mudflap instrumentation.
-fnew-ra
-Common Report Var(flag_new_regalloc)
-Use graph-coloring register allocation
-
freschedule-modulo-scheduled-loops
Common Report Var(flag_resched_modulo_sched)
Enable/Disable the traditional scheduling in loops that already passed modulo scheduling
Index: toplev.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.h,v
retrieving revision 1.132
diff -u -r1.132 toplev.h
--- toplev.h 12 Nov 2004 02:24:51 -0000 1.132
+++ toplev.h 16 Jan 2005 12:02:30 -0000
@@ -134,7 +134,6 @@
extern int flag_unswitch_loops;
extern int flag_cprop_registers;
extern int time_report;
-extern int flag_new_regalloc;
extern int flag_tree_based_profiling;
/* Things to do with target switches. */
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1437
diff -u -r1.1437 Makefile.in
--- Makefile.in 22 Dec 2004 17:22:59 -0000 1.1437
+++ Makefile.in 16 Jan 2005 12:02:55 -0000
@@ -703,7 +703,6 @@
EXPR_H = expr.h insn-config.h function.h $(RTL_H) $(FLAGS_H) $(TREE_H) $(MACHMODE_H) $(EMIT_RTL_H)
OPTABS_H = optabs.h insn-codes.h
REGS_H = regs.h varray.h $(MACHMODE_H) $(OBSTACK_H) $(BASIC_BLOCK_H)
-RA_H = ra.h bitmap.h sbitmap.h hard-reg-set.h insn-modes.h
RESOURCE_H = resource.h hard-reg-set.h
SCHED_INT_H = sched-int.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H)
INTEGRATE_H = integrate.h varray.h
@@ -919,8 +918,7 @@
loop.o modulo-sched.o optabs.o options.o opts.o \
params.o postreload.o postreload-gcse.o predict.o \
insn-preds.o pointer-set.o postreload.o \
- print-rtl.o print-tree.o value-prof.o var-tracking.o \
- profile.o ra.o ra-build.o ra-colorize.o ra-debug.o ra-rewrite.o \
+ print-rtl.o print-tree.o profile.o value-prof.o var-tracking.o \
real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
@@ -2063,20 +2061,6 @@
varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) varray.h $(GGC_H) errors.h \
$(HASHTAB_H)
vec.o : vec.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) coretypes.h vec.h $(GGC_H) errors.h
-ra.o : ra.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TM_P_H) insn-config.h \
- $(RECOG_H) $(INTEGRATE_H) function.h $(REGS_H) $(OBSTACK_H) hard-reg-set.h \
- $(BASIC_BLOCK_H) $(DF_H) $(EXPR_H) output.h toplev.h $(FLAGS_H) reload.h $(RA_H)
-ra-build.o : ra-build.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TM_P_H) \
- insn-config.h $(RECOG_H) function.h $(REGS_H) hard-reg-set.h \
- $(BASIC_BLOCK_H) $(DF_H) output.h $(GGC_H) $(RA_H) gt-ra-build.h reload.h
-ra-colorize.o : ra-colorize.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TM_P_H) function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) output.h $(RA_H)
-ra-debug.o : ra-debug.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- insn-config.h $(RECOG_H) function.h hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) output.h \
- $(RA_H) $(TM_P_H) $(REGS_H)
-ra-rewrite.o : ra-rewrite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
- $(TM_P_H) function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(DF_H) $(EXPR_H) \
- output.h except.h $(RA_H) reload.h insn-config.h
reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(FLAGS_H) output.h \
$(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) hard-reg-set.h insn-config.h \
$(REGS_H) function.h real.h toplev.h $(TM_P_H) $(PARAMS_H)
@@ -2428,7 +2412,7 @@
$(srcdir)/emit-rtl.c $(srcdir)/except.c $(srcdir)/explow.c $(srcdir)/expr.c \
$(srcdir)/function.c \
$(srcdir)/gcse.c $(srcdir)/integrate.c $(srcdir)/lists.c $(srcdir)/optabs.c \
- $(srcdir)/profile.c $(srcdir)/ra-build.c $(srcdir)/regclass.c \
+ $(srcdir)/profile.c $(srcdir)/regclass.c \
$(srcdir)/reg-stack.c $(srcdir)/cfglayout.c \
$(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
$(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
@@ -2454,7 +2438,7 @@
gt-emit-rtl.h gt-explow.h gt-stor-layout.h gt-regclass.h \
gt-lists.h gt-alias.h gt-cselib.h gt-gcse.h \
gt-expr.h gt-sdbout.h gt-optabs.h gt-bitmap.h gt-dojump.h \
-gt-dwarf2out.h gt-ra-build.h gt-reg-stack.h gt-dwarf2asm.h \
+gt-dwarf2out.h gt-reg-stack.h gt-dwarf2asm.h \
gt-dbxout.h gt-c-common.h gt-c-decl.h gt-c-parse.h \
gt-c-pragma.h gtype-c.h gt-cfglayout.h \
gt-tree-mudflap.h gt-tree-complex.h \
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.60
diff -u -r2.60 passes.c
--- passes.c 14 Dec 2004 01:30:31 -0000 2.60
+++ passes.c 16 Jan 2005 12:03:55 -0000
@@ -1,6 +1,6 @@
/* Top level of GCC compilers (cc1, cc1plus, etc.)
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GCC.
@@ -425,49 +425,6 @@
}
-/* Run new register allocator. Return TRUE if we must exit
- rest_of_compilation upon return. */
-static bool
-rest_of_handle_new_regalloc (void)
-{
- int failure;
-
- timevar_push (TV_LOCAL_ALLOC);
- open_dump_file (DFI_lreg, current_function_decl);
-
- delete_trivially_dead_insns (get_insns (), max_reg_num ());
- reg_alloc ();
-
- timevar_pop (TV_LOCAL_ALLOC);
- close_dump_file (DFI_lreg, NULL, NULL);
-
- /* XXX clean up the whole mess to bring live info in shape again. */
- timevar_push (TV_GLOBAL_ALLOC);
- open_dump_file (DFI_greg, current_function_decl);
-
- build_insn_chain (get_insns ());
- failure = reload (get_insns (), 0);
-
- timevar_pop (TV_GLOBAL_ALLOC);
-
- ggc_collect ();
-
- if (dump_enabled_p (DFI_greg))
- {
- timevar_push (TV_DUMP);
- dump_global_regs (dump_file);
- timevar_pop (TV_DUMP);
- close_dump_file (DFI_greg, print_rtl_with_bb, get_insns ());
- }
-
- if (failure)
- return true;
-
- reload_completed = 1;
-
- return false;
-}
-
/* Run old register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
static bool
@@ -971,7 +927,7 @@
if (optimize)
{
- if (!flag_new_regalloc && initialize_uninitialized_subregs ())
+ if (initialize_uninitialized_subregs ())
{
/* Insns were inserted, and possibly pseudos created, so
things might look a bit different. */
@@ -1707,16 +1663,8 @@
epilogue thus changing register elimination offsets. */
current_function_is_leaf = leaf_function_p ();
- if (flag_new_regalloc)
- {
- if (rest_of_handle_new_regalloc ())
- goto exit_rest_of_compilation;
- }
- else
- {
- if (rest_of_handle_old_regalloc ())
- goto exit_rest_of_compilation;
- }
+ if (rest_of_handle_old_regalloc ())
+ goto exit_rest_of_compilation;
if (optimize > 0)
rest_of_handle_postreload ();