在 2017年07月06日 17:02, Leslie Zhai 写道:
Hi GCC developers,
As ChangeLog-2014 mentioned, tree-pass.h (TODO_verify_ssa,
TODO_verify_flow, TODO_verify_stmts...): Remove.
When I am trying to migrate:
static struct rtl_opt_pass pass_rtl_emit_function = { {
RTL_PASS, "rtl_emit_function", /* name */
#if (GCC_MINOR >= 8)
OPTGROUP_NONE, /* optinfo_flags */
#endif
NULL, /* gate */
rtl_emit_function, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_NONE, /* tv_id */
PROP_ssa | PROP_gimple_leh | PROP_cfg, /* properties_required */
0, /* properties_provided */
PROP_ssa | PROP_trees, /* properties_destroyed */
TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts
} };
to GCC v6.x
const pass_data pass_data_rtl_emit_function = {
RTL_PASS, /* type */
"rtl_emit_function", /* name */
OPTGROUP_NONE, /* optinfo_flags */
TV_NONE, /* tv_id */
PROP_ssa | PROP_gimple_leh | PROP_cfg, /* properties_required */
0, /* properties_provided */
PROP_ssa | PROP_trees, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish, /* todo_flags_finish */
Just 0
because const pass_data pass_data_dse migrate the todo_flags as
https://github.com/gcc-mirror/gcc/blob/master/gcc/tree-ssa-dse.c#L818
};
class pass_rtl_emit_function : public rtl_opt_pass {
public:
pass_rtl_emit_function(gcc::context *ctxt)
: rtl_opt_pass(pass_data_rtl_emit_function, ctxt) {}
virtual unsigned int execute(function *) { return
rtl_emit_function(); }
};
I have no idea how to choose the todo_flags_XXX, please give me some
hint, thanks a lot!
--
Regards,
Leslie Zhai https://reviews.llvm.org/p/xiangzhai/