[patch][plugins] Provide unique names to all compiler passes

Zbigniew Chamski zbigniew.chamski@gmail.com
Mon Jun 15 22:23:00 GMT 2009


All,

plugins refer to passes by their name, hence all compiler passes need
a unique name:

    * passes with NULL name should get a new unique name;
    * passes which had duplicate names should be disambiguated by
changing at least one name to achieve uniqueness.

The pass (re)naming policy implemented in this patch is:

    * passes with NULL names are named after their opt_pass data
structure with the prefix "pass_" stripped;

    * when a GIMPLE pass and an RTL pass have the same name ("eh",
"dce"), the RTL pass name is modified while the name of the GIMPLE
pass is left
unchanged; Rationale: GIMPLE is there to stay, and GIMPLE  pass names
are extensively used as dump names in the testsuite;

    * when two passes have the same name ("mudflap1", "mudflap2",
"postreload"), the names are adjusted to reflect the names of pass
variables.

Regression-tested on x86_64-unknown-linux-gnu.

All the best,

    Zbigniew


2009-06-15  Zbigniew Chamski  <zbigniew.chamski@gmail.com>

        * cfgrtl.c (pass_free_cfg): Add pass name.
        * cgraphbuild.c (pass_build_cgraph_edges,
        pass_rebuild_cgraph_edges, pass_remove_cgraph_callee_edges):
        Likewise.
        * dce.c (pass_ud_rtl_dce, pass_fast_rtl_dce): Change pass name.
        * df-core.c (pass_df_initialize_no_opt): Likewise.
        * except.c (pass_rtl_eh): Likewise.
        * final.c (pass_final, pass_clean_state): Add pass name.
        * function.c (pass_init_function, pass_leaf_regs): Likewise.
        * gcse.c (pass_rtl_pre): Change pass name.
        * passes.c (pass_rest_of_compilation, pass_postreload): Add pass
        name.
        * postreload.c (pass_postreload_cse): Change pass name.
        * predict.c (pass_strip_predict_hints): Add pass name.
        * reg-stack.c (pass_stack_regs): Likewise.
        * stack-ptr-mod.c (pass_stack_ptr_mod): Likewise.
        * tree-cfg.c (pass_warn_function_return,
        pass_warn_function_noreturn): Add pass name.
        * tree-dfa.c (pass_referenced_vars): Likewise.
        * tree-nomudflap (pass_mudflap_1, pass_mudflap_2): Change pass name.
        * tree-optimize.c (pass_all_optimizations): Add pass name.
        (pass_cleanup_cfg_post_optimizing): Fix whitespace before comment.
        (pass_fixup_cfg): Add pass name, fix whitespace before comment.
        (pass_init_datastructures): Add pass name.
        * tree-ssa-loop.c (pass_record_bounds): Likewise.
        * tree-ssa.c (pass_early_warn_uninitialized,
        pass_late_warn_uninitialized): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unique-pass-names.patch
Type: application/octet-stream
Size: 11119 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090615/b95e58e8/attachment.obj>


More information about the Gcc-patches mailing list