diff options
Diffstat (limited to 'gcc/tree-ssa-copyrename.c')
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 6f49b7ecf5a..990598ef29b 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -435,22 +435,41 @@ gate_copyrename (void) return flag_tree_copyrename != 0; } -struct gimple_opt_pass pass_rename_ssa_copies = +namespace { + +const pass_data pass_data_rename_ssa_copies = { - { - GIMPLE_PASS, - "copyrename", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - gate_copyrename, /* gate */ - rename_ssa_copies, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_TREE_COPY_RENAME, /* tv_id */ - PROP_cfg | PROP_ssa, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_verify_ssa /* todo_flags_finish */ - } + GIMPLE_PASS, /* type */ + "copyrename", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ + true, /* has_gate */ + true, /* has_execute */ + TV_TREE_COPY_RENAME, /* tv_id */ + ( PROP_cfg | PROP_ssa ), /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + TODO_verify_ssa, /* todo_flags_finish */ }; + +class pass_rename_ssa_copies : public gimple_opt_pass +{ +public: + pass_rename_ssa_copies(gcc::context *ctxt) + : gimple_opt_pass(pass_data_rename_ssa_copies, ctxt) + {} + + /* opt_pass methods: */ + opt_pass * clone () { return new pass_rename_ssa_copies (ctxt_); } + bool gate () { return gate_copyrename (); } + unsigned int execute () { return rename_ssa_copies (); } + +}; // class pass_rename_ssa_copies + +} // anon namespace + +gimple_opt_pass * +make_pass_rename_ssa_copies (gcc::context *ctxt) +{ + return new pass_rename_ssa_copies (ctxt); +} |