From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19699 invoked by alias); 12 Jul 2011 16:16:04 -0000 Received: (qmail 19690 invoked by uid 22791); 12 Jul 2011 16:16:01 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,TW_CF,TW_LC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Jul 2011 16:15:27 +0000 Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id p6CGFQk6000871 for ; Tue, 12 Jul 2011 09:15:26 -0700 Received: from gwaa18 (gwaa18.prod.google.com [10.200.27.18]) by hpaq2.eem.corp.google.com with ESMTP id p6CGFOt3004848 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 12 Jul 2011 09:15:25 -0700 Received: by gwaa18 with SMTP id a18so1992726gwa.19 for ; Tue, 12 Jul 2011 09:15:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.105.17 with SMTP id h17mr271981ybm.244.1310487323656; Tue, 12 Jul 2011 09:15:23 -0700 (PDT) Received: by 10.150.97.8 with HTTP; Tue, 12 Jul 2011 09:15:23 -0700 (PDT) In-Reply-To: <1310486854.23887.35650.camel@surprise> References: <1310406999.23887.34257.camel@surprise> <4E1BF650.1010503@gnu.org> <1310486854.23887.35650.camel@surprise> Date: Tue, 12 Jul 2011 16:19:00 -0000 Message-ID: Subject: Re: A visualization of GCC's passes, as a subway map From: Xinliang David Li To: David Malcolm Cc: "Paulo J. Matos" , gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00190.txt.bz2 FYI. If you just want text dump of gcc passes and their on|off settings, option -fdump-passes can be used. This can be enhanced to dump properties and TODOs. David On Tue, Jul 12, 2011 at 9:07 AM, David Malcolm wrote: > On Tue, 2011-07-12 at 09:43 +0100, Paulo J. Matos wrote: >> On 12/07/11 08:22, Paolo Bonzini wrote: >> > On 07/11/2011 07:56 PM, David Malcolm wrote: >> >> Hope this is fun/helpful (and that I'm correctly interpreting the dat= a!) >> > >> > You are, and it shows some bugs even. gimple_lcx is obviously destroyed >> > by expand, and I find it unlikely that no pass ever introduces a >> > critical edge... >> > >> >> But the diagram shows gimple_lcx stopping at expand but continuing its >> lifetime through RTL passes (so gimple_lcx according to the diagram is >> _not_ destroyed by expand). So, I am left wondering if the bug is in the >> diagram or GCC. > > > On this build of GCC (standard Fedora 15 gcc package of 4.6.0), the > relevant part of cfgexpand.c looks like this: > > struct rtl_opt_pass pass_expand =3D > { > =A0{ > =A0RTL_PASS, > =A0"expand", =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* n= ame */ > > [...snip...] > > =A0PROP_ssa | PROP_gimple_leh | PROP_cfg > =A0 =A0| PROP_gimple_lcx, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* propertie= s_required */ > =A0PROP_rtl, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* p= roperties_provided */ > =A0PROP_ssa | PROP_trees, =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/* properties_de= stroyed */ > > [...snip...] > > } > > and gcc/tree-pass.h has: > =A0#define PROP_trees \ > =A0 =A0(PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | =A0PROP_gim= ple_lomp) > > and that matches up with both the diagram, and the entry for "expand" in > the table below [1]. > > So it seems that the diagram is correctly accessing the > "properties_destroyed" data for the "expand" pass; does PROP_gimple_lcx > need to be added somewhere? =A0(or should the diagram we taught to > specialcase some things, perhaps?) > > Note that the diagram doesn't take the RTL_* enum into account. > > FWIW, I added some more notes on passes here: > http://readthedocs.org/docs/gcc-python-plugin/en/latest/passes.html > which tries to summarize what the PROP_* flags mean (as I understand > them). > > and there's a higher-level summary of GCC's insides (from the > perspective of a Python coder new to GCC) here: > http://readthedocs.org/docs/gcc-python-plugin/en/latest/gcc-overview.html > > As before, caveat lector: I may have misunderstood things; I'm > relatively new to GCC. > > Hope this is helpful > Dave > [1] > http://readthedocs.org/docs/gcc-python-plugin/en/latest/tables-of-passes.= html#the-all-other-passes-catch-all > > >