summaryrefslogtreecommitdiff
path: root/gcc/tree-ssanames.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r--gcc/tree-ssanames.c51
1 files changed, 34 insertions, 17 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 0a405ce2a30..a6af3da192c 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -440,22 +440,39 @@ release_dead_ssa_names (void)
return 0;
}
-struct gimple_opt_pass pass_release_ssa_names =
+namespace {
+
+const pass_data pass_data_release_ssa_names =
{
- {
- GIMPLE_PASS,
- "release_ssa", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- NULL, /* gate */
- release_dead_ssa_names, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_TREE_SSA_OTHER, /* tv_id */
- PROP_ssa, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- TODO_remove_unused_locals, /* todo_flags_start */
- 0 /* todo_flags_finish */
- }
+ GIMPLE_PASS, /* type */
+ "release_ssa", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ false, /* has_gate */
+ true, /* has_execute */
+ TV_TREE_SSA_OTHER, /* tv_id */
+ PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ TODO_remove_unused_locals, /* todo_flags_start */
+ 0, /* todo_flags_finish */
};
+
+class pass_release_ssa_names : public gimple_opt_pass
+{
+public:
+ pass_release_ssa_names(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_release_ssa_names, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ unsigned int execute () { return release_dead_ssa_names (); }
+
+}; // class pass_release_ssa_names
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_release_ssa_names (gcc::context *ctxt)
+{
+ return new pass_release_ssa_names (ctxt);
+}