From patchwork Mon Nov 29 13:48:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Basile Starynkevitch X-Patchwork-Id: 73426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2725A1007D2 for ; Tue, 30 Nov 2010 00:48:58 +1100 (EST) Received: (qmail 20248 invoked by alias); 29 Nov 2010 13:48:57 -0000 Received: (qmail 20240 invoked by uid 22791); 29 Nov 2010 13:48:56 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org Received: from smtp-151-monday.nerim.net (HELO maiev.nerim.net) (194.79.134.151) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Nov 2010 13:48:51 +0000 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by maiev.nerim.net (Postfix) with ESMTPS id 424B32E00F for ; Mon, 29 Nov 2010 14:48:49 +0100 (CET) Received: from basile18 by hector.lesours with local (Exim 4.72) (envelope-from ) id 1PN464-00026s-7u for gcc-patches@gcc.gnu.org; Mon, 29 Nov 2010 14:48:48 +0100 Date: Mon, 29 Nov 2010 14:48:48 +0100 From: Basile Starynkevitch To: gcc-patches@gcc.gnu.org Subject: displaying static pass numbers on rare verbose execution... Message-ID: <20101129134847.GA1184@ours.starynkevitch.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 ###### ################################################################ #### gcc/ChangeLog entry ### 2010-11-29 Basile Starynkevitch * passes.c (execute_one_pass): Also display pass static number. #### Comments are welcome. Ok with what changes? Cheers 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. */