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]

Re: [PATCH] Name unnamed passes and change duplicate pass names


Here's the patch to add TODO_require_dumpfile to passes that need it.

This was a much bigger change than I expected!  I bootstrapped the
three patches in this thread and tested them without regressions on
x86_64-unknown-linux-gnu.

2009-05-12 Justin Seyster <jrseys@gmail.com>

gcc/
	* ipa-reference.c (pass_ipa_reference): Added
	TODO_require_dumpfile flag.
	* df-core.c (pass_df_initialize_opt, pass_df_initialize_no_opt):
	Likewise.
	* ipa-pure-const.c (pass_ipa_pure_const, pass_local_pure_const):
	Likewise.
	* tree-nrv.c (pass_return_slot): Likewise.
	* predict.c (pass_profile): Likewise.
	* tree-optimize.c (pass_early_local_passes): Likewise.
	* reginfo.c (pass_reginfo_init): Likewise.
	* tree-ssa-structalias.c (pass_ipa_pta): Likewise.

Index: gcc/ipa-reference.c
===================================================================
--- gcc/ipa-reference.c	(revision 147136)
+++ gcc/ipa-reference.c	(working copy)
@@ -1264,7 +1264,7 @@
   0,	                                /* properties_required */
   0,					/* properties_provided */
   0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
+  TODO_require_dumpfile,		/* todo_flags_start */
   0                                     /* todo_flags_finish */
  },
  generate_summary,		        /* generate_summary */
Index: gcc/df-core.c
===================================================================
--- gcc/df-core.c	(revision 147136)
+++ gcc/df-core.c	(working copy)
@@ -770,7 +770,7 @@
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
+  TODO_require_dumpfile,                /* todo_flags_start */
   0                                     /* todo_flags_finish */
  }
 };
@@ -797,7 +797,7 @@
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
+  TODO_require_dumpfile,                /* todo_flags_start */
   0                                     /* todo_flags_finish */
  }
 };
Index: gcc/ipa-pure-const.c
===================================================================
--- gcc/ipa-pure-const.c	(revision 147136)
+++ gcc/ipa-pure-const.c	(working copy)
@@ -890,7 +890,7 @@
   0,	                                /* properties_required */
   0,					/* properties_provided */
   0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
+  TODO_require_dumpfile,		/* todo_flags_start */
   0                                     /* todo_flags_finish */
  },
  generate_summary,		        /* generate_summary */
@@ -1019,7 +1019,7 @@
   0,	                                /* properties_required */
   0,					/* properties_provided */
   0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
+  TODO_require_dumpfile,		/* todo_flags_start */
   0                                     /* todo_flags_finish */
  }
 };
Index: gcc/tree-nrv.c
===================================================================
--- gcc/tree-nrv.c	(revision 147136)
+++ gcc/tree-nrv.c	(working copy)
@@ -363,7 +363,7 @@
   PROP_ssa | PROP_alias,		/* properties_required */
   0,					/* properties_provided */
   0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
+  TODO_require_dumpfile,		/* todo_flags_start */
   0					/* todo_flags_finish */
  }
 };
Index: gcc/predict.c
===================================================================
--- gcc/predict.c	(revision 147136)
+++ gcc/predict.c	(working copy)
@@ -2211,7 +2211,7 @@
   PROP_cfg,				/* properties_required */
   0,					/* properties_provided */
   0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
+  TODO_require_dumpfile,		/* todo_flags_start */
   TODO_ggc_collect | TODO_verify_ssa			/* todo_flags_finish */
  }
 };
Index: gcc/tree-optimize.c
===================================================================
--- gcc/tree-optimize.c	(revision 147136)
+++ gcc/tree-optimize.c	(working copy)
@@ -104,7 +104,7 @@
   0,					/* properties_required */
   0,					/* properties_provided */
   0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
+  TODO_require_dumpfile,		/* todo_flags_start */
   TODO_remove_functions	 		/* todo_flags_finish */
  }
 };
Index: gcc/reginfo.c
===================================================================
--- gcc/reginfo.c	(revision 147136)
+++ gcc/reginfo.c	(working copy)
@@ -955,7 +955,7 @@
   0,                                    /* properties_required */
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
-  0,                                    /* todo_flags_start */
+  TODO_require_dumpfile,                /* todo_flags_start */
   0                                     /* todo_flags_finish */
  }
 };
Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c	(revision 147136)
+++ gcc/tree-ssa-structalias.c	(working copy)
@@ -5887,7 +5887,7 @@
   0,	                                /* properties_required */
   0,					/* properties_provided */
   0,					/* properties_destroyed */
-  0,					/* todo_flags_start */
+  TODO_require_dumpfile,		/* todo_flags_start */
   TODO_update_ssa                       /* todo_flags_finish */
  }
 };


On Fri, May 8, 2009 at 4:29 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>
>> Does this cause dumps to happen even if there is nothing to dump?
>
> Yes, it does.
>
>> Maybe you need to add another field to the struct saying a dump should
>> be created.
>
> Or another TODO (since it should print the ";; Function" header in
> dump_file, having something like TODO_dump_header in todo_start makes
> sort of sense; and set dump_file == NULL if the TODO is not present so
> that having TODO_dump_func without TODO_dump_header will crash).
>
> Paolo
>


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