GCC Middle and Back End API Reference
|
#include <pass_manager.h>
Public Member Functions | |
pass_manager (context *ctxt) | |
~pass_manager () | |
void | register_pass (struct register_pass_info *pass_info) |
void | register_one_dump_file (opt_pass *pass) |
opt_pass * | get_pass_for_id (int id) const |
void | dump_passes () const |
void | dump_profile_report () const |
void | finish_optimization_passes () |
void | execute_early_local_passes () |
unsigned int | execute_pass_mode_switching () |
opt_pass * | get_pass_split_all_insns () const |
opt_pass * | get_pass_mode_switching () const |
opt_pass * | get_pass_peephole2 () const |
opt_pass * | get_pass_profile () const |
void | register_pass_name (opt_pass *pass, const char *name) |
opt_pass * | get_pass_by_name (const char *name) |
opt_pass * | get_rest_of_compilation () const |
opt_pass * | get_clean_slate () const |
Private Member Functions | |
void | set_pass_for_id (int id, opt_pass *pass) |
void | register_dump_files (opt_pass *pass) |
void | create_pass_tab () const |
Private Attributes | |
context * | m_ctxt |
hash_map< free_string_hash, opt_pass * > * | m_name_to_pass_map |
pass_manager::pass_manager | ( | context * | ctxt | ) |
Construct the pass tree. The sequencing of passes is driven by the cgraph routines: finalize_compilation_unit () for each node N in the cgraph cgraph_analyze_function (N) cgraph_lower_function (N) -> all_lowering_passes If we are optimizing, compile is then invoked: compile () ipa_passes () -> all_small_ipa_passes -> Analysis of all_regular_ipa_passes * possible LTO streaming at compilation time * -> Execution of all_regular_ipa_passes * possible LTO streaming at link time * -> all_late_ipa_passes expand_all_functions () for each node N in the cgraph expand_function (N) -> Transformation of all_regular_ipa_passes -> all_passes
References all_late_ipa_passes, all_lowering_passes, all_passes, all_regular_ipa_passes, all_small_ipa_passes, GCC_PASS_LISTS, and register_dump_files().
pass_manager::~pass_manager | ( | ) |
References GCC_PASS_LISTS, ggc_alloc(), m_name_to_pass_map, and passes_by_id.
The function traverses NAME_TO_PASS_MAP and creates a pass info table for dumping purpose.
References ggc_alloc(), m_name_to_pass_map, NULL, pass_tab, passes_by_id_size, passes_pass_traverse(), and hash_map< KeyId, Value, Traits >::traverse().
Referenced by dump_passes().
void pass_manager::dump_passes | ( | ) | const |
void pass_manager::dump_profile_report | ( | ) | const |
References dump_begin(), dump_end(), dump_file, profile_record::dyn_mismatched_count_in, profile_record::dyn_mismatched_prob_out, gcc::context::get_dumps(), ggc_alloc(), GIMPLE_PASS, i, m_ctxt, pass_data::name, NULL, profile_record::num_mismatched_count_in, profile_record::num_mismatched_prob_out, passes_by_id, passes_by_id_size, RTL_PASS, profile_record::size, TDI_profile_report, profile_record::time, and pass_data::type.
Referenced by dump_profile_report().
void pass_manager::execute_early_local_passes | ( | ) |
References cfun, execute_pass_list(), and ggc_alloc().
Referenced by cgraph_node::add_new_function(), and symbol_table::process_new_functions().
unsigned int pass_manager::execute_pass_mode_switching | ( | ) |
References cfun, and ggc_alloc().
References end_branch_prob(), finish_graph_dump_file(), free(), gcc::context::get_dumps(), ggc_alloc(), i, m_ctxt, NULL, TDI_end, timevar_pop(), and timevar_push().
Referenced by finalize().
|
inline |
References ggc_alloc().
Referenced by run_rtl_passes().
Returns the pass with NAME.
References hash_map< KeyId, Value, Traits >::get(), m_name_to_pass_map, and NULL.
Referenced by enable_disable_pass().
opt_pass * pass_manager::get_pass_for_id | ( | int | id | ) | const |
Return the pass with the static pass number ID.
References NULL, passes_by_id, and passes_by_id_size.
|
inline |
References ggc_alloc().
|
inline |
References ggc_alloc().
|
inline |
References ggc_alloc().
Referenced by coverage_init().
|
inline |
References ggc_alloc().
|
inline |
References ggc_alloc().
Referenced by run_rtl_passes().
Register the dump files for the pass_manager starting at PASS.
References pass_data::name, opt_pass::next, register_dump_files(), register_one_dump_file(), and opt_pass::sub.
Referenced by pass_manager(), and register_dump_files().
References CONST_CAST, DK_ipa, DK_rtl, DK_tree, free(), gcc::context::get_dumps(), ggc_alloc(), GIMPLE_PASS, IPA_PASS, m_ctxt, pass_data::name, NULL, OPTGROUP_IPA, OPTGROUP_NONE, OPTGROUP_OTHER, pass_data::optinfo_flags, register_pass_name(), set_pass_for_id(), SIMPLE_IPA_PASS, opt_pass::static_pass_number, and pass_data::type.
Referenced by register_dump_files(), and register_one_dump_file().
void pass_manager::register_pass | ( | struct register_pass_info * | pass_info | ) |
References added_pass_nodes, all_late_ipa_passes, all_lowering_passes, all_passes, all_regular_ipa_passes, all_small_ipa_passes, fatal_error(), gcc::context::get_dumps(), ggc_alloc(), input_location, m_ctxt, pass_list_node::next, pass_list_node::pass, and position_pass().
Referenced by register_pass(), and register_pass().
Register PASS with NAME.
References hash_map< KeyId, Value, Traits >::get(), m_name_to_pass_map, and hash_map< KeyId, Value, Traits >::put().
Referenced by register_one_dump_file().
Set the static pass number of pass PASS to ID and record that in the mapping from static pass number to pass.
References ggc_alloc(), passes_by_id, passes_by_id_size, and opt_pass::static_pass_number.
Referenced by register_one_dump_file().
opt_pass* gcc::pass_manager::all_late_ipa_passes |
Referenced by symbol_table::compile(), dump_passes(), pass_manager(), and register_pass().
opt_pass* gcc::pass_manager::all_lowering_passes |
Referenced by cgraph_node::analyze(), dump_passes(), pass_manager(), and register_pass().
opt_pass* gcc::pass_manager::all_passes |
Referenced by dump_passes(), cgraph_node::expand(), pass_manager(), and register_pass().
opt_pass* gcc::pass_manager::all_regular_ipa_passes |
Referenced by dump_passes(), pass_manager(), and register_pass().
opt_pass* gcc::pass_manager::all_small_ipa_passes |
Referenced by dump_passes(), pass_manager(), and register_pass().
|
private |
Referenced by dump_profile_report(), finish_optimization_passes(), register_one_dump_file(), and register_pass().
|
private |
Referenced by create_pass_tab(), get_pass_by_name(), register_pass_name(), and ~pass_manager().
opt_pass** gcc::pass_manager::pass_lists[PASS_LIST_NUM] |
opt_pass** gcc::pass_manager::passes_by_id |
Referenced by dump_profile_report(), get_pass_for_id(), set_pass_for_id(), and ~pass_manager().
int gcc::pass_manager::passes_by_id_size |
Referenced by create_pass_tab(), dump_profile_report(), get_pass_for_id(), and set_pass_for_id().