GCC Middle and Back End API Reference
dumpfile.c File Reference

Data Structures

struct  dump_option_value_info

Functions

static void dump_loc (int, FILE *, source_location)
static FILE * dump_open_alternate_stream (struct dump_file_info *)
static FILE * dump_open_alternate_stream ()
void dump_loc ()
void dump_gimple_stmt ()
void dump_gimple_stmt_loc (int dump_kind, source_location loc, int extra_dump_flags, gimple gs, int spc)
void dump_generic_expr ()
void dump_generic_expr_loc (int dump_kind, source_location loc, int extra_dump_flags, tree t)
void dump_printf ()
void dump_printf_loc ()
FILE * dump_begin ()
const char * dump_flag_name ()
void dump_end ()
static int opt_info_switch_p_1 (const char *arg, int *flags, int *optgroup_flags, char **filename)
int opt_info_switch_p ()
void dump_basic_block ()
void print_combine_total_stats ()
bool enable_rtl_dump_file ()

Variables

static int pflags
static int alt_flags
FILE * dump_file = NULL
FILE * alt_dump_file = NULL
const char * dump_file_name
int dump_flags
static struct dump_file_info dump_files [TDI_end]
static struct
dump_option_value_info 
dump_options []
static struct
dump_option_value_info 
optinfo_verbosity_options []
static struct
dump_option_value_info 
optgroup_options []

Function Documentation

void dump_basic_block ( )
   Print basic block on the dump streams.  
FILE* dump_begin ( )
   Begin a tree dump for PHASE. Stores any user supplied flag in
   *FLAG_PTR and returns a stream to write to. If the dump is not
   enabled, returns NULL.
   Multiple calls will reopen and append to the dump file.  

Referenced by dump_maybe_newline(), and ipa_passes().

void dump_end ( )
   Finish a tree dump for PHASE. STREAM is the stream created by
   dump_begin.  

Referenced by dump_maybe_newline().

const char* dump_flag_name ( )
   Returns the switch name of PHASE.  

References TDI_end, and TDI_none.

void dump_generic_expr_loc ( int  dump_kind,
source_location  loc,
int  extra_dump_flags,
tree  t 
)
   Similar to dump_generic_expr, except additionally print the source
   location.  

References alt_dump_file, alt_flags, dump_file, and pflags.

void dump_gimple_stmt ( )
   Dump gimple statement GS with SPC indentation spaces and
   EXTRA_DUMP_FLAGS on the dump streams if DUMP_KIND is enabled.  

References alt_dump_file, alt_flags, dump_file, dump_flags, dump_loc(), pflags, and print_gimple_stmt().

Referenced by get_initial_def_for_reduction(), vect_build_slp_tree_1(), vect_can_advance_ivs_p(), vect_find_same_alignment_drs(), vect_get_slp_defs(), vect_loop_kill_debug_uses(), and vectorizable_live_operation().

void dump_gimple_stmt_loc ( int  dump_kind,
source_location  loc,
int  extra_dump_flags,
gimple  gs,
int  spc 
)
   Similar to dump_gimple_stmt, except additionally print source location.  

References alt_dump_file, alt_flags, dump_file, dump_flags, pflags, and print_generic_expr().

static void dump_loc ( int  ,
FILE *  ,
source_location   
)
static
void dump_loc ( )
   Print source location on DFILE if enabled.  
static FILE* dump_open_alternate_stream ( struct dump_file_info )
static
static FILE* dump_open_alternate_stream ( )
static
   For a given DFI, open an alternate dump filename (which could also
   be a standard stream such as stdout/stderr). If the alternate dump
   file cannot be opened, return NULL.  
bool enable_rtl_dump_file ( void  )
   Enable RTL dump for all the RTL passes.  
int opt_info_switch_p ( )
   Return non-zero if ARG is a recognized switch for
   -fopt-info. Return zero otherwise.  
     Bail out if a different filename has been specified.  

References dump_combine_total_stats(), and dump_file.

static int opt_info_switch_p_1 ( const char *  arg,
int *  flags,
int *  optgroup_flags,
char **  filename 
)
static
   Parse ARG as a -fopt-info switch and store flags, optgroup_flags
   and filename.  Return non-zero if it is a recognized switch.  
             Interpret rest of the argument as a dump filename.  This
             filename overrides other command line filenames.  

References dump_option_value_info::value.

void print_combine_total_stats ( void  )
   Print information from the combine pass on dump_file.  

Variable Documentation

FILE* dump_file = NULL
   These are currently used for communicating between passes.
   However, instead of accessing them directly, the passes can use
   dump_printf () for dumps.  

Referenced by add_access_to_work_queue(), add_forwarder_blocks(), add_mem_for_addr(), add_removable_extension(), add_to_dst_predicate_list(), adjust_cfg_counts(), dom_opt_dom_walker::after_dom_children(), analyze_caller_dereference_legality(), analyze_evolution_in_loop(), analyze_function(), bb_with_exit_edge_p(), bit_value_binop(), break_up_subtract(), break_up_subtract_bb(), btr_def_live_range(), build_and_add_sum(), build_new_reduction(), canonicalize_comparison(), case_values_threshold(), cgraph_edge_remove_caller(), change_cfi_row(), check_array_ref(), check_call(), check_stmt(), check_store(), chrec_evaluate(), coalesce(), coalesce_partitions(), collect_phi_def_edges(), compute_builtin_object_size(), compute_insert_delete(), compute_scalar_evolution_in_loop(), cond_exec_find_if_block(), cond_expr_object_size(), cond_move_process_if_block(), connect_traces(), contains_hot_call_p(), convert_gimple_call(), convert_jumps_to_returns(), copy_prop_visit_cond_stmt(), correct_negative_edge_counts(), create_canonical_iv(), cse_process_notes(), cselib_lookup_mem(), dataflow_set_preserve_mem_locs(), dbg_cnt(), debug_generated_program(), debug_sa_points_to_info(), decide_unrolling_and_peeling(), determine_common_wider_type(), determine_use_iv_cost(), df_clear_flags(), df_create_unused_note(), df_ignore_stack_reg(), df_remove_dead_eq_notes(), df_set_unused_notes_for_mw(), df_whole_mw_reg_dead_p(), df_word_lr_transfer_function(), DFS(), discover_loops(), distribute_loop(), do_partial_partial_insertion(), doloop_optimize(), doloop_register_get(), dominated_by_forbidden(), dse_confluence_0(), dse_optimize_stmt(), dse_step3(), dse_step4(), dse_transfer_function(), dump_asserts_for(), dump_generic_expr(), dump_generic_expr_loc(), dump_gimple_stmt(), dump_gimple_stmt_loc(), dump_hwloops(), dump_inline_hints(), dump_names_replaced_by(), dump_prediction(), dump_printf(), dump_shift_choices(), duplicate_node_data(), edge_badness(), eliminate_avail(), eliminate_dom_walker::eliminate_dom_walker(), eliminate_phi(), eliminate_redundant_computations(), emit_partition_copy(), entry_register(), execute_function_todo(), expand_phi_nodes(), find_inc(), find_interesting_uses_stmt(), find_max_flow(), find_removable_extensions(), find_subloop_latch_edge_by_profile(), find_switch_asserts(), find_traces(), find_traces_1_round(), find_uninit_use(), flatten_function(), form_subloop(), forward_edge_to_pdom(), forward_propagate_addr_expr(), free_ldst_entry(), gate_ud_dce(), gather_caller_stats(), gcd_of_steps_may_divide_p(), generate_summary(), get_address_cost(), get_rank(), get_required_cycles(), get_stored_val(), get_unary_op(), get_use_type(), get_working_sets(), gimplify_addr(), if_convertible_gimple_assign_stmt_p(), ifcombine_ifandif(), ifcvt_could_trap_p(), ifcvt_memrefs_wont_trap(), infer_value_range(), init_alias_vars(), init_caller_stats(), init_omega_for_ddr(), initialize_matrix_A(), insert_insn_end_basic_block(), insert_rtx_to_part_on_edge(), insert_store(), instantiate_scev_1(), instrument_edges(), ipa_discover_readonly_nonaddressable_vars(), ipa_print_order(), ipa_propagate_frequency(), ipa_reference_get_not_written_global(), ipa_value_from_jfunc(), is_phi_for_stmt(), is_reassociable_op(), is_use_properly_guarded(), known_aggs_to_agg_replacement_list(), linearize_expr(), lookup_avail_expr(), loop_has_vector_phi_nodes(), loop_parallel_p(), mark_all_reaching_defs_necessary(), mark_artificial_uses(), merge_blocks_move_predecessor_nojumps(), merge_blocks_move_successor_nojumps(), ncd_for_two_cands(), ncd_of_cand_and_phis(), new_btr_user(), non_rewritable_mem_ref_base(), normalize_omega_problem(), number_of_exit_cond_executions(), omega_do_elimination(), omega_eliminate_red(), omega_substitute_red(), opt_info_switch_p(), optimize_stmt(), optimize_unreachable(), outgoing_edges_match(), partition_stack_vars(), phi_dependent_cand_p(), possible_polymorphic_call_target_p(), pre_insert_copies(), predict_paths_for_bb(), prepare_shrink_wrap(), print_all_lattices(), process_insert_insn(), process_switch(), propagate_effects(), prune_group_by_reuse(), pt_solution_includes_global(), read_replacements_section(), record_biv(), record_entry_value(), record_insns(), record_iv(), record_store(), register_new_update_set(), regrename_chain_from_id(), remove_exits_and_undefined_stmts(), remove_node_data(), remove_stmt_or_phi(), reorder_loops(), replace_phi_args_in(), replace_read(), replace_ref(), reversed_condition(), rewrite_use_compare(), rewrite_uses(), rtx_moveable_p(), self_recursive_p(), set_lattice_value(), set_position_unneeded(), setup_sched_infos(), simplify_binary_expression(), sms_schedule_by_order(), special_builtin_state(), spread_undeadness(), statistics_fini_pass_3(), swap(), test_for_singularity(), tm_log_emit_stmt(), tree_ssa_unswitch_loops(), tree_unswitch_single_loop(), trip_count_to_ahead_ratio_too_small_p(), try_combine_chains(), try_crossjump_to_edge(), try_fwprop_subst(), try_improve_iv_set(), try_merge(), unsuitable_loc(), update_specialized_profile(), va_list_ptr_read(), value_replacement(), verify_omega_pb(), visit_copy(), visit_reference_op_load(), vn_nary_op_insert_stmt(), vn_phi_eq(), vrp_evaluate_conditional(), vt_add_function_parameter(), vt_get_decl_and_offset(), and want_early_inline_function_p().

const char* dump_file_name
struct dump_file_info dump_files[TDI_end]
static
Initial value:
{
{NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0},
{".cgraph", "ipa-cgraph", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
0, 0, 0, 0, 0},
{".type-inheritance", "ipa-type-inheritance", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
0, 0, 0, 0, 0},
{".tu", "translation-unit", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 1},
{".class", "class-hierarchy", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 2},
{".original", "tree-original", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 3},
{".gimple", "tree-gimple", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 4},
{".nested", "tree-nested", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 5},
#define FIRST_AUTO_NUMBERED_DUMP 6
{NULL, "tree-all", NULL, NULL, NULL, NULL, NULL, TDF_TREE,
0, 0, 0, 0, 0},
{NULL, "rtl-all", NULL, NULL, NULL, NULL, NULL, TDF_RTL,
0, 0, 0, 0, 0},
{NULL, "ipa-all", NULL, NULL, NULL, NULL, NULL, TDF_IPA,
0, 0, 0, 0, 0},
}
   Table of tree dump switches. This must be consistent with the
   TREE_DUMP_INDEX enumeration in dumpfile.h.  
int dump_flags

Referenced by add_mem_for_addr(), add_to_dst_predicate_list(), dom_opt_dom_walker::after_dom_children(), analyze_evolution_in_loop(), analyze_function(), bit_value_binop(), break_up_subtract_bb(), build_and_add_sum(), build_new_reduction(), check_array_ref(), chrec_evaluate(), coalesce_partitions(), collect_phi_def_edges(), compute_builtin_object_size(), compute_scalar_evolution_in_loop(), cond_expr_object_size(), contains_hot_call_p(), convert_gimple_call(), determine_common_wider_type(), DFS(), distribute_loop(), do_partial_partial_insertion(), dominated_by_forbidden(), dse_confluence_0(), dse_optimize_stmt(), dse_step3(), dse_step4(), dse_transfer_function(), dump_generic_expr(), dump_gimple_stmt(), dump_gimple_stmt_loc(), dump_inline_hints(), eliminate_avail(), eliminate_dom_walker::eliminate_dom_walker(), eliminate_phi(), eliminate_redundant_computations(), expand_phi_nodes(), find_switch_asserts(), forward_propagate_addr_expr(), gcd_of_steps_may_divide_p(), get_rank(), get_stored_val(), if_convertible_gimple_assign_stmt_p(), ifcvt_could_trap_p(), initialize_matrix_A(), insert_rtx_to_part_on_edge(), instantiate_scev_1(), is_phi_for_stmt(), is_reassociable_op(), is_use_properly_guarded(), leaf_renumber_regs(), linearize_expr(), lookup_avail_expr(), loop_has_vector_phi_nodes(), loop_parallel_p(), ncd_for_two_cands(), ncd_of_cand_and_phis(), normalize_omega_problem(), omega_do_elimination(), omega_eliminate_red(), optimize_stmt(), optimize_unreachable(), partition_stack_vars(), phi_dependent_cand_p(), propagate_effects(), prune_group_by_reuse(), record_entry_value(), record_store(), remove_stmt_or_phi(), replace_phi_args_in(), replace_read(), replace_ref(), rewrite_use_compare(), rewrite_uses(), self_recursive_p(), set_lattice_value(), set_position_unneeded(), simplify_binary_expression(), statistics_fini_pass_3(), tree_ssa_unswitch_loops(), tree_unswitch_single_loop(), trip_count_to_ahead_ratio_too_small_p(), try_combine_chains(), try_improve_iv_set(), unsuitable_loc(), update_specialized_profile(), va_list_ptr_read(), value_replacement(), verify_omega_pb(), visit_reference_op_load(), vn_nary_op_insert_stmt(), vn_phi_eq(), vrp_evaluate_conditional(), vt_add_function_parameter(), and vt_get_decl_and_offset().

struct dump_option_value_info dump_options[]
static
Initial value:
{
{"address", TDF_ADDRESS},
{"asmname", TDF_ASMNAME},
{"slim", TDF_SLIM},
{"raw", TDF_RAW},
{"graph", TDF_GRAPH},
{"details", (TDF_DETAILS | MSG_OPTIMIZED_LOCATIONS
| MSG_MISSED_OPTIMIZATION
| MSG_NOTE)},
{"cselib", TDF_CSELIB},
{"stats", TDF_STATS},
{"blocks", TDF_BLOCKS},
{"vops", TDF_VOPS},
{"lineno", TDF_LINENO},
{"uid", TDF_UID},
{"stmtaddr", TDF_STMTADDR},
{"memsyms", TDF_MEMSYMS},
{"verbose", TDF_VERBOSE},
{"eh", TDF_EH},
{"alias", TDF_ALIAS},
{"nouid", TDF_NOUID},
{"enumerate_locals", TDF_ENUMERATE_LOCALS},
{"scev", TDF_SCEV},
{"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
| TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE
| TDF_RHS_ONLY | TDF_NOUID | TDF_ENUMERATE_LOCALS | TDF_SCEV)},
{NULL, 0}
}
   Table of dump options. This must be consistent with the TDF_* flags
   in dumpfile.h and opt_info_options below. 
struct dump_option_value_info optgroup_options[]
static
Initial value:
{
{"ipa", OPTGROUP_IPA},
{"loop", OPTGROUP_LOOP},
{"inline", OPTGROUP_INLINE},
{"vec", OPTGROUP_VEC},
{"optall", OPTGROUP_ALL},
{NULL, 0}
}
   Flags used for -fopt-info groups.  
struct dump_option_value_info optinfo_verbosity_options[]
static
Initial value:
{
{"optimized", MSG_OPTIMIZED_LOCATIONS},
{"missed", MSG_MISSED_OPTIMIZATION},
{"note", MSG_NOTE},
{"all", MSG_ALL},
{NULL, 0}
}
   A subset of the dump_options table which is used for -fopt-info
   types. This must be consistent with the MSG_* flags in dumpfile.h.