diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6d2db65e7d5..a793fcf2646 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-12-18 Steven Bosscher + + * Makefile.in (tracer.o, bb-reorder.o): Depend on timevar.h + * toplev.c (rest_of_handle_reorder_blocks, rest_of_handle_tracer): + Don't push and pop TV_REORDER_BLOCKS timevars, do it... + * bb-reorder.c (reorder_basic_blocks): ...here, and... + * tracer.c (tracer): here. + 2003-12-18 Ulrich Weigand * loop.c (move_movables): Handle combination of m->consec, diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 24c3849b418..75d6e76f388 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1815,10 +1815,10 @@ predict.o: predict.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE $(PARAMS_H) $(TARGET_H) cfgloop.h $(COVERAGE_H) lists.o: lists.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(RTL_H) $(GGC_H) bb-reorder.o : bb-reorder.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ - $(RTL_H) $(BASIC_BLOCK_H) flags.h output.h cfglayout.h $(FIBHEAP_H) \ + $(RTL_H) $(BASIC_BLOCK_H) flags.h timevar.h output.h cfglayout.h $(FIBHEAP_H) \ $(TARGET_H) tracer.o : tracer.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ - $(BASIC_BLOCK_H) hard-reg-set.h output.h cfglayout.h flags.h \ + $(BASIC_BLOCK_H) hard-reg-set.h output.h cfglayout.h flags.h timevar.h \ $(PARAMS_H) $(COVERAGE_H) cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(RTL_H) $(TREE_H) insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h \ diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 0a433424fb5..85e184dd719 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -72,6 +72,7 @@ #include "rtl.h" #include "basic-block.h" #include "flags.h" +#include "timevar.h" #include "output.h" #include "cfglayout.h" #include "fibheap.h" @@ -1064,6 +1065,8 @@ reorder_basic_blocks (void) if ((* targetm.cannot_modify_jumps_p) ()) return; + timevar_push (TV_REORDER_BLOCKS); + cfg_layout_initialize (); set_edge_can_fallthru_flag (); @@ -1096,4 +1099,6 @@ reorder_basic_blocks (void) dump_flow_info (rtl_dump_file); cfg_layout_finalize (); + + timevar_pop (TV_REORDER_BLOCKS); } diff --git a/gcc/toplev.c b/gcc/toplev.c index f70946ce9f7..252fe419187 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2298,7 +2298,6 @@ rest_of_handle_regrename (tree decl, rtx insns) static void rest_of_handle_reorder_blocks (tree decl, rtx insns) { - timevar_push (TV_REORDER_BLOCKS); open_dump_file (DFI_bbro, decl); /* Last attempt to optimize CFG, as scheduling, peepholing and insn @@ -2315,7 +2314,6 @@ rest_of_handle_reorder_blocks (tree decl, rtx insns) cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE); close_dump_file (DFI_bbro, print_rtl_with_bb, insns); - timevar_pop (TV_REORDER_BLOCKS); } #ifdef INSN_SCHEDULING @@ -2394,7 +2392,6 @@ rest_of_handle_regmove (tree decl, rtx insns) static void rest_of_handle_tracer (tree decl, rtx insns) { - timevar_push (TV_TRACER); open_dump_file (DFI_tracer, decl); if (rtl_dump_file) dump_flow_info (rtl_dump_file); @@ -2402,7 +2399,6 @@ rest_of_handle_tracer (tree decl, rtx insns) cleanup_cfg (CLEANUP_EXPENSIVE); reg_scan (insns, max_reg_num (), 0); close_dump_file (DFI_tracer, print_rtl_with_bb, get_insns ()); - timevar_pop (TV_TRACER); } /* If-conversion and CFG cleanup. */ diff --git a/gcc/tracer.c b/gcc/tracer.c index 68b3f6697c2..4769a47632f 100644 --- a/gcc/tracer.c +++ b/gcc/tracer.c @@ -45,6 +45,7 @@ #include "cfglayout.h" #include "fibheap.h" #include "flags.h" +#include "timevar.h" #include "params.h" #include "coverage.h" @@ -360,6 +361,9 @@ tracer (void) { if (n_basic_blocks <= 1) return; + + timevar_push (TV_TRACER); + cfg_layout_initialize (); mark_dfs_back_edges (); if (rtl_dump_file) @@ -369,6 +373,9 @@ tracer (void) if (rtl_dump_file) dump_flow_info (rtl_dump_file); cfg_layout_finalize (); + /* Merge basic blocks in duplicated traces. */ cleanup_cfg (CLEANUP_EXPENSIVE); + + timevar_pop (TV_TRACER); }