aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-into-ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-into-ssa.c')
-rw-r--r--gcc/tree-into-ssa.c54
1 files changed, 35 insertions, 19 deletions
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 4c630a3..33d4ba8 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -2410,27 +2410,43 @@ rewrite_into_ssa (void)
}
-struct gimple_opt_pass pass_build_ssa =
-{
- {
- GIMPLE_PASS,
- "ssa", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- NULL, /* gate */
- rewrite_into_ssa, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_TREE_SSA_OTHER, /* tv_id */
- PROP_cfg, /* properties_required */
- PROP_ssa, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_verify_ssa
- | TODO_remove_unused_locals /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_build_ssa =
+{
+ GIMPLE_PASS, /* type */
+ "ssa", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ false, /* has_gate */
+ true, /* has_execute */
+ TV_TREE_SSA_OTHER, /* tv_id */
+ PROP_cfg, /* properties_required */
+ PROP_ssa, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_verify_ssa | TODO_remove_unused_locals ), /* todo_flags_finish */
};
+class pass_build_ssa : public gimple_opt_pass
+{
+public:
+ pass_build_ssa(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_build_ssa, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ unsigned int execute () { return rewrite_into_ssa (); }
+
+}; // class pass_build_ssa
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_build_ssa (gcc::context *ctxt)
+{
+ return new pass_build_ssa (ctxt);
+}
+
/* Mark the definition of VAR at STMT and BB as interesting for the
renamer. BLOCKS is the set of blocks that need updating. */