This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 0/4] Move pass-creation logic into a passes.def file
- From: Andrew Pinski <pinskia at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 18 Jul 2013 00:10:31 -0700
- Subject: Re: [PATCH 0/4] Move pass-creation logic into a passes.def file
- References: <1374110303-9758-1-git-send-email-dmalcolm at redhat dot com>
On Wed, Jul 17, 2013 at 6:18 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> The following patch series moves the logic for creating the
> pipeline of optimization passes out from passes.c and into a new
> passes.def file (patches 1 and 2).
>
> It then explicitly numbers those passes that have multiple instances, by
> using a NEXT_PASS_NUM macro in place of NEXT_PASS (patch 3)
This is not useful in itself and is one of the reasons why we added
the ability to have a pass multiple times without much code.
>
> The motivation for this is subsequent work towards removing global
> variables from GCC's internals: by numbering the instances it becomes
> possible to create a "class pipeline" and have the fields be declared
> via suitable use of passes.def. See:
> http://dmalcolm.fedorapeople.org/gcc/global-state/new-classes.html#pass-classes
>
> The final patch in the sequence adds a script which sanity-checks
> passes.def, and prints some stats about the passes. You can see output
> from the script at:
>
> http://dmalcolm.fedorapeople.org/gcc/2013-07-17/pass-stats.txt
>
> Specifically, it lists single-instanced passes, then all multi-instance
> passes, giving the number of instances of each (alphabetically within
> each list).
>
> I've successfully bootstrapped and tested the sequence of patches on
> x86_64-unknown-linux-gnu: all testcases show the same results as an
> unpatched build (relative to r201011).
Besides patch 3 for reasons mentioned above and mentioned in the reply
directly to that patch, I like this set of patches.
Thanks,
Andrew Pinski
>
> OK to commit these to trunk?
>
> David Malcolm (4):
> Introduce macros when constructing the tree of passes
> Move the construction of the pass hierarchy into a new passes.def
> file.
> Introduce NEXT_PASS_NUM macro
> Add contrib/check_passes.py script
>
> contrib/check_passes.py | 58 +++++++
> gcc/Makefile.in | 2 +-
> gcc/passes.c | 401 ++---------------------------------------------
> gcc/passes.def | 406 ++++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 481 insertions(+), 386 deletions(-)
> create mode 100644 contrib/check_passes.py
> create mode 100644 gcc/passes.def
>
> --
> 1.7.11.7
>