summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ifcombine.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-ifcombine.c')
-rw-r--r--gcc/tree-ssa-ifcombine.c53
1 files changed, 35 insertions, 18 deletions
diff --git a/gcc/tree-ssa-ifcombine.c b/gcc/tree-ssa-ifcombine.c
index 9598eb81a45..984a7634ef6 100644
--- a/gcc/tree-ssa-ifcombine.c
+++ b/gcc/tree-ssa-ifcombine.c
@@ -648,23 +648,40 @@ gate_ifcombine (void)
return 1;
}
-struct gimple_opt_pass pass_tree_ifcombine =
+namespace {
+
+const pass_data pass_data_tree_ifcombine =
{
- {
- GIMPLE_PASS,
- "ifcombine", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- gate_ifcombine, /* gate */
- tree_ssa_ifcombine, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_TREE_IFCOMBINE, /* tv_id */
- PROP_cfg | PROP_ssa, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_update_ssa
- | TODO_verify_ssa /* todo_flags_finish */
- }
+ GIMPLE_PASS, /* type */
+ "ifcombine", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_TREE_IFCOMBINE, /* tv_id */
+ ( PROP_cfg | PROP_ssa ), /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_update_ssa | TODO_verify_ssa ), /* todo_flags_finish */
};
+
+class pass_tree_ifcombine : public gimple_opt_pass
+{
+public:
+ pass_tree_ifcombine(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_tree_ifcombine, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return gate_ifcombine (); }
+ unsigned int execute () { return tree_ssa_ifcombine (); }
+
+}; // class pass_tree_ifcombine
+
+} // anon namespace
+
+gimple_opt_pass *
+make_pass_tree_ifcombine (gcc::context *ctxt)
+{
+ return new pass_tree_ifcombine (ctxt);
+}