displaying static pass numbers on rare verbose execution...

Basile Starynkevitch basile@starynkevitch.net
Mon Nov 29 14:39:00 GMT 2010


Hello All,

I would believe it would help a lot newbie GCC developers (and plugin
writers) if the small message displaying pass names on [rare]
non-quiet runs would also give the static pass number, since the
static pass number determinate the dump file, and since these numbers
are not chronological [i.e. in the order of pass runs]

We added some documentation about that numbering 
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02462.html



I find not easy (and so do some GCC MELT users) to understand the
actual ordering of passes without such information.

Notice that this cannot change the behavior of GCC w.r.t. code
generation, and this only impacts the very few verbose runs of GCC.

################# proposed patch ######
Index: gcc/passes.c
===================================================================
--- gcc/passes.c	(revision 167240)
+++ gcc/passes.c	(working copy)
@@ -1537,7 +1537,8 @@ execute_one_pass (struct opt_pass *pass)
   invoke_plugin_callbacks (PLUGIN_PASS_EXECUTION, pass);
 
   if (!quiet_flag && !cfun)
-    fprintf (stderr, " <%s>", pass->name ? pass->name : "");
+    fprintf (stderr, " <%s/%d>", pass->name ? pass->name : "",
+             pass->static_pass_number);
 
   /* Note that the folders should only create gimple expressions.
      This is a hack until the new folder is ready.  */
################################################################

#### gcc/ChangeLog entry ###
2010-11-29 Basile Starynkevitch  <basile@starynkevitch.net>
	* passes.c (execute_one_pass): Also display pass static number.
####

Comments are welcome. Ok with what changes?

Cheers



-- 
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} ***



More information about the Gcc-patches mailing list