This is a repository of scripts for automating large-scale changes to GCC's source code.
They are licensed under the GPL, version 3 or later.
Files tend to come in pairs: a foo.py and a test_foo.py.
Script to replace implicit uses of "cfun" via the preprocessor with explicit uses.
Status: a variant of this idea was approved by Richi in http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00780.html
I need to implement this.
Work-in-progress on replacing the implicit use of the preprocessor for accessing options with explicit macro use.
GCC's code has references to options like:
static bool gate_vrp (void) { return flag_tree_vrp != 0; }
where "flag_tree_vrp" is actually an autogenerated macro to "global_options.x_flag_tree_vrp"
This is deeply confusing to a newbie (and indeed still to me after two years of working with GCC's internals) e.g. when stepping through code and trying to query the value in gdb. The idea is to replace the above with:
static bool gate_vrp (void) { return GCC_OPTION (flag_tree_vrp) != 0; }
(I'd also like to asssociate options with a gcc::context, rather than have a single instance of options, perhaps explicitly adding a context arg to the macro???)
Status: posted as http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00652.html
Work-in-progress experiment on removing the "gimple"/"const_gimple" typedefs in favor of something else (perhaps just "gimple *"); see :
http://gcc.gnu.org/ml/gcc-patches/2014-04/msg01562.html
Status: works well enough to port the existing code (renaming to "gimple *").
Posted as: http://gcc.gnu.org/ml/gcc-patches/2014-05/msg00129.html
Review in progress; commits to trunk waiting until after 4.9.1 is released.
Conversion of remaining hooks in ipa_opt_pass_d from function ptrs to vfuncs.
Status: posted as http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00639.html I need to respond to Richi's concern: http://gcc.gnu.org/ml/gcc-patches/2013-10/msg00651.html
This module is used by the other scripts, and provides commonly used facilities e.g. a way to manage ChangeLog entries.
This script locates changes to ChangeLog files and uses them to build a commit message, so the latter will appears as part of the email rather than the patch, when turned into an email by git format-patch.
This was used in the patch series that converted passes to C++ classes, specifically, to generate r201508.
This converted the symtabs types into a class hierarchy. It was used to generate r204171.
This is a followup to refactor_symtab.py which renames the types (from symtab_node_base to symtab_node, with various related fixups). It was used to generate r204279.
This was used to help convert gimple's statement types to use C++ inheritance, specically, to generate part of r205034.