This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [new-regalloc] tidy rest_of_compilation




On Thu, 1 Feb 2001, Richard Henderson wrote:

> No ifdefs; we don't have a local-alloc anymore.

Works for me.


>
>
> r~
>
>
>         * toplev.c (NEW_REGISTER_ALLOCATOR): Remove.
>         (dump_file_index, dump_file): Remove lreg dump file.
>         (rest_of_compilation): Don't ifdef NEW_REGISTER_ALLOCATOR.
>         Use the global register time var and dump files for the
>         new allocator.
>         * timevar.def (TV_LOCAL_ALLOC): Remove.
>
> Index: toplev.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
> retrieving revision 1.418.2.2
> diff -c -p -d -r1.418.2.2 toplev.c
> *** toplev.c	2001/01/30 04:52:49	1.418.2.2
> --- toplev.c	2001/02/02 00:14:41
> *************** Boston, MA 02111-1307, USA.  */
> *** 64,73 ****
>   #include "diagnostic.h"
>   #include "ssa.h"
>
> - #ifndef NEW_REGISTER_ALLOCATOR
> - #define NEW_REGISTER_ALLOCATOR 1
> - #endif
> -
>   #ifndef ACCUMULATE_OUTGOING_ARGS
>   #define ACCUMULATE_OUTGOING_ARGS 0
>   #endif
> --- 64,69 ----
> *************** enum dump_file_index
> *** 276,282 ****
>     DFI_ce,
>     DFI_regmove,
>     DFI_sched,
> -   DFI_lreg,
>     DFI_greg,
>     DFI_postreload,
>     DFI_flow2,
> --- 272,277 ----
> *************** struct dump_file_info dump_file[DFI_MAX]
> *** 321,327 ****
>     { "ce",	'C', 1, 0, 0 },
>     { "regmove",	'N', 1, 0, 0 },
>     { "sched",	'S', 1, 0, 0 },
> -   { "lreg",	'l', 1, 0, 0 },
>     { "greg",	'g', 1, 0, 0 },
>     { "postreload", 'o', 1, 0, 0 },
>     { "flow2",	'w', 1, 0, 0 },
> --- 316,321 ----
> *************** rest_of_compilation (decl)
> *** 3406,3469 ****
>        since this can impact optimizations done by the prologue and
>        epilogue thus changing register elimination offsets.  */
>     current_function_is_leaf = leaf_function_p ();
> -
> -   timevar_push (TV_LOCAL_ALLOC);
> -   open_dump_file (DFI_lreg, decl);
> -
> -   /* Allocate pseudo-regs that are used only within 1 basic block.
>
> !      RUN_JUMP_AFTER_RELOAD records whether or not we need to rerun the
> !      jump optimizer after register allocation and reloading are finished.  */
>
>     if (! register_life_up_to_date)
>       recompute_reg_usage (insns, ! optimize_size);
>     regclass (insns, max_reg_num (), rtl_dump_file);
> ! #ifdef NEW_REGISTER_ALLOCATOR
> !   init_new_regalloc();
> !   timevar_pop (TV_LOCAL_ALLOC);
> ! #else
> !   rebuild_label_notes_after_reload = local_alloc ();
> !
> !   timevar_pop (TV_LOCAL_ALLOC);
> !
> !   if (dump_file[DFI_lreg].enabled)
> !     {
> !       timevar_push (TV_DUMP);
> !
> !       dump_flow_info (rtl_dump_file);
> !       dump_local_alloc (rtl_dump_file);
> !
> !       close_dump_file (DFI_lreg, print_rtl_with_bb, insns);
> !       timevar_pop (TV_DUMP);
> !     }
> !
> !   ggc_collect ();
> !
> !   timevar_push (TV_GLOBAL_ALLOC);
> !   open_dump_file (DFI_greg, decl);
> !
> !   /* If optimizing, allocate remaining pseudo-regs.  Do the reload
> !      pass fixing up any insns that are invalid.  */
> !
> !   if (optimize)
> !     failure = global_alloc (rtl_dump_file);
> !   else
> !     {
> !       build_insn_chain (insns);
> !       failure = reload (insns, 0);
> !     }
>
>     timevar_pop (TV_GLOBAL_ALLOC);
> - #endif
> -   if (dump_file[DFI_greg].enabled)
> -     {
> -       timevar_push (TV_DUMP);
> -
> -       dump_global_regs (rtl_dump_file);
> -
> -       close_dump_file (DFI_greg, print_rtl_with_bb, insns);
> -       timevar_pop (TV_DUMP);
> -     }
>
>     if (failure)
>       goto exit_rest_of_compilation;
> --- 3400,3416 ----
>        since this can impact optimizations done by the prologue and
>        epilogue thus changing register elimination offsets.  */
>     current_function_is_leaf = leaf_function_p ();
>
> !   timevar_push (TV_GLOBAL_ALLOC);
> !   open_dump_file (DFI_greg, decl);
>
>     if (! register_life_up_to_date)
>       recompute_reg_usage (insns, ! optimize_size);
>     regclass (insns, max_reg_num (), rtl_dump_file);
> !   init_new_regalloc ();
>
> +   close_dump_file (DFI_greg, print_rtl_with_bb, insns);
>     timevar_pop (TV_GLOBAL_ALLOC);
>
>     if (failure)
>       goto exit_rest_of_compilation;
> Index: timevar.def
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/timevar.def,v
> retrieving revision 1.6
> diff -c -p -d -r1.6 timevar.def
> *** timevar.def	2000/09/07 00:37:09	1.6
> --- timevar.def	2001/02/02 00:19:12
> *************** DEFTIMEVAR (TV_COMBINE               , "
> *** 57,63 ****
>   DEFTIMEVAR (TV_IFCVT		     , "if-conversion")
>   DEFTIMEVAR (TV_REGMOVE               , "regmove")
>   DEFTIMEVAR (TV_SCHED                 , "scheduling")
> - DEFTIMEVAR (TV_LOCAL_ALLOC           , "local alloc")
>   DEFTIMEVAR (TV_GLOBAL_ALLOC          , "global alloc")
>   DEFTIMEVAR (TV_RELOAD_CSE_REGS       , "reload CSE regs")
>   DEFTIMEVAR (TV_FLOW2                 , "flow 2")
> --- 57,62 ----
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]