GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "df.h"
#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "emit-rtl.h"
#include "cgraph.h"
#include "lto-streamer.h"
#include "fold-const.h"
#include "varasm.h"
#include "output.h"
#include "graph.h"
#include "debug.h"
#include "cfgloop.h"
#include "value-prof.h"
#include "tree-cfg.h"
#include "tree-ssa-loop-manip.h"
#include "tree-into-ssa.h"
#include "tree-dfa.h"
#include "tree-ssa.h"
#include "tree-pass.h"
#include "plugin.h"
#include "ipa-utils.h"
#include "tree-pretty-print.h"
#include "context.h"
#include "pass_manager.h"
#include "cfgrtl.h"
#include "tree-ssa-live.h"
#include "tree-cfgcleanup.h"
#include "insn-addr.h"
#include "diagnostic-core.h"
#include "stringpool.h"
#include "attribs.h"
#include "pass-instances.def"
Data Structures | |
struct | uid_range |
struct | pass_list_node |
Macros | |
#define | INSERT_PASSES_AFTER(PASS) |
#define | PUSH_INSERT_PASSES_WITHIN(PASS, NUM) |
#define | POP_INSERT_PASSES() |
#define | NEXT_PASS(PASS, NUM) |
#define | NEXT_PASS_WITH_ARG(PASS, NUM, ARG) |
#define | TERMINATE_PASS_LIST(PASS) |
#define | DEF_PASS_LIST(LIST) |
#define | INSERT_PASSES_AFTER(PASS) |
#define | TERMINATE_PASS_LIST(PASS) |
#define | PUSH_INSERT_PASSES_WITHIN(PASS, NUM) |
#define | POP_INSERT_PASSES() |
#define | NEXT_PASS(PASS, NUM) |
#define | NEXT_PASS_WITH_ARG(PASS, NUM, ARG) |
#define | DEF_PASS_LIST(LIST) |
Typedefs | |
typedef const char * | char_ptr |
typedef struct uid_range * | uid_range_p |
Variables | |
opt_pass * | current_pass |
bool | in_gimple_form |
static vec< char_ptr > | pass_tab |
static vec< uid_range_p > | enabled_pass_uid_range_tab |
static vec< uid_range_p > | disabled_pass_uid_range_tab |
static struct pass_list_node * | added_pass_nodes = NULL |
static struct pass_list_node * | prev_added_pass_node |
static struct profile_record * | profile_record |
#define DEF_PASS_LIST | ( | LIST | ) |
#define DEF_PASS_LIST | ( | LIST | ) |
#define INSERT_PASSES_AFTER | ( | PASS | ) |
#define INSERT_PASSES_AFTER | ( | PASS | ) |
#define NEXT_PASS | ( | PASS, | |
NUM ) |
#define NEXT_PASS | ( | PASS, | |
NUM ) |
#define NEXT_PASS_WITH_ARG | ( | PASS, | |
NUM, | |||
ARG ) |
#define NEXT_PASS_WITH_ARG | ( | PASS, | |
NUM, | |||
ARG ) |
#define POP_INSERT_PASSES | ( | ) |
#define POP_INSERT_PASSES | ( | ) |
#define PUSH_INSERT_PASSES_WITHIN | ( | PASS, | |
NUM ) |
#define TERMINATE_PASS_LIST | ( | PASS | ) |
#define TERMINATE_PASS_LIST | ( | PASS | ) |
typedef const char* char_ptr |
Map from pass id to canonicalized pass name.
typedef struct uid_range* uid_range_p |
|
static |
Account profile the pass with static number INDEX. RUN is true if the pass really runs, or FALSE if we are only book-keeping on passes that may have selectively disabled themselves on a given function.
References g, gcc_assert, gcc::context::get_passes(), gcc::pass_manager::passes_by_id_size, profile_record_account_profile(), and profile_record::run.
Referenced by account_profile_1(), account_profile_in_list(), execute_all_ipa_transforms(), and execute_one_pass().
|
static |
Account profile for IPA pass. Callback for do_per_function.
References account_profile(), check_profile_consistency(), pop_cfun(), push_cfun(), and opt_pass::static_pass_number.
Referenced by execute_one_pass().
|
static |
Account profile chnages to all passes in list starting in SUB.
References account_profile(), account_profile_in_list(), and check_profile_consistency().
Referenced by account_profile_in_list(), and execute_one_pass().
|
static |
Update static_pass_number for passes (and the flag TODO_mark_first_instance). Passes are constructed with static_pass_number preinitialized to 0 This field is used in two different ways: initially as instance numbers of their kind, and then as ids within the entire pass manager. Within pass_manager::pass_manager: * In add_pass_instance(), as called by next_pass_1 in NEXT_PASS in init_optimization_passes * When the initial instance of a pass within a pass manager is seen, it is flagged, and its static_pass_number is set to -1 * On subsequent times that it is seen, the static pass number is decremented each time, so that if there are e.g. 4 dups, they have static_pass_number -4, 2, 3, 4 respectively (note how the initial one is negative and gives the count); these can be thought of as instance numbers of the specific pass * Within the register_dump_files () traversal, set_pass_for_id() is called on each pass, using these instance numbers to create dumpfile switches, and then overwriting them with a pass id, which are global to the whole pass manager (based on (TDI_end + current value of extra_dump_files_in_use) )
References invoke_plugin_callbacks(), pass_data::name, opt_pass::static_pass_number, pass_data::todo_flags_start, and TODO_mark_first_instance.
Referenced by next_pass_1(), and position_pass().
|
static |
Do profile consistency book-keeping for the pass with static number INDEX. RUN is true if the pass really runs, or FALSE if we are only book-keeping on passes that may have selectively disabled themselves on a given function.
References g, gcc_assert, gcc::context::get_passes(), gcc::pass_manager::passes_by_id_size, profile_record_check_consistency(), and profile_record::run.
Referenced by account_profile_1(), account_profile_in_list(), execute_all_ipa_transforms(), and execute_one_pass().
|
static |
DEBUG_FUNCTION void debug_pass | ( | void | ) |
Call from the debugger to get the current pass name.
References print_current_pass().
|
extern |
References dump_properties().
|
static |
References delete_pass_tree(), opt_pass::next, and opt_pass::sub.
Referenced by delete_pass_tree().
|
static |
Determine if PASS_NAME matches CRITERION. Not a pure predicate, since it can update CRITERION, to support matching the Nth invocation of a pass. Subroutine of should_skip_pass_p.
Referenced by should_skip_pass_p().
void disable_pass | ( | const char * | arg | ) |
Disable pass specified by ARG.
References enable_disable_pass().
Referenced by handle_common_deferred_options().
If we are in IPA mode (i.e., current_function_decl is NULL), call function CALLBACK for every function in the call graph. Otherwise, call CALLBACK on the current function.
References symtab_node::analyzed, cfun, cgraph_node::clone_of, current_function_decl, symtab_node::decl, DECL_STRUCT_FUNCTION, FOR_EACH_DEFINED_FUNCTION, and gimple_has_body_p().
Referenced by execute_one_ipa_transform_pass(), execute_one_pass(), and execute_todo().
If we are in IPA mode (i.e., current_function_decl is NULL), call function CALLBACK for every function in the call graph. Otherwise, call CALLBACK on the current function. This function is global so that plugins can use it.
References symbol_table::add_cgraph_duplication_hook(), symbol_table::add_cgraph_insertion_hook(), symbol_table::add_cgraph_removal_hook(), cfun, symbol_table::cgraph_count, hash_set< KeyId, Lazy, Traits >::contains(), current_function_decl, symtab_node::decl, DECL_STRUCT_FUNCTION, duplicate_cgraph_node_to_order(), free(), cgraph_node::has_gimple_body_p(), i, insert_cgraph_node_to_order(), ipa_reverse_postorder(), NULL, pop_cfun(), cgraph_node::process, push_cfun(), symbol_table::remove_cgraph_duplication_hook(), symbol_table::remove_cgraph_insertion_hook(), remove_cgraph_node_from_order(), symbol_table::remove_cgraph_removal_hook(), and symtab.
Referenced by execute_ipa_pass_list().
|
static |
Dump the instantiated name for PASS. IS_ON indicates if PASS is turned on or not.
References cfun, current_function_decl, opt_pass::gate(), pass_data::name, override_gate_status(), pass_tab, and opt_pass::static_pass_number.
Referenced by dump_pass_list().
|
static |
Dump pass list PASS with indentation INDENT.
References dump_one_pass(), dump_pass_list(), opt_pass::next, and opt_pass::sub.
Referenced by dump_pass_list(), and gcc::pass_manager::dump_passes().
void dump_passes | ( | void | ) |
Dump all optimization passes.
References gcc::pass_manager::dump_passes(), g, and gcc::context::get_passes().
Referenced by symbol_table::finalize_compilation_unit().
void dump_profile_report | ( | void | ) |
Output profile consistency.
References gcc::pass_manager::dump_profile_report(), g, and gcc::context::get_passes().
Referenced by finalize().
|
extern |
References PROP_cfg, PROP_cfglayout, PROP_gimple_any, PROP_gimple_lcf, PROP_gimple_lcx, PROP_gimple_leh, PROP_gimple_lomp, PROP_gimple_lomp_dev, PROP_gimple_lvec, PROP_no_crit_edges, PROP_rtl, and PROP_ssa.
Referenced by debug_properties().
|
static |
Hook called when NODE is duplicated and therefore should be excluded from removed_nodes. DATA is a hash set with removed nodes.
References hash_set< KeyId, Lazy, Traits >::contains(), gcc_checking_assert, and hash_set< KeyId, Lazy, Traits >::remove().
Referenced by do_per_function_toporder().
void emergency_dump_function | ( | void | ) |
This function is called when an internal compiler error is encountered. Ensure that function dump is made available before compiler is aborted.
References cfun, current_pass, symbol_table::dump(), dump_file, dump_file_name, dump_flags, execute_function_dump(), finish_graph_dump_file(), fnotice(), GIMPLE_PASS, IPA_PASS, pass_data::name, PROP_cfg, RTL_PASS, symtab, TDF_GRAPH, and pass_data::type.
Referenced by internal_error_function().
|
static |
Parse option string for -fdisable- and -fenable- The syntax of the options: -fenable-<pass_name> -fdisable-<pass_name> -fenable-<pass_name>=s1:e1,s2:e2,... -fdisable-<pass_name>=s1:e1,s2:e2,...
References uid_range::assem_name, disabled_pass_uid_range_tab, enabled_pass_uid_range_tab, error(), free(), g, gcc::pass_manager::get_pass_by_name(), gcc::context::get_passes(), inform(), last, uid_range::last, uid_range::next, NULL, uid_range::start, opt_pass::static_pass_number, and UNKNOWN_LOCATION.
Referenced by disable_pass(), and enable_pass().
void enable_pass | ( | const char * | arg | ) |
Enable pass specified by ARG.
References enable_disable_pass().
Referenced by handle_common_deferred_options().
void execute_all_ipa_stmt_fixups | ( | struct cgraph_node * | node, |
gimple ** | stmts ) |
Execute stmt fixup hooks of all IPA passes for NODE and STMTS.
References gcc::pass_manager::all_regular_ipa_passes, execute_ipa_stmt_fixups(), g, and gcc::context::get_passes().
Referenced by input_function().
void execute_all_ipa_transforms | ( | bool | do_not_collect | ) |
For the current function, execute all ipa transforms.
References account_profile(), cfun, check_profile_consistency(), cgraph_node::clones, current_function_decl, symtab_node::decl, DECL_STRUCT_FUNCTION, execute_one_ipa_transform_pass(), g, gcc_checking_assert, cgraph_node::get(), gcc::pass_manager::get_pass_for_id(), gcc::context::get_passes(), IPA_PASS, cgraph_node::ipa_transforms_to_apply, cgraph_node::materialize_clone(), cgraph_node::next_sibling_clone, pop_cfun(), PROP_gimple, push_cfun(), RTL_PASS, and pass_data::type.
Referenced by cgraph_node::expand(), and cgraph_node::get_body().
|
static |
References IPA_SSA, symbol_table::state, and symtab.
|
static |
Helper function to perform function body dump.
References clean_graph_dump_file(), function::curr_properties, function::decl, dump_file, dump_file_name, dump_flags, dump_function_to_file(), g, gcc::dump_manager::get_dump_file_info(), gcc::context::get_dumps(), get_insns(), dump_file_info::graph_dump_initialized, pop_cfun(), print_graph_cfg(), print_rtl_with_bb(), PROP_cfg, PROP_gimple, push_cfun(), opt_pass::static_pass_number, and TDF_GRAPH.
Referenced by emergency_dump_function(), execute_one_ipa_transform_pass(), and execute_one_pass().
|
static |
Perform all TODO actions that ought to be done on each function.
References CDI_DOMINATORS, CDI_POST_DOMINATORS, cfun, cleanup_tree_cfg(), compute_may_aliases(), current_loops, dom_info_state(), DOM_NONE, execute_update_addresses_taken(), free_dominance_info(), gcc_assert, gimple_body(), function::last_verified, LOOP_CLOSED_SSA, LOOPS_NEED_FIXUP, loops_state_satisfies_p(), need_ssa_update_p(), NULL, pop_cfun(), PROP_cfg, PROP_gimple, PROP_rtl, PROP_ssa, push_cfun(), cgraph_edge::rebuild_edges(), remove_unused_locals(), seen_error(), TODO_cleanup_cfg, TODO_rebuild_alias, TODO_rebuild_cgraph_edges, TODO_remove_unused_locals, TODO_update_address_taken, TODO_update_ssa_any, TODO_verify_all, TODO_verify_il, update_ssa(), verify_flow_info(), verify_gimple_in_cfg(), verify_gimple_in_seq(), verify_loop_closed_ssa(), verify_loop_structure(), verify_rtl_sharing(), and verify_ssa().
Referenced by execute_todo().
void execute_ipa_pass_list | ( | opt_pass * | pass | ) |
Same as execute_pass_list but assume that subpasses of IPA passes are local passes.
References cfun, current_function_decl, do_per_function_toporder(), execute_ipa_pass_list(), execute_one_pass(), execute_pass_list(), gcc_assert, gcc_unreachable, GIMPLE_PASS, invoke_plugin_callbacks(), IPA_PASS, opt_pass::next, NULL, symbol_table::process_new_functions(), SIMPLE_IPA_PASS, opt_pass::sub, symtab, and pass_data::type.
Referenced by symbol_table::compile(), execute_ipa_pass_list(), and ipa_passes().
|
static |
Execute stmt fixup hooks of all passes in PASS for NODE and STMTS.
References cfun, current_pass, execute_ipa_stmt_fixups(), opt_pass::gate(), IPA_PASS, opt_pass::next, pass_fini_dump_file(), pass_init_dump_file(), ipa_opt_pass_d::stmt_fixup, opt_pass::sub, timevar_pop(), timevar_push(), pass_data::tv_id, and pass_data::type.
Referenced by execute_all_ipa_stmt_fixups(), and execute_ipa_stmt_fixups().
void execute_ipa_summary_passes | ( | ipa_opt_pass_d * | ipa_pass | ) |
Execute summary generation for all of the passes in IPA_PASS.
References cfun, current_pass, opt_pass::gate(), ipa_opt_pass_d::generate_summary, IPA_PASS, opt_pass::next, pass_fini_dump_file(), pass_init_dump_file(), timevar_pop(), timevar_push(), pass_data::tv_id, and pass_data::type.
Referenced by ipa_passes().
|
static |
Execute IPA_PASS function transform on NODE.
References cfun, current_pass, do_per_function(), dump_file, execute_function_dump(), execute_todo(), ipa_opt_pass_d::function_transform, ipa_opt_pass_d::function_transform_todo_flags_start, in_gimple_form, NULL, pass_fini_dump_file(), pass_init_dump_file(), PROP_gimple, redirect_edge_var_map_empty(), timevar_pop(), timevar_push(), TODO_do_not_ggc_collect, pass_data::tv_id, TV_NONE, and verify_interpass_invariants().
Referenced by execute_all_ipa_transforms().
Execute PASS.
References account_profile(), account_profile_1(), account_profile_in_list(), CDI_DOMINATORS, CDI_POST_DOMINATORS, cfun, check_profile_consistency(), clear_last_verified(), current_function_decl, current_pass, do_per_function(), dom_info_available_p(), dump_file, opt_pass::execute(), execute_function_dump(), execute_todo(), FOR_EACH_FUNCTION_WITH_GIMPLE_BODY, free_dominance_info(), opt_pass::gate(), gcc_assert, cgraph_node::get(), in_gimple_form, cgraph_node::inlined_to, invoke_plugin_callbacks(), IPA_PASS, cgraph_node::ipa_transforms_to_apply, pass_data::name, NULL, override_gate_status(), pass_fini_dump_file(), pass_init_dump_file(), pop_cfun(), symbol_table::process_new_functions(), PROP_assumptions_done, PROP_cfg, PROP_gimple, pass_data::properties_required, redirect_edge_var_map_empty(), cgraph_node::release_body(), report_heap_memory_use(), RTL_PASS, should_skip_pass_p(), SIMPLE_IPA_PASS, skip_pass(), opt_pass::static_pass_number, opt_pass::sub, symtab, timevar_pop(), timevar_push(), TODO_discard_function, TODO_do_not_ggc_collect, pass_data::todo_flags_finish, pass_data::todo_flags_start, TODO_verify_il, pass_data::tv_id, TV_NONE, pass_data::type, update_properties_after_pass(), verify_curr_properties(), and verify_interpass_invariants().
Referenced by execute_ipa_pass_list(), and execute_pass_list_1().
References CDI_DOMINATORS, CDI_POST_DOMINATORS, function::cfg, cfun, execute_pass_list_1(), free_dominance_info(), and gcc_assert.
Referenced by cgraph_node::add_new_function(), cgraph_node::analyze(), gcc::pass_manager::execute_early_local_passes(), execute_ipa_pass_list(), cgraph_node::expand(), and run_rtl_passes().
|
static |
References cfun, execute_one_pass(), execute_pass_list_1(), gcc_assert, GIMPLE_PASS, opt_pass::next, NULL, RTL_PASS, opt_pass::sub, and pass_data::type.
Referenced by execute_pass_list(), and execute_pass_list_1().
|
static |
Perform all TODO actions.
References cfun, current_function_decl, df_finish_pass(), do_per_function(), symbol_table::dump(), dump_file, execute_function_todo(), flush_ssaname_freelist(), gcc_assert, need_ssa_update_p(), symbol_table::remove_unreachable_nodes(), statistics_fini_pass(), symtab, TODO_df_finish, TODO_df_verify, TODO_dump_symtab, TODO_remove_functions, and TODO_update_ssa_any.
Referenced by execute_one_ipa_transform_pass(), and execute_one_pass().
bool function_called_by_processed_nodes_p | ( | void | ) |
Called by local passes to see if function is called by already processed nodes. Because we process nodes in topological order, this means that function is in recursive cycle or we introduced new direct calls.
References cgraph_edge::caller, current_function_decl, symtab_node::decl, cgraph_node::dump(), dump_file, cgraph_node::get(), cgraph_node::has_gimple_body_p(), cgraph_node::inlined_to, cgraph_edge::next_caller, NULL, cgraph_node::process, and TREE_ASM_WRITTEN.
Referenced by skip_function_for_local_pure_const().
|
static |
Hook called when NODE is insert and therefore should be excluded from removed_nodes. DATA is a hash set with removed nodes.
References hash_set< KeyId, Lazy, Traits >::remove().
Referenced by do_per_function_toporder().
void ipa_read_optimization_summaries | ( | void | ) |
Read all the summaries for all_regular_ipa_passes.
References gcc::pass_manager::all_regular_ipa_passes, g, gcc::context::get_passes(), and ipa_read_optimization_summaries_1().
|
static |
Same as execute_pass_list but assume that subpasses of IPA passes are local passes.
References cfun, current_function_decl, current_pass, opt_pass::gate(), gcc_assert, ggc_grow(), GIMPLE_PASS, IPA_PASS, ipa_read_optimization_summaries_1(), pass_data::name, opt_pass::next, pass_fini_dump_file(), pass_init_dump_file(), ipa_opt_pass_d::read_optimization_summary, report_heap_memory_use(), SIMPLE_IPA_PASS, opt_pass::sub, timevar_pop(), timevar_push(), pass_data::tv_id, and pass_data::type.
Referenced by ipa_read_optimization_summaries(), and ipa_read_optimization_summaries_1().
void ipa_read_summaries | ( | void | ) |
Read all the summaries for all_regular_ipa_passes.
References gcc::pass_manager::all_regular_ipa_passes, g, gcc::context::get_passes(), and ipa_read_summaries_1().
|
static |
Same as execute_pass_list but assume that subpasses of IPA passes are local passes.
References cfun, current_function_decl, current_pass, opt_pass::gate(), gcc_assert, ggc_grow(), GIMPLE_PASS, IPA_PASS, ipa_read_summaries_1(), pass_data::name, opt_pass::next, pass_fini_dump_file(), pass_init_dump_file(), ipa_opt_pass_d::read_summary, report_heap_memory_use(), SIMPLE_IPA_PASS, opt_pass::sub, timevar_pop(), timevar_push(), pass_data::tv_id, and pass_data::type.
Referenced by ipa_read_summaries(), and ipa_read_summaries_1().
void ipa_write_optimization_summaries | ( | lto_symtab_encoder_t | encoder, |
bool | output_offload_tables_p ) |
Write all the optimization summaries for the cgraph nodes in SET. If SET is NULL, write out all summaries of all nodes.
References gcc::pass_manager::all_regular_ipa_passes, g, gcc_assert, gcc_checking_assert, gcc::context::get_passes(), ipa_write_optimization_summaries_1(), lto_delete_out_decl_state(), lto_get_out_decl_state(), lto_new_out_decl_state(), lto_output_init_mode_table(), lto_pop_out_decl_state(), lto_push_out_decl_state(), and write_lto().
|
static |
Same as execute_pass_list but assume that subpasses of IPA passes are local passes. If SET is not NULL, write out optimization summaries of only those node in SET.
References cfun, current_function_decl, current_pass, opt_pass::gate(), gcc_assert, GIMPLE_PASS, IPA_PASS, ipa_write_optimization_summaries_1(), opt_pass::next, pass_fini_dump_file(), pass_init_dump_file(), SIMPLE_IPA_PASS, opt_pass::sub, timevar_pop(), timevar_push(), pass_data::tv_id, pass_data::type, and ipa_opt_pass_d::write_optimization_summary.
Referenced by ipa_write_optimization_summaries(), and ipa_write_optimization_summaries_1().
void ipa_write_summaries | ( | void | ) |
Write out summaries for all the nodes in the callgraph.
References symtab_node::alias, symbol_table::cgraph_count, compute_ltrans_boundary(), symtab_node::decl, cgraph_node::declare_variant_alt, symtab_node::definition, dump_begin(), dump_end(), dump_file, FOR_EACH_DEFINED_FUNCTION, FOR_EACH_DEFINED_VARIABLE, free(), gcc_assert, gimple_has_body_p(), i, ipa_reverse_postorder(), ipa_write_summaries_1(), lto_prepare_function_for_streaming(), lto_set_symtab_encoder_in_partition(), lto_symtab_encoder_new(), symtab_node::need_lto_streaming, NULL, seen_error(), select_what_to_stream(), streamer_dump_file, symtab, and TDI_lto_stream_out.
Referenced by ipa_passes().
|
static |
Helper function of ipa_write_summaries. Creates and destroys the decl state and calls ipa_write_summaries_2 for all passes that have summaries. SET is the set of nodes to be written.
References gcc::pass_manager::all_regular_ipa_passes, g, gcc_assert, gcc::context::get_passes(), ipa_write_summaries_2(), lto_delete_out_decl_state(), lto_get_out_decl_state(), lto_new_out_decl_state(), lto_output_init_mode_table(), lto_pop_out_decl_state(), lto_push_out_decl_state(), and write_lto().
Referenced by ipa_write_summaries().
|
static |
Same as execute_pass_list but assume that subpasses of IPA passes are local passes. If SET is not NULL, write out summaries of only those node in SET.
References cfun, current_function_decl, current_pass, opt_pass::gate(), gcc_assert, GIMPLE_PASS, IPA_PASS, ipa_write_summaries_2(), opt_pass::next, pass_fini_dump_file(), pass_init_dump_file(), SIMPLE_IPA_PASS, opt_pass::sub, timevar_pop(), timevar_push(), pass_data::tv_id, pass_data::type, and ipa_opt_pass_d::write_summary.
Referenced by ipa_write_summaries_1(), and ipa_write_summaries_2().
|
static |
Returns true if PASS is explicitly enabled/disabled for FUNC.
References uid_range::assem_name, DECL_ASSEMBLER_NAME, DECL_ASSEMBLER_NAME_SET_P, cgraph_node::get(), cgraph_node::get_uid(), IDENTIFIER_POINTER, last, uid_range::next, NULL, uid_range::start, and opt_pass::static_pass_number.
Referenced by override_gate_status().
|
static |
|
static |
|
static |
simple_ipa_opt_pass * make_pass_build_ssa_passes | ( | gcc::context * | ctxt | ) |
simple_ipa_opt_pass * make_pass_ipa_remove_symbols | ( | gcc::context * | ctxt | ) |
|
static |
simple_ipa_opt_pass * make_pass_local_optimization_passes | ( | gcc::context * | ctxt | ) |
|
static |
gimple_opt_pass * make_pass_pre_slp_scalar_cleanup | ( | gcc::context * | ctxt | ) |
|
static |
|
static |
Add a pass to the pass list. Duplicate the pass if it's already in the list.
References add_pass_instance(), gcc_assert, pass_data::name, opt_pass::next, and NULL.
Check if PASS is explicitly disabled or enabled and return the gate status. FUNC is the function to be processed, and GATE_STATUS is the gate status determined by pass manager by default.
References disabled_pass_uid_range_tab, enabled_pass_uid_range_tab, and is_pass_explicitly_enabled_or_disabled().
Referenced by dump_one_pass(), and execute_one_pass().
void pass_fini_dump_file | ( | opt_pass * | pass | ) |
Flush PASS dump file.
This is non-static so that plugins can use it.
References gcc::dump_manager::dump_finish(), g, gcc::context::get_dumps(), release_dump_file_name(), opt_pass::static_pass_number, timevar_pop(), and timevar_push().
Referenced by execute_ipa_stmt_fixups(), execute_ipa_summary_passes(), execute_one_ipa_transform_pass(), execute_one_pass(), ipa_read_optimization_summaries_1(), ipa_read_summaries_1(), ipa_write_optimization_summaries_1(), and ipa_write_summaries_2().
Initialize pass dump file.
This is non-static so that the plugins can use it.
References cfun, clean_graph_dump_file(), current_function_decl, dump_file, dump_file_name, dump_flags, dump_function_header(), gcc::dump_manager::dump_initialized_p(), gcc::dump_manager::dump_start(), g, gcc::dump_manager::get_dump_file_info(), gcc::dump_manager::get_dump_file_name(), gcc::context::get_dumps(), dump_file_info::graph_dump_initialized, PROP_cfg, release_dump_file_name(), opt_pass::static_pass_number, TDF_GIMPLE, TDF_GRAPH, timevar_pop(), and timevar_push().
Referenced by execute_ipa_stmt_fixups(), execute_ipa_summary_passes(), execute_one_ipa_transform_pass(), execute_one_pass(), ipa_read_optimization_summaries_1(), ipa_read_summaries_1(), ipa_write_optimization_summaries_1(), and ipa_write_summaries_2().
Callback function for traversing NAME_TO_PASS_MAP.
References gcc_assert, pass_tab, and opt_pass::static_pass_number.
Referenced by gcc::pass_manager::create_pass_tab().
|
static |
Insert the pass at the proper position. Return true if the pass is successfully added. NEW_PASS_INFO - new pass to be inserted PASS_LIST - root of the pass list to insert the new pass to
References add_pass_instance(), added_pass_nodes, opt_pass::clone(), error(), pass_data::name, opt_pass::next, pass_list_node::next, NULL, pass_list_node::pass, register_pass_info::pass, PASS_POS_INSERT_AFTER, PASS_POS_INSERT_BEFORE, PASS_POS_REPLACE, register_pass_info::pos_op, position_pass(), prev_added_pass_node, register_pass_info::ref_pass_instance_number, register_pass_info::reference_pass_name, opt_pass::static_pass_number, opt_pass::sub, pass_data::todo_flags_start, TODO_mark_first_instance, pass_data::tv_id, and pass_data::type.
Referenced by position_pass(), and gcc::pass_manager::register_pass().
void print_current_pass | ( | FILE * | file | ) |
Call from anywhere to find out what pass this is. Useful for printing out debugging information deep inside an service routine.
References current_pass, pass_data::name, and opt_pass::static_pass_number.
Referenced by debug_pass().
void register_one_dump_file | ( | opt_pass * | pass | ) |
Iterate over the pass tree allocating dump file numbers. We want to do this depth first, and independent of whether the pass is enabled or not.
References g, gcc::context::get_passes(), and gcc::pass_manager::register_one_dump_file().
Referenced by gcc::dump_manager::register_pass().
void register_pass | ( | opt_pass * | pass, |
pass_positioning_ops | pos, | ||
const char * | ref_pass_name, | ||
int | ref_pass_inst_number ) |
References g, gcc::context::get_passes(), i, register_pass_info::pass, and gcc::pass_manager::register_pass().
void register_pass | ( | struct register_pass_info * | pass_info | ) |
Hooks a new pass into the pass lists. PASS_INFO - pass information that specifies the opt_pass object, reference pass, instance number, and how to position the pass
References g, gcc::context::get_passes(), and gcc::pass_manager::register_pass().
Referenced by register_callback().
|
static |
Release dump file name if set.
References CONST_CAST, dump_file_name, free(), and NULL.
Referenced by pass_fini_dump_file(), and pass_init_dump_file().
|
static |
Hook called when NODE is removed and therefore should be excluded from order vector. DATA is a hash set with removed nodes.
References hash_set< KeyId, Lazy, Traits >::add().
Referenced by do_per_function_toporder().
void rest_of_decl_compilation | ( | tree | decl, |
int | top_level, | ||
int | at_end ) |
This is called from various places for FUNCTION_DECL, VAR_DECL, and TYPE_DECL nodes. This does nothing for local (non-static) variables, unless the variable is a register variable with DECL_ASSEMBLER_NAME set. In that case, or if the variable is not an automatic, it sets up the RTL and outputs any assembler code (label definition, storage allocation and initialization). DECL is the declaration. TOP_LEVEL is nonzero if this declaration is not within a function.
References asm_out_file, assemble_alias(), BUILTINS_LOCATION, current_function_decl, debug_hooks, DECL_ASSEMBLER_NAME_SET_P, DECL_ATTRIBUTES, DECL_DEFER_OUTPUT, DECL_EXTERNAL, decl_function_context(), DECL_HAS_VALUE_EXPR_P, DECL_INITIAL, DECL_REGISTER, DECL_SAVED_TREE, DECL_SOURCE_LOCATION, DECL_STRUCT_FUNCTION, decl_type_context(), gcc_debug_hooks::early_global_decl, finalize(), varpool_node::finalize_decl(), varpool_node::get_create(), get_identifier(), HAS_DECL_ASSEMBLER_NAME_P, last_assemble_variable_decl, lookup_attribute(), make_decl_rtl(), NULL, seen_error(), targetm, timevar_pop(), timevar_push(), TREE_CODE, TREE_STATIC, TREE_STRING_POINTER, TREE_VALUE, gcc_debug_hooks::type_decl, and VAR_P.
Referenced by expand_one_hard_reg_var(), and wrapup_global_declaration_2().
void rest_of_type_compilation | ( | tree | type, |
int | toplev ) |
Called after finishing a record, union or enumeral type.
References debug_hooks, seen_error(), timevar_pop(), timevar_push(), gcc_debug_hooks::type_decl, and TYPE_STUB_DECL.
For skipping passes until "startwith" pass. Return true iff PASS should be skipped. Clear cfun->pass_startwith when encountering the "startwith" pass, so that all subsequent passes are run.
References cfun, determine_pass_name_match(), GIMPLE_PASS, pass_data::name, NULL, PROP_ssa, pass_data::properties_destroyed, pass_data::properties_provided, and pass_data::type.
Referenced by execute_one_pass().
|
static |
Skip the given pass, for handling passes before "startwith" in __GIMPLE and__RTL-marked functions. In theory, this ought to be a no-op, but some of the RTL passes need additional processing here.
References cfg_layout_rtl_register_cfg_hooks(), cfun, epilogue_completed, get_max_uid(), INSN_ADDRESSES_ALLOC, pass_data::name, PROP_cfglayout, reload_completed, and rtl_register_cfg_hooks().
Referenced by execute_one_pass().
|
static |
After executing the pass, apply expected changes to the function properties.
References function::curr_properties, pass_data::properties_destroyed, and pass_data::properties_provided.
Referenced by execute_one_pass().
|
static |
Helper function. Verify that the properties has been turn into the properties expected by the pass.
References function::curr_properties, and gcc_assert.
Referenced by execute_one_pass().
|
static |
Verify invariants that should hold between passes. This is a place to put simple sanity checks.
References fold_deferring_overflow_warnings_p(), and gcc_checking_assert.
Referenced by execute_one_ipa_transform_pass(), and execute_one_pass().
|
static |
Write out all LTO data.
References lto_output(), produce_asm_for_decls(), timevar_pop(), and timevar_push().
Referenced by ipa_write_optimization_summaries(), and ipa_write_summaries_1().
|
static |
Referenced by position_pass(), and gcc::pass_manager::register_pass().
opt_pass* current_pass |
This is used for debugging. It allows the current pass to printed from anywhere in compilation. The variable current_pass is also used for statistics and plugins.
Referenced by dump_context::begin_next_optinfo(), connect_traces(), curr_statistics_hash(), emergency_dump_function(), execute_ipa_stmt_fixups(), execute_ipa_summary_passes(), execute_one_ipa_transform_pass(), execute_one_pass(), cgraph_node::get_body(), ipa_read_optimization_summaries_1(), ipa_read_summaries_1(), ipa_write_optimization_summaries_1(), ipa_write_summaries_2(), print_current_pass(), pure_const_generate_summary(), pure_const_read_summary(), statistics_counter_event(), statistics_fini_pass(), statistics_fini_pass_2(), and statistics_histogram_event().
|
static |
Referenced by enable_disable_pass(), and override_gate_status().
|
static |
Referenced by enable_disable_pass(), and override_gate_status().
bool in_gimple_form |
Global variables used to communicate with passes.
Referenced by execute_one_ipa_transform_pass(), execute_one_pass(), fold_cond_expr_with_comparison(), fold_indirect_ref_1(), fold_unary_loc(), get_array_ctor_element_at_index(), and non_lvalue_loc().
Referenced by gcc::pass_manager::create_pass_tab(), dump_one_pass(), and passes_pass_traverse().
|
static |
Referenced by position_pass().
|
static |