From eacbf1cd3aff3dbf47a71dc7fdb1d01dce8e777e Mon Sep 17 00:00:00 2001 From: bstarynk Date: Mon, 9 Sep 2013 15:57:43 +0000 Subject: 2013-09-09 Basile Starynkevitch MELT branch merged with trunk rev 202389 using svnmerge.py; notice that gcc/melt/xtramelt-ana-base.melt has been significantly updated, but some updates are yet missing... [gcc/] 2013-09-09 Basile Starynkevitch {{When merging trunk GCC 4.9 with C++ passes}} * melt/xtramelt-ana-base.melt: Add GCC 4.9 specific code, still incomplete, for classy passes.... Only Gimple passes are yet possible... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@202408 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ree.c | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) (limited to 'gcc/ree.c') diff --git a/gcc/ree.c b/gcc/ree.c index c0d43c8f72a..4dab6e91995 100644 --- a/gcc/ree.c +++ b/gcc/ree.c @@ -940,23 +940,40 @@ gate_handle_ree (void) return (optimize > 0 && flag_ree); } -struct rtl_opt_pass pass_ree = +namespace { + +const pass_data pass_data_ree = { - { - RTL_PASS, - "ree", /* name */ - OPTGROUP_NONE, /* optinfo_flags */ - gate_handle_ree, /* gate */ - rest_of_handle_ree, /* execute */ - NULL, /* sub */ - NULL, /* next */ - 0, /* static_pass_number */ - TV_REE, /* tv_id */ - 0, /* properties_required */ - 0, /* properties_provided */ - 0, /* properties_destroyed */ - 0, /* todo_flags_start */ - TODO_df_finish - | TODO_verify_rtl_sharing, /* todo_flags_finish */ - } + RTL_PASS, /* type */ + "ree", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ + true, /* has_gate */ + true, /* has_execute */ + TV_REE, /* tv_id */ + 0, /* properties_required */ + 0, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + ( TODO_df_finish | TODO_verify_rtl_sharing ), /* todo_flags_finish */ }; + +class pass_ree : public rtl_opt_pass +{ +public: + pass_ree(gcc::context *ctxt) + : rtl_opt_pass(pass_data_ree, ctxt) + {} + + /* opt_pass methods: */ + bool gate () { return gate_handle_ree (); } + unsigned int execute () { return rest_of_handle_ree (); } + +}; // class pass_ree + +} // anon namespace + +rtl_opt_pass * +make_pass_ree (gcc::context *ctxt) +{ + return new pass_ree (ctxt); +} -- cgit v1.2.1