diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-05 20:01:43 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-05 20:01:43 +0000 |
commit | bcfddb5b871250af38e3023c5d26e19fcf524bf2 (patch) | |
tree | cdd5686bbad14a7a9b7c4e8de621c8b7b8826c56 /gcc/cgraphunit.c | |
parent | cdbf60c9b10cc26cc0db84078d0725de865fb09b (diff) | |
download | gcc-bcfddb5b871250af38e3023c5d26e19fcf524bf2.tar.gz |
Handwritten part of conversion of passes to C++ classes
gcc/
* Makefile.in (PASS_MANAGER_H): Add dep on pass-instances.def.
(toplev.o): Add dep on PASS_MANAGER_H.
* cgraphunit.c (cgraph_process_new_functions): Rework invocation
of early local pases to reflect this moving from a global to a
member of gcc::pass_manager.
(cgraph_add_new_function): Likewise.
* lto-cgraph.c (lto_output_node): Update for conversion of
struct ipa_opt_pass_d to a C++ subclass of opt_pass.
* passes.c (opt_pass::clone): New.
(opt_pass::gate): New.
(opt_pass::execute): New.
(opt_pass::opt_pass): New.
(pass_manager::execute_early_local_passes): New.
(pass_manager::execute_pass_mode_switching): new.
(finish_optimization_passes): Convert to...
(pass_manager::finish_optimization_passes): ...this.
(finish_optimization_passes): Update for conversion of passes to
C++ classes.
(register_dump_files_1): Use has_gate since we cannot portably
check a vtable entry against NULL.
(dump_one_pass): Likewise.
(ipa_write_summaries_2): Likewise.
(ipa_write_optimization_summaries_1): Likewise.
(ipa_read_summaries_1): Likewise.
(ipa_read_optimization_summaries_1): Likewise.
(execute_ipa_stmt_fixups): Likewise.
(pass_manager::pass_manager): Rewrite pass-creation, invoking
pass-creation functions rather than wiring up globals, and
storing the results in fields of pass_manager generated using
pass-instances.def.
(pass_manager::dump_profile_report): Update for conversion of
passes to C++ classes.
(pass_manager::execute_ipa_summary_passes): Likewise.
(execute_one_ipa_transform_pass): Likewise.
(execute_one_pass): Use has_gate and has_execute since we cannot
portably check a vtable entry against NULL.
* pass_manager.h (pass_manager::finish_optimization_passes): New.
(pass_manager): Use pass-instances.def to add fields for the
various pass instances.
* toplev.c (finalize): Update for move of
finish_optimization_passes to a method of gcc::pass_manager.
* toplev.h (finish_optimization_passes): Move to method of class
pass_manager.
* tree-pass.h (struct pass_data): New.
(opt_pass): Convert to C++ class, make it a subclass of
pass_data.
(opt_pass::gate): Convert to virtual function.
(opt_pass::~opt_pass): New.
(opt_pass::clone): New.
(opt_pass::execute): Convert to virtual function.
(opt_pass::opt_pass): New.
(opt_pass::ctxt_): new.
(gimple_opt_pass): Convert to subclass of opt_pass.
(gimple_opt_pass::gimple_opt_pass): New.
(rtl_opt_pass): Convert to subclass of opt_pass.
(rtl_opt_pass::rtl_opt_pass): New.
(ipa_opt_pass_d): Convert to subclass of opt_pass.
(ipa_opt_pass_d::ipa_opt_pass_d): New.
(simple_ipa_opt_pass): Convert to subclass of opt_pass.
(simple_ipa_opt_pass::simple_ipa_opt_pass): New.
* config/i386/i386.c (rest_of_handle_insert_vzeroupper): Rework
invocation of pass_mode_switching to reflect this moving from a
global to a member of gcc::pass_manager.
(ix86_option_override): Rework how pass_insert_vzeroupper is
added to the pass_manager to reflect autogenerated changes.
* config/i386/t-i386 (i386.o) Add deps on CONTEXT_H and
PASS_MANAGER_H.
gcc/testsuite/
* g++.dg/plugin/dumb_plugin.c (plugin_init): Rework how the pass
is created and added to the pass_manager to reflect
autogenerated changes.
* g++.dg/plugin/selfassign.c (plugin_init): Likewise.
* gcc.dg/plugin/one_time_plugin.c (plugin_init): Likewise.
* gcc.dg/plugin/selfassign.c (plugin_init): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201505 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index e308b524850..ad91117d6b1 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -325,7 +325,7 @@ cgraph_process_new_functions (void) push_cfun (DECL_STRUCT_FUNCTION (fndecl)); if (cgraph_state == CGRAPH_STATE_IPA_SSA && !gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl))) - execute_pass_list (pass_early_local_passes.pass.sub); + g->get_passes ()->execute_early_local_passes (); else if (inline_summary_vec != NULL) compute_inline_parameters (node, true); free_dominance_info (CDI_POST_DOMINATORS); @@ -509,7 +509,7 @@ cgraph_add_new_function (tree fndecl, bool lowered) gimple_register_cfg_hooks (); bitmap_obstack_initialize (NULL); execute_pass_list (passes->all_lowering_passes); - execute_pass_list (pass_early_local_passes.pass.sub); + passes->execute_early_local_passes (); bitmap_obstack_release (NULL); pop_cfun (); @@ -534,7 +534,7 @@ cgraph_add_new_function (tree fndecl, bool lowered) gimple_register_cfg_hooks (); bitmap_obstack_initialize (NULL); if (!gimple_in_ssa_p (DECL_STRUCT_FUNCTION (fndecl))) - execute_pass_list (pass_early_local_passes.pass.sub); + g->get_passes ()->execute_early_local_passes (); bitmap_obstack_release (NULL); pop_cfun (); expand_function (node); |