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]
Other format: [Raw text]

[profiling-branch] Cleanup cfg after profiling


Hi,
Disabling the cleanup_cfg after cfg build (in order to get coverage info
exact) I need to do this in pass run just after profiling (so it is
cleaned up even when profiling has been done)

Honza

2004-03-17  Jan Hubicka  <jh@suse.cz>
	* tree-optimize.c (pass_cleanup_cfg): New.
	(init_tree_optimization_passes): add cleanupcfg pass after profilng.
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 1.1.4.122.2.9
diff -c -3 -p -r1.1.4.122.2.9 tree-optimize.c
*** tree-optimize.c	15 Mar 2004 17:03:01 -0000	1.1.4.122.2.9
--- tree-optimize.c	17 Mar 2004 19:34:33 -0000
*************** static struct tree_opt_pass pass_gimple 
*** 124,129 ****
--- 124,146 ----
    TODO_dump_func			/* todo_flags_finish */
  };
  
+ 
+ static struct tree_opt_pass pass_cleanup_cfg = 
+ {
+   "cleanupcfg",				/* name */
+   NULL,					/* gate */
+   cleanup_tree_cfg,			/* execute */
+   NULL,					/* sub */
+   NULL,					/* next */
+   0,					/* static_pass_number */
+   0,					/* tv_id */
+   0,					/* properties_required */
+   0,					/* properties_provided */
+   0,					/* properties_destroyed */
+   0,					/* todo_flags_start */
+   TODO_dump_func			/* todo_flags_finish */
+ };
+ 
  /* Pass: replace the outermost BIND_EXPR.  We removed all of them while
     optimizing, but the tree->rtl expander requires it.  */
  
*************** init_tree_optimization_passes (void)
*** 307,312 ****
--- 324,330 ----
    NEXT_PASS (pass_lower_eh);
    NEXT_PASS (pass_build_cfg);
    NEXT_PASS (pass_tree_profile);
+   NEXT_PASS (pass_cleanup_cfg);
    NEXT_PASS (pass_all_optimizations);
    NEXT_PASS (pass_del_cfg);
    NEXT_PASS (pass_mudflap_2);


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