summaryrefslogtreecommitdiff
path: root/gcc/modulo-sched.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-09 15:57:43 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-09 15:57:43 +0000
commiteacbf1cd3aff3dbf47a71dc7fdb1d01dce8e777e (patch)
tree1bfb594134ffebca206d3ed2fe55693634759c1d /gcc/modulo-sched.c
parent11fd42e7594bdb9c8d9cf10f9924cb8644752b78 (diff)
downloadgcc-eacbf1cd3aff3dbf47a71dc7fdb1d01dce8e777e.tar.gz
2013-09-09 Basile Starynkevitch <basile@starynkevitch.net>
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 <basile@starynkevitch.net> {{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
Diffstat (limited to 'gcc/modulo-sched.c')
-rw-r--r--gcc/modulo-sched.c57
1 files changed, 37 insertions, 20 deletions
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 1e9b16c6fcb..0df5fb61a25 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -3351,24 +3351,41 @@ rest_of_handle_sms (void)
return 0;
}
-struct rtl_opt_pass pass_sms =
-{
- {
- RTL_PASS,
- "sms", /* name */
- OPTGROUP_NONE, /* optinfo_flags */
- gate_handle_sms, /* gate */
- rest_of_handle_sms, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_SMS, /* tv_id */
- 0, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_df_finish
- | TODO_verify_flow
- | TODO_verify_rtl_sharing /* todo_flags_finish */
- }
+namespace {
+
+const pass_data pass_data_sms =
+{
+ RTL_PASS, /* type */
+ "sms", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_SMS, /* tv_id */
+ 0, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ ( TODO_df_finish | TODO_verify_flow
+ | TODO_verify_rtl_sharing ), /* todo_flags_finish */
};
+
+class pass_sms : public rtl_opt_pass
+{
+public:
+ pass_sms(gcc::context *ctxt)
+ : rtl_opt_pass(pass_data_sms, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return gate_handle_sms (); }
+ unsigned int execute () { return rest_of_handle_sms (); }
+
+}; // class pass_sms
+
+} // anon namespace
+
+rtl_opt_pass *
+make_pass_sms (gcc::context *ctxt)
+{
+ return new pass_sms (ctxt);
+}