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: trunk: PATCH: passes with name starting with dot have no dump file.


Dave Korn wrote:
Basile STARYNKEVITCH wrote on 31 July 2008 12:14:
Good point. Should I submit a new trivial patch, or is nobody interested
in having some way to avoid dump on some passes?

I'm sure there'll be a non-algorithmic maintainer along in a moment or two
...
My motivation is still to be able to have every pass being uniquely named.

I think it's an excellent idea :) and frankly your patch is as close as it's possible to be to trivial-and-obvious without actually being trivial and obvious - i.e. only because it actually introduces new behaviour.


So here is the updated patch to trunk rev138388

gcc/Changelog:

2008-07-31  Basile Starynkevitch  <basile@starynkevitch>
	* tree-pass.h: Added comment about not dumping passes with name
	starting with dot in struct opt_pass.

	* passes.c (register_dump_files_1): Don't do dump for a pass with
	name starting with dot.

	* doc/passes.texi (Pass manager): Mention pass names and special
	meaning of star prefix to avoid dump.

Ok for trunk?

Regards.
--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
Index: gcc/doc/passes.texi
===================================================================
--- gcc/doc/passes.texi	(revision 138388)
+++ gcc/doc/passes.texi	(working copy)
@@ -166,6 +166,10 @@ not attempt to (re-)generate data structures or lo
 language form based on the requirements of the next pass.  Nevertheless,
 what is present is useful, and a far sight better than nothing at all.
 
+Each pass may have its own dump file (for GCC debugging purposes).
+Passes without any names, or with a name starting with a star do not
+dump anything.
+
 TODO: describe the global variables set up by the pass manager,
 and a brief description of how a new pass should use it.
 I need to look at what info rtl passes use first@enddots{}
Index: gcc/passes.c
===================================================================
--- gcc/passes.c	(revision 138388)
+++ gcc/passes.c	(working copy)
@@ -406,7 +406,7 @@ register_dump_files_1 (struct opt_pass *pass, int
       int new_properties = (properties | pass->properties_provided)
 			   & ~pass->properties_destroyed;
 
-      if (pass->name)
+      if (pass->name && pass->name[0] != '*')
         register_one_dump_file (pass);
 
       if (pass->sub)
Index: gcc/tree-pass.h
===================================================================
--- gcc/tree-pass.h	(revision 138388)
+++ gcc/tree-pass.h	(working copy)
@@ -104,7 +104,8 @@ struct opt_pass
     SIMPLE_IPA_PASS,
     IPA_PASS
   } type;
-  /* Terse name of the pass used as a fragment of the dump file name.  */
+  /* Terse name of the pass used as a fragment of the dump file
+     name.  If the name starts with a star, no dump happens. */
   const char *name;
 
   /* If non-null, this pass and all sub-passes are executed only if

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