aboutsummaryrefslogtreecommitdiff
path: root/gcc/postreload.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r--gcc/postreload.c53
1 files changed, 35 insertions, 18 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c
index f340503..97d7e5d 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -2339,23 +2339,40 @@ rest_of_handle_postreload (void)
return 0;
}
-struct rtl_opt_pass pass_postreload_cse =
+namespace {
+
+const pass_data pass_data_postreload_cse =
{
- {
- RTL_PASS,
- "postreload", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- gate_handle_postreload, /* gate */
- rest_of_handle_postreload, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_RELOAD_CSE_REGS, /* tv_id */
- 0, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_df_finish | TODO_verify_rtl_sharing |
- 0 /* todo_flags_finish */
- }
+ RTL_PASS, /* type */
+ "postreload", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_RELOAD_CSE_REGS, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_df_finish | TODO_verify_rtl_sharing | 0 ), /* todo_flags_finish */
};
+
+class pass_postreload_cse : public rtl_opt_pass
+{
+public:
+ pass_postreload_cse(gcc::context *ctxt)
+ : rtl_opt_pass(pass_data_postreload_cse, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return gate_handle_postreload (); }
+ unsigned int execute () { return rest_of_handle_postreload (); }
+
+}; // class pass_postreload_cse
+
+} // anon namespace
+
+rtl_opt_pass *
+make_pass_postreload_cse (gcc::context *ctxt)
+{
+ return new pass_postreload_cse (ctxt);
+}