This is the mail archive of the gcc@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: A visualization of GCC's passes, as a subway map


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 <dmalcolm@redhat.com> 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 data!)
>> >
>> > 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 =
> {
> ?{
> ?RTL_PASS,
> ?"expand", ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* name */
>
> [...snip...]
>
> ?PROP_ssa | PROP_gimple_leh | PROP_cfg
> ? ?| PROP_gimple_lcx, ? ? ? ? ? ? ? ? ?/* properties_required */
> ?PROP_rtl, ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* properties_provided */
> ?PROP_ssa | PROP_trees, ? ? ? ? ? ? ? ?/* properties_destroyed */
>
> [...snip...]
>
> }
>
> and gcc/tree-pass.h has:
> ?#define PROP_trees \
> ? ?(PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | ?PROP_gimple_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? ?(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
>
>
>


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