tree-vrp.c (execute_vrp): Do not pass dump argument to.
* tree-vrp.c (execute_vrp): Do not pass dump argument to. loop_optimizer_init and loop_optimizer_finalize * tree-ssa-sink.c (execute_sink_code): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init, tree_ssa_loop_done): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Ditto. * sched-ebb.c: Include output.h. (schedule_ebbs): Do not use dump argument. * value-prof.h (struct profile_hooks): Remove profile_dump_file. * loop.c (loop_dump_stream): Removed. (loop_optimize, rest_of_handle_loop_optimize): Do not use dump argument. (scan_loop, move_movables, find_and_verify_loops, mark_loop_jump, emit_prefetch_instructions, loop_bivs_find, loop_bivs_check, final_biv_value, loop_biv_eliminable_p, loop_givs_rescan, loop_iterations, strength_reduce, record_biv, record_giv, final_giv_value, check_final_value, check_ext_dependent_givs, combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems, try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use dump_file instead of loop_dump_stream. * ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call argument dump_file. * reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use dump argument. * flow.c (life_analysis, rest_of_handle_life): Ditto. * haifa-sched.c: Include output.h (schedule_insns, sched_init): Do not use dump argument. * mode-switching.c (optimize_mode_switching): Ditto. * modulo-sched.c (stats_file): Removed. (print_node_sched_params): Do not call argument dump_file. (sms_schedule_by_order, loop_canon_p, sms_schedule, rest_of_handle_sms): Do not use dump argument. Use dump_file instead of stats_file. * cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not use dump argument. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize, rtl_loop_init, rtl_loop_done): Ditto. * global.c (global_alloc, rest_of_handle_global_alloc): Ditto. * predict.c (combine_predictions_for_bb, tree_estimate_probability): Ditto. * recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto. * lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto. * regmove.c (fixup_match_1, fixup_match_2, regmove_optimize, rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto. * emit-rtl.c (renumber_insns): Ditto. * cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr, expand_gimple_basic_block, tree_expand_cfg): Ditto. * regclass.c (regclass): Ditto. * tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts, remove_ssa_form, rewrite_out_of_ssa): Ditto. * reg-stack.c (compensate_edge, compensate_edges, convert_regs_1, convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs): Ditto. * sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto. * local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file to regclass. * gcse.c (gcse_file, debug_stderr): Removed. (gcse_main, bypass_jumps, rest_of_handle_jump_bypass, rest_of_handle_gcse): Do not use dump argument. (cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets, one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb, pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass, compute_code_hoist_vbeinout, compute_code_hoist_data, one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores, compute_store_table, build_store_vectors, insert_insn_start_bb, insert_store, remove_reachable_equiv_notes, replace_store_insn, store_motion): Use dump_file instead of gcse_file. * ipa-type-escape.c (type_escape_execute): Remove debugging comments. * profile.c (profile_dump_file): Removed. (branch_prob): Use dump_file instead of profile_dump_file. * ipa.c (cgraph_remove_unreachable_nodes): Do not call argument dump_file. * tree-ssa-copy.c (dump_copy_of): Ditto. * rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass dump file to life_analysis. * bt-load.c (branch_target_load_optimize): Ditto. * cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to renumber_insns. * rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs, regclass, dbr_schedule): Declaration changed. * sched-int.h (sched_init): Declaration changed. * tree-profile.c (tree_profile_dump_file): Removed. (tree_profile_hooks): Removed profile_dump_file hook. * rtl-profile (rtl_profile_dump_file): Removed. (rtl_profile_hooks): emoved profile_dump_file hook. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * c-gimplify.c (c_genericize): Do not call local variable dump_file. * tree-cfg.c (build_tree_cfg): Ditto. * Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency. * basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm): Declaration changed. * config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to life_analysis and schedule_insns. * config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to life_analysis. * config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to dbr_schedule. * config/mips/mips.c (mips_reorg): Ditto. * config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to schedule_ebbs. From-SVN: r110656
This commit is contained in:
parent
7269aee7d5
commit
10d2256750
51 changed files with 782 additions and 753 deletions
105
gcc/ChangeLog
105
gcc/ChangeLog
|
@ -1,3 +1,108 @@
|
|||
2006-02-06 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
* tree-vrp.c (execute_vrp): Do not pass dump argument to.
|
||||
loop_optimizer_init and loop_optimizer_finalize
|
||||
* tree-ssa-sink.c (execute_sink_code): Ditto.
|
||||
* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
|
||||
* tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init,
|
||||
tree_ssa_loop_done): Ditto.
|
||||
* tree-ssa-pre.c (init_pre, fini_pre): Ditto.
|
||||
* sched-ebb.c: Include output.h.
|
||||
(schedule_ebbs): Do not use dump argument.
|
||||
* value-prof.h (struct profile_hooks): Remove profile_dump_file.
|
||||
* loop.c (loop_dump_stream): Removed.
|
||||
(loop_optimize, rest_of_handle_loop_optimize): Do not use dump
|
||||
argument.
|
||||
(scan_loop, move_movables, find_and_verify_loops, mark_loop_jump,
|
||||
emit_prefetch_instructions, loop_bivs_find, loop_bivs_check,
|
||||
final_biv_value, loop_biv_eliminable_p, loop_givs_rescan,
|
||||
loop_iterations, strength_reduce, record_biv, record_giv,
|
||||
final_giv_value, check_final_value, check_ext_dependent_givs,
|
||||
combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems,
|
||||
try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use
|
||||
dump_file instead of loop_dump_stream.
|
||||
* ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call
|
||||
argument dump_file.
|
||||
* reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use
|
||||
dump argument.
|
||||
* flow.c (life_analysis, rest_of_handle_life): Ditto.
|
||||
* haifa-sched.c: Include output.h
|
||||
(schedule_insns, sched_init): Do not use dump argument.
|
||||
* mode-switching.c (optimize_mode_switching): Ditto.
|
||||
* modulo-sched.c (stats_file): Removed.
|
||||
(print_node_sched_params): Do not call argument dump_file.
|
||||
(sms_schedule_by_order, loop_canon_p, sms_schedule,
|
||||
rest_of_handle_sms): Do not use dump argument. Use dump_file instead
|
||||
of stats_file.
|
||||
* cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not
|
||||
use dump argument.
|
||||
* loop-init.c (loop_optimizer_init, loop_optimizer_finalize,
|
||||
rtl_loop_init, rtl_loop_done): Ditto.
|
||||
* global.c (global_alloc, rest_of_handle_global_alloc): Ditto.
|
||||
* predict.c (combine_predictions_for_bb, tree_estimate_probability):
|
||||
Ditto.
|
||||
* recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto.
|
||||
* lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto.
|
||||
* regmove.c (fixup_match_1, fixup_match_2, regmove_optimize,
|
||||
rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto.
|
||||
* emit-rtl.c (renumber_insns): Ditto.
|
||||
* cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr,
|
||||
expand_gimple_basic_block, tree_expand_cfg): Ditto.
|
||||
* regclass.c (regclass): Ditto.
|
||||
* tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts,
|
||||
remove_ssa_form, rewrite_out_of_ssa): Ditto.
|
||||
* reg-stack.c (compensate_edge, compensate_edges, convert_regs_1,
|
||||
convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs):
|
||||
Ditto.
|
||||
* sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto.
|
||||
* local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file
|
||||
to regclass.
|
||||
* gcse.c (gcse_file, debug_stderr): Removed.
|
||||
(gcse_main, bypass_jumps, rest_of_handle_jump_bypass,
|
||||
rest_of_handle_gcse): Do not use dump argument.
|
||||
(cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets,
|
||||
one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb,
|
||||
pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass,
|
||||
compute_code_hoist_vbeinout, compute_code_hoist_data,
|
||||
one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores,
|
||||
compute_store_table, build_store_vectors, insert_insn_start_bb,
|
||||
insert_store, remove_reachable_equiv_notes, replace_store_insn,
|
||||
store_motion): Use dump_file instead of gcse_file.
|
||||
* ipa-type-escape.c (type_escape_execute): Remove debugging comments.
|
||||
* profile.c (profile_dump_file): Removed.
|
||||
(branch_prob): Use dump_file instead of profile_dump_file.
|
||||
* ipa.c (cgraph_remove_unreachable_nodes): Do not call argument
|
||||
dump_file.
|
||||
* tree-ssa-copy.c (dump_copy_of): Ditto.
|
||||
* rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass
|
||||
dump file to life_analysis.
|
||||
* bt-load.c (branch_target_load_optimize): Ditto.
|
||||
* cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to
|
||||
renumber_insns.
|
||||
* rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs,
|
||||
regclass, dbr_schedule): Declaration changed.
|
||||
* sched-int.h (sched_init): Declaration changed.
|
||||
* tree-profile.c (tree_profile_dump_file): Removed.
|
||||
(tree_profile_hooks): Removed profile_dump_file hook.
|
||||
* rtl-profile (rtl_profile_dump_file): Removed.
|
||||
(rtl_profile_hooks): emoved profile_dump_file hook.
|
||||
* cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration
|
||||
changed.
|
||||
* c-gimplify.c (c_genericize): Do not call local variable dump_file.
|
||||
* tree-cfg.c (build_tree_cfg): Ditto.
|
||||
* Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency.
|
||||
* basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm):
|
||||
Declaration changed.
|
||||
* config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to
|
||||
life_analysis and schedule_insns.
|
||||
* config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to
|
||||
life_analysis.
|
||||
* config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to
|
||||
dbr_schedule.
|
||||
* config/mips/mips.c (mips_reorg): Ditto.
|
||||
* config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to
|
||||
schedule_ebbs.
|
||||
|
||||
2006-02-06 Aldy Hernandez <aldyh@redhat.com>
|
||||
|
||||
* config/s390/s390.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define.
|
||||
|
|
|
@ -2505,7 +2505,7 @@ modulo-sched.o : modulo-sched.c $(DDG_H) $(CONFIG_H) $(CONFIG_H) $(SYSTEM_H) \
|
|||
cfghooks.h $(DF_H) $(GCOV_IO_H) hard-reg-set.h $(TM_H) timevar.h tree-pass.h
|
||||
haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
$(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
|
||||
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
|
||||
$(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H) output.h
|
||||
sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
|
||||
$(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h \
|
||||
|
@ -2517,7 +2517,7 @@ sched-rgn.o : sched-rgn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
|||
sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
|
||||
$(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) \
|
||||
$(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H)
|
||||
$(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h
|
||||
sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
|
||||
$(TM_P_H) real.h toplev.h tree-pass.h
|
||||
|
|
|
@ -852,7 +852,7 @@ enum update_life_extent
|
|||
to match only full blocks */
|
||||
#define STRUCT_EQUIV_MATCH_JUMPS 8192 /* Also include the jumps at the end of the block in the comparison. */
|
||||
|
||||
extern void life_analysis (FILE *, int);
|
||||
extern void life_analysis (int);
|
||||
extern int update_life_info (sbitmap, enum update_life_extent, int);
|
||||
extern int update_life_info_in_dirty_blocks (enum update_life_extent, int);
|
||||
extern int count_or_remove_death_notes (sbitmap, int);
|
||||
|
@ -865,10 +865,10 @@ extern struct propagate_block_info *init_propagate_block_info
|
|||
extern void free_propagate_block_info (struct propagate_block_info *);
|
||||
|
||||
/* In lcm.c */
|
||||
extern struct edge_list *pre_edge_lcm (FILE *, int, sbitmap *, sbitmap *,
|
||||
extern struct edge_list *pre_edge_lcm (int, sbitmap *, sbitmap *,
|
||||
sbitmap *, sbitmap *, sbitmap **,
|
||||
sbitmap **);
|
||||
extern struct edge_list *pre_edge_rev_lcm (FILE *, int, sbitmap *,
|
||||
extern struct edge_list *pre_edge_rev_lcm (int, sbitmap *,
|
||||
sbitmap *, sbitmap *,
|
||||
sbitmap *, sbitmap **,
|
||||
sbitmap **);
|
||||
|
|
|
@ -1467,7 +1467,7 @@ branch_target_load_optimize (bool after_prologue_epilogue_gen)
|
|||
cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
|
||||
#endif
|
||||
|
||||
life_analysis (NULL, 0);
|
||||
life_analysis (0);
|
||||
|
||||
/* Dominator info is also needed for migrate_btr_def. */
|
||||
calculate_dominance_info (CDI_DOMINATORS);
|
||||
|
|
|
@ -77,29 +77,29 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
void
|
||||
c_genericize (tree fndecl)
|
||||
{
|
||||
FILE *dump_file;
|
||||
FILE *dump_orig;
|
||||
int local_dump_flags;
|
||||
struct cgraph_node *cgn;
|
||||
|
||||
/* Dump the C-specific tree IR. */
|
||||
dump_file = dump_begin (TDI_original, &local_dump_flags);
|
||||
if (dump_file)
|
||||
dump_orig = dump_begin (TDI_original, &local_dump_flags);
|
||||
if (dump_orig)
|
||||
{
|
||||
fprintf (dump_file, "\n;; Function %s",
|
||||
fprintf (dump_orig, "\n;; Function %s",
|
||||
lang_hooks.decl_printable_name (fndecl, 2));
|
||||
fprintf (dump_file, " (%s)\n",
|
||||
fprintf (dump_orig, " (%s)\n",
|
||||
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)));
|
||||
fprintf (dump_file, ";; enabled by -%s\n", dump_flag_name (TDI_original));
|
||||
fprintf (dump_file, "\n");
|
||||
fprintf (dump_orig, ";; enabled by -%s\n", dump_flag_name (TDI_original));
|
||||
fprintf (dump_orig, "\n");
|
||||
|
||||
if (local_dump_flags & TDF_RAW)
|
||||
dump_node (DECL_SAVED_TREE (fndecl),
|
||||
TDF_SLIM | local_dump_flags, dump_file);
|
||||
TDF_SLIM | local_dump_flags, dump_orig);
|
||||
else
|
||||
print_c_tree (dump_file, DECL_SAVED_TREE (fndecl));
|
||||
fprintf (dump_file, "\n");
|
||||
print_c_tree (dump_orig, DECL_SAVED_TREE (fndecl));
|
||||
fprintf (dump_orig, "\n");
|
||||
|
||||
dump_end (TDI_original, dump_file);
|
||||
dump_end (TDI_original, dump_orig);
|
||||
}
|
||||
|
||||
/* Go ahead and gimplify for now. */
|
||||
|
|
|
@ -2356,7 +2356,7 @@ rest_of_handle_jump2 (void)
|
|||
future passes, allocate arrays whose dimensions involve the
|
||||
maximum instruction UID, so if we can reduce the maximum UID
|
||||
we'll save big on memory. */
|
||||
renumber_insns (dump_file);
|
||||
renumber_insns ();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ Boston, MA 02110-1301, USA. */
|
|||
re-distribute it when the conditional expands into multiple conditionals.
|
||||
This is however difficult to do. */
|
||||
static void
|
||||
add_reg_br_prob_note (FILE *dump_file, rtx last, int probability)
|
||||
add_reg_br_prob_note (rtx last, int probability)
|
||||
{
|
||||
if (profile_status == PROFILE_ABSENT)
|
||||
return;
|
||||
|
@ -1113,7 +1113,7 @@ expand_gimple_cond_expr (basic_block bb, tree stmt)
|
|||
if (TREE_CODE (then_exp) == GOTO_EXPR && IS_EMPTY_STMT (else_exp))
|
||||
{
|
||||
jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
|
||||
add_reg_br_prob_note (dump_file, last, true_edge->probability);
|
||||
add_reg_br_prob_note (last, true_edge->probability);
|
||||
maybe_dump_rtl_for_tree_stmt (stmt, last);
|
||||
if (EXPR_LOCUS (then_exp))
|
||||
emit_line_note (*(EXPR_LOCUS (then_exp)));
|
||||
|
@ -1122,7 +1122,7 @@ expand_gimple_cond_expr (basic_block bb, tree stmt)
|
|||
if (TREE_CODE (else_exp) == GOTO_EXPR && IS_EMPTY_STMT (then_exp))
|
||||
{
|
||||
jumpifnot (pred, label_rtx (GOTO_DESTINATION (else_exp)));
|
||||
add_reg_br_prob_note (dump_file, last, false_edge->probability);
|
||||
add_reg_br_prob_note (last, false_edge->probability);
|
||||
maybe_dump_rtl_for_tree_stmt (stmt, last);
|
||||
if (EXPR_LOCUS (else_exp))
|
||||
emit_line_note (*(EXPR_LOCUS (else_exp)));
|
||||
|
@ -1132,7 +1132,7 @@ expand_gimple_cond_expr (basic_block bb, tree stmt)
|
|||
&& TREE_CODE (else_exp) == GOTO_EXPR);
|
||||
|
||||
jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
|
||||
add_reg_br_prob_note (dump_file, last, true_edge->probability);
|
||||
add_reg_br_prob_note (last, true_edge->probability);
|
||||
last = get_last_insn ();
|
||||
expand_expr (else_exp, const0_rtx, VOIDmode, 0);
|
||||
|
||||
|
@ -1272,7 +1272,7 @@ expand_gimple_tailcall (basic_block bb, tree stmt, bool *can_fallthru)
|
|||
/* Expand basic block BB from GIMPLE trees to RTL. */
|
||||
|
||||
static basic_block
|
||||
expand_gimple_basic_block (basic_block bb, FILE * dump_file)
|
||||
expand_gimple_basic_block (basic_block bb)
|
||||
{
|
||||
block_stmt_iterator bsi = bsi_start (bb);
|
||||
tree stmt = NULL;
|
||||
|
@ -1621,7 +1621,7 @@ tree_expand_cfg (void)
|
|||
init_block = construct_init_block ();
|
||||
|
||||
FOR_BB_BETWEEN (bb, init_block->next_bb, EXIT_BLOCK_PTR, next_bb)
|
||||
bb = expand_gimple_basic_block (bb, dump_file);
|
||||
bb = expand_gimple_basic_block (bb);
|
||||
|
||||
construct_exit_block ();
|
||||
|
||||
|
|
|
@ -437,8 +437,8 @@ extern unsigned global_cost_for_size (unsigned, unsigned, unsigned);
|
|||
extern void init_set_costs (void);
|
||||
|
||||
/* Loop optimizer initialization. */
|
||||
extern struct loops *loop_optimizer_init (FILE *, unsigned);
|
||||
extern void loop_optimizer_finalize (struct loops *, FILE *);
|
||||
extern struct loops *loop_optimizer_init (unsigned);
|
||||
extern void loop_optimizer_finalize (struct loops *);
|
||||
|
||||
/* Optimization passes. */
|
||||
extern void unswitch_loops (struct loops *);
|
||||
|
|
|
@ -7796,7 +7796,7 @@ ia64_reorg (void)
|
|||
_1mfb_ = get_cpu_unit_code ("1b_1mfb.");
|
||||
_1mlx_ = get_cpu_unit_code ("1b_1mlx.");
|
||||
}
|
||||
schedule_ebbs (dump_file);
|
||||
schedule_ebbs ();
|
||||
finish_bundle_states ();
|
||||
if (ia64_tune == PROCESSOR_ITANIUM)
|
||||
{
|
||||
|
|
|
@ -5062,7 +5062,7 @@ m68hc11_reorg (void)
|
|||
}
|
||||
}
|
||||
|
||||
life_analysis (0, PROP_REG_INFO | PROP_DEATH_NOTES);
|
||||
life_analysis (PROP_REG_INFO | PROP_DEATH_NOTES);
|
||||
}
|
||||
|
||||
z_replacement_completed = 2;
|
||||
|
|
|
@ -8922,7 +8922,7 @@ mips_reorg (void)
|
|||
else if (TARGET_EXPLICIT_RELOCS)
|
||||
{
|
||||
if (mips_flag_delayed_branch)
|
||||
dbr_schedule (get_insns (), dump_file);
|
||||
dbr_schedule (get_insns ());
|
||||
mips_avoid_hazards ();
|
||||
if (TUNE_MIPS4130 && TARGET_VR4130_ALIGN)
|
||||
vr4130_align_insns ();
|
||||
|
|
|
@ -2452,7 +2452,7 @@ mt_machine_reorg (void)
|
|||
mt_reorg_loops (dump_file);
|
||||
|
||||
if (mt_flag_delayed_branch)
|
||||
dbr_schedule (get_insns (), dump_file);
|
||||
dbr_schedule (get_insns ());
|
||||
|
||||
if (TARGET_MS2)
|
||||
{
|
||||
|
|
|
@ -9820,11 +9820,11 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
|
|||
|
||||
if (flag_schedule_insns_after_reload)
|
||||
{
|
||||
life_analysis (dump_file, PROP_FINAL);
|
||||
life_analysis (PROP_FINAL);
|
||||
|
||||
split_all_insns (1);
|
||||
|
||||
schedule_insns (dump_file);
|
||||
schedule_insns ();
|
||||
}
|
||||
/* We must split jmp insn in PIC case. */
|
||||
else if (flag_pic)
|
||||
|
@ -9834,7 +9834,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
|
|||
sh_reorg ();
|
||||
|
||||
if (optimize > 0 && flag_delayed_branch)
|
||||
dbr_schedule (insns, dump_file);
|
||||
dbr_schedule (insns);
|
||||
|
||||
shorten_branches (insns);
|
||||
final_start_function (insns, file, 1);
|
||||
|
|
10
gcc/cse.c
10
gcc/cse.c
|
@ -6803,7 +6803,7 @@ cse_end_of_basic_block (rtx insn, struct cse_basic_block_data *data,
|
|||
in conditional jump instructions. */
|
||||
|
||||
int
|
||||
cse_main (rtx f, int nregs, FILE *file)
|
||||
cse_main (rtx f, int nregs)
|
||||
{
|
||||
struct cse_basic_block_data val;
|
||||
rtx insn = f;
|
||||
|
@ -6869,8 +6869,8 @@ cse_main (rtx f, int nregs, FILE *file)
|
|||
cse_basic_block_end = val.high_cuid;
|
||||
max_qty = val.nsets * 2;
|
||||
|
||||
if (file)
|
||||
fprintf (file, ";; Processing block from %d to %d, %d sets.\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, ";; Processing block from %d to %d, %d sets.\n",
|
||||
INSN_UID (insn), val.last ? INSN_UID (val.last) : 0,
|
||||
val.nsets);
|
||||
|
||||
|
@ -7848,7 +7848,7 @@ rest_of_handle_cse (void)
|
|||
|
||||
reg_scan (get_insns (), max_reg_num ());
|
||||
|
||||
tem = cse_main (get_insns (), max_reg_num (), dump_file);
|
||||
tem = cse_main (get_insns (), max_reg_num ());
|
||||
if (tem)
|
||||
rebuild_jump_labels (get_insns ());
|
||||
if (purge_all_dead_edges ())
|
||||
|
@ -7901,7 +7901,7 @@ rest_of_handle_cse2 (void)
|
|||
if (dump_file)
|
||||
dump_flow_info (dump_file);
|
||||
|
||||
tem = cse_main (get_insns (), max_reg_num (), dump_file);
|
||||
tem = cse_main (get_insns (), max_reg_num ());
|
||||
|
||||
/* Run a pass to eliminate duplicated assignments to condition code
|
||||
registers. We have to run this after bypass_jumps, because it
|
||||
|
|
40
gcc/ddg.c
40
gcc/ddg.c
|
@ -546,7 +546,7 @@ free_ddg (ddg_ptr g)
|
|||
}
|
||||
|
||||
void
|
||||
print_ddg_edge (FILE *dump_file, ddg_edge_ptr e)
|
||||
print_ddg_edge (FILE *file, ddg_edge_ptr e)
|
||||
{
|
||||
char dep_c;
|
||||
|
||||
|
@ -561,13 +561,13 @@ print_ddg_edge (FILE *dump_file, ddg_edge_ptr e)
|
|||
dep_c = 'T';
|
||||
}
|
||||
|
||||
fprintf (dump_file, " [%d -(%c,%d,%d)-> %d] ", INSN_UID (e->src->insn),
|
||||
fprintf (file, " [%d -(%c,%d,%d)-> %d] ", INSN_UID (e->src->insn),
|
||||
dep_c, e->latency, e->distance, INSN_UID (e->dest->insn));
|
||||
}
|
||||
|
||||
/* Print the DDG nodes with there in/out edges to the dump file. */
|
||||
void
|
||||
print_ddg (FILE *dump_file, ddg_ptr g)
|
||||
print_ddg (FILE *file, ddg_ptr g)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -575,34 +575,34 @@ print_ddg (FILE *dump_file, ddg_ptr g)
|
|||
{
|
||||
ddg_edge_ptr e;
|
||||
|
||||
print_rtl_single (dump_file, g->nodes[i].insn);
|
||||
fprintf (dump_file, "OUT ARCS: ");
|
||||
print_rtl_single (file, g->nodes[i].insn);
|
||||
fprintf (file, "OUT ARCS: ");
|
||||
for (e = g->nodes[i].out; e; e = e->next_out)
|
||||
print_ddg_edge (dump_file, e);
|
||||
print_ddg_edge (file, e);
|
||||
|
||||
fprintf (dump_file, "\nIN ARCS: ");
|
||||
fprintf (file, "\nIN ARCS: ");
|
||||
for (e = g->nodes[i].in; e; e = e->next_in)
|
||||
print_ddg_edge (dump_file, e);
|
||||
print_ddg_edge (file, e);
|
||||
|
||||
fprintf (dump_file, "\n");
|
||||
fprintf (file, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Print the given DDG in VCG format. */
|
||||
void
|
||||
vcg_print_ddg (FILE *dump_file, ddg_ptr g)
|
||||
vcg_print_ddg (FILE *file, ddg_ptr g)
|
||||
{
|
||||
int src_cuid;
|
||||
|
||||
fprintf (dump_file, "graph: {\n");
|
||||
fprintf (file, "graph: {\n");
|
||||
for (src_cuid = 0; src_cuid < g->num_nodes; src_cuid++)
|
||||
{
|
||||
ddg_edge_ptr e;
|
||||
int src_uid = INSN_UID (g->nodes[src_cuid].insn);
|
||||
|
||||
fprintf (dump_file, "node: {title: \"%d_%d\" info1: \"", src_cuid, src_uid);
|
||||
print_rtl_single (dump_file, g->nodes[src_cuid].insn);
|
||||
fprintf (dump_file, "\"}\n");
|
||||
fprintf (file, "node: {title: \"%d_%d\" info1: \"", src_cuid, src_uid);
|
||||
print_rtl_single (file, g->nodes[src_cuid].insn);
|
||||
fprintf (file, "\"}\n");
|
||||
for (e = g->nodes[src_cuid].out; e; e = e->next_out)
|
||||
{
|
||||
int dst_uid = INSN_UID (e->dest->insn);
|
||||
|
@ -610,16 +610,16 @@ vcg_print_ddg (FILE *dump_file, ddg_ptr g)
|
|||
|
||||
/* Give the backarcs a different color. */
|
||||
if (e->distance > 0)
|
||||
fprintf (dump_file, "backedge: {color: red ");
|
||||
fprintf (file, "backedge: {color: red ");
|
||||
else
|
||||
fprintf (dump_file, "edge: { ");
|
||||
fprintf (file, "edge: { ");
|
||||
|
||||
fprintf (dump_file, "sourcename: \"%d_%d\" ", src_cuid, src_uid);
|
||||
fprintf (dump_file, "targetname: \"%d_%d\" ", dst_cuid, dst_uid);
|
||||
fprintf (dump_file, "label: \"%d_%d\"}\n", e->latency, e->distance);
|
||||
fprintf (file, "sourcename: \"%d_%d\" ", src_cuid, src_uid);
|
||||
fprintf (file, "targetname: \"%d_%d\" ", dst_cuid, dst_uid);
|
||||
fprintf (file, "label: \"%d_%d\"}\n", e->latency, e->distance);
|
||||
}
|
||||
}
|
||||
fprintf (dump_file, "}\n");
|
||||
fprintf (file, "}\n");
|
||||
}
|
||||
|
||||
/* Create an edge and initialize it with given values. */
|
||||
|
|
|
@ -2811,7 +2811,7 @@ get_max_uid (void)
|
|||
/* Renumber instructions so that no instruction UIDs are wasted. */
|
||||
|
||||
void
|
||||
renumber_insns (FILE *stream)
|
||||
renumber_insns (void)
|
||||
{
|
||||
rtx insn;
|
||||
|
||||
|
@ -2828,8 +2828,8 @@ renumber_insns (FILE *stream)
|
|||
|
||||
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
|
||||
{
|
||||
if (stream)
|
||||
fprintf (stream, "Renumbering insn %d to %d\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Renumbering insn %d to %d\n",
|
||||
INSN_UID (insn), cur_insn_uid);
|
||||
INSN_UID (insn) = cur_insn_uid++;
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ first_insn_after_basic_block_note (basic_block block)
|
|||
FLAGS is a set of PROP_* flags to be used in accumulating flow info. */
|
||||
|
||||
void
|
||||
life_analysis (FILE *file, int flags)
|
||||
life_analysis (int flags)
|
||||
{
|
||||
#ifdef ELIMINABLE_REGS
|
||||
int i;
|
||||
|
@ -437,8 +437,8 @@ life_analysis (FILE *file, int flags)
|
|||
if (optimize && (flags & PROP_SCAN_DEAD_STORES))
|
||||
end_alias_analysis ();
|
||||
|
||||
if (file)
|
||||
dump_flow_info (file);
|
||||
if (dump_file)
|
||||
dump_flow_info (dump_file);
|
||||
|
||||
/* Removing dead insns should have made jumptables really dead. */
|
||||
delete_dead_jumptables ();
|
||||
|
@ -4637,7 +4637,7 @@ rest_of_handle_life (void)
|
|||
{
|
||||
regclass_init ();
|
||||
|
||||
life_analysis (dump_file, PROP_FINAL);
|
||||
life_analysis (PROP_FINAL);
|
||||
if (optimize)
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE | CLEANUP_LOG_LINKS
|
||||
| (flag_thread_jumps ? CLEANUP_THREADING : 0));
|
||||
|
|
266
gcc/gcse.c
266
gcc/gcse.c
|
@ -271,9 +271,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
|
||||
/* GCSE global vars. */
|
||||
|
||||
/* -dG dump file. */
|
||||
static FILE *gcse_file;
|
||||
|
||||
/* Note whether or not we should run jump optimization after gcse. We
|
||||
want to do this for two cases.
|
||||
|
||||
|
@ -282,13 +279,6 @@ static FILE *gcse_file;
|
|||
* If we added any labels via edge splitting. */
|
||||
static int run_jump_opt_after_gcse;
|
||||
|
||||
/* Bitmaps are normally not included in debugging dumps.
|
||||
However it's useful to be able to print them from GDB.
|
||||
We could create special functions for this, but it's simpler to
|
||||
just allow passing stderr to the dump_foo fns. Since stderr can
|
||||
be a macro, we store a copy here. */
|
||||
static FILE *debug_stderr;
|
||||
|
||||
/* An obstack for our working variables. */
|
||||
static struct obstack gcse_obstack;
|
||||
|
||||
|
@ -661,7 +651,7 @@ static bool is_too_expensive (const char *);
|
|||
change is mode. */
|
||||
|
||||
static int
|
||||
gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file)
|
||||
gcse_main (rtx f ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int changed, pass;
|
||||
/* Bytes used at start of pass. */
|
||||
|
@ -679,16 +669,12 @@ gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file)
|
|||
/* Assume that we do not need to run jump optimizations after gcse. */
|
||||
run_jump_opt_after_gcse = 0;
|
||||
|
||||
/* For calling dump_foo fns from gdb. */
|
||||
debug_stderr = stderr;
|
||||
gcse_file = file;
|
||||
|
||||
/* Identify the basic block information for this function, including
|
||||
successors and predecessors. */
|
||||
max_gcse_regno = max_reg_num ();
|
||||
|
||||
if (file)
|
||||
dump_flow_info (file);
|
||||
if (dump_file)
|
||||
dump_flow_info (dump_file);
|
||||
|
||||
/* Return if there's nothing to do, or it is too expensive. */
|
||||
if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1
|
||||
|
@ -720,8 +706,8 @@ gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file)
|
|||
while (changed && pass < MAX_GCSE_PASSES)
|
||||
{
|
||||
changed = 0;
|
||||
if (file)
|
||||
fprintf (file, "GCSE pass %d\n\n", pass + 1);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "GCSE pass %d\n\n", pass + 1);
|
||||
|
||||
/* Initialize bytes_used to the space for the pred/succ lists,
|
||||
and the reg_set_table data. */
|
||||
|
@ -786,10 +772,10 @@ gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file)
|
|||
timevar_pop (TV_HOIST);
|
||||
}
|
||||
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "\n");
|
||||
fflush (file);
|
||||
fprintf (dump_file, "\n");
|
||||
fflush (dump_file);
|
||||
}
|
||||
|
||||
obstack_free (&gcse_obstack, gcse_obstack_bottom);
|
||||
|
@ -807,11 +793,11 @@ gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file)
|
|||
timevar_pop (TV_CPROP2);
|
||||
free_gcse_mem ();
|
||||
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "GCSE of %s: %d basic blocks, ",
|
||||
fprintf (dump_file, "GCSE of %s: %d basic blocks, ",
|
||||
current_function_name (), n_basic_blocks);
|
||||
fprintf (file, "%d pass%s, %d bytes\n\n",
|
||||
fprintf (dump_file, "%d pass%s, %d bytes\n\n",
|
||||
pass, pass > 1 ? "es" : "", max_pass_bytes);
|
||||
}
|
||||
|
||||
|
@ -2861,13 +2847,13 @@ cprop_jump (basic_block bb, rtx setcc, rtx jump, rtx from, rtx src)
|
|||
run_jump_opt_after_gcse = 1;
|
||||
|
||||
global_const_prop_count++;
|
||||
if (gcse_file != NULL)
|
||||
if (dump_file != NULL)
|
||||
{
|
||||
fprintf (gcse_file,
|
||||
fprintf (dump_file,
|
||||
"GLOBAL CONST-PROP: Replacing reg %d in jump_insn %d with constant ",
|
||||
REGNO (from), INSN_UID (jump));
|
||||
print_rtl (gcse_file, src);
|
||||
fprintf (gcse_file, "\n");
|
||||
print_rtl (dump_file, src);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
purge_dead_edges (bb);
|
||||
|
||||
|
@ -2966,12 +2952,12 @@ cprop_insn (rtx insn, int alter_jumps)
|
|||
{
|
||||
changed = 1;
|
||||
global_const_prop_count++;
|
||||
if (gcse_file != NULL)
|
||||
if (dump_file != NULL)
|
||||
{
|
||||
fprintf (gcse_file, "GLOBAL CONST-PROP: Replacing reg %d in ", regno);
|
||||
fprintf (gcse_file, "insn %d with constant ", INSN_UID (insn));
|
||||
print_rtl (gcse_file, src);
|
||||
fprintf (gcse_file, "\n");
|
||||
fprintf (dump_file, "GLOBAL CONST-PROP: Replacing reg %d in ", regno);
|
||||
fprintf (dump_file, "insn %d with constant ", INSN_UID (insn));
|
||||
print_rtl (dump_file, src);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
if (INSN_DELETED_P (insn))
|
||||
return 1;
|
||||
|
@ -2985,11 +2971,11 @@ cprop_insn (rtx insn, int alter_jumps)
|
|||
{
|
||||
changed = 1;
|
||||
global_copy_prop_count++;
|
||||
if (gcse_file != NULL)
|
||||
if (dump_file != NULL)
|
||||
{
|
||||
fprintf (gcse_file, "GLOBAL COPY-PROP: Replacing reg %d in insn %d",
|
||||
fprintf (dump_file, "GLOBAL COPY-PROP: Replacing reg %d in insn %d",
|
||||
regno, INSN_UID (insn));
|
||||
fprintf (gcse_file, " with reg %d\n", REGNO (src));
|
||||
fprintf (dump_file, " with reg %d\n", REGNO (src));
|
||||
}
|
||||
|
||||
/* The original insn setting reg_used may or may not now be
|
||||
|
@ -3102,14 +3088,14 @@ do_local_cprop (rtx x, rtx insn, bool alter_jumps, rtx *libcall_sp)
|
|||
adjusted = adjust_libcall_notes (x, newcnst, insn, libcall_sp);
|
||||
gcc_assert (adjusted);
|
||||
|
||||
if (gcse_file != NULL)
|
||||
if (dump_file != NULL)
|
||||
{
|
||||
fprintf (gcse_file, "LOCAL CONST-PROP: Replacing reg %d in ",
|
||||
fprintf (dump_file, "LOCAL CONST-PROP: Replacing reg %d in ",
|
||||
REGNO (x));
|
||||
fprintf (gcse_file, "insn %d with constant ",
|
||||
fprintf (dump_file, "insn %d with constant ",
|
||||
INSN_UID (insn));
|
||||
print_rtl (gcse_file, newcnst);
|
||||
fprintf (gcse_file, "\n");
|
||||
print_rtl (dump_file, newcnst);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
local_const_prop_count++;
|
||||
return true;
|
||||
|
@ -3117,12 +3103,12 @@ do_local_cprop (rtx x, rtx insn, bool alter_jumps, rtx *libcall_sp)
|
|||
else if (newreg && newreg != x && try_replace_reg (x, newreg, insn))
|
||||
{
|
||||
adjust_libcall_notes (x, newreg, insn, libcall_sp);
|
||||
if (gcse_file != NULL)
|
||||
if (dump_file != NULL)
|
||||
{
|
||||
fprintf (gcse_file,
|
||||
fprintf (dump_file,
|
||||
"LOCAL COPY-PROP: Replacing reg %d in insn %d",
|
||||
REGNO (x), INSN_UID (insn));
|
||||
fprintf (gcse_file, " with reg %d\n", REGNO (newreg));
|
||||
fprintf (dump_file, " with reg %d\n", REGNO (newreg));
|
||||
}
|
||||
local_copy_prop_count++;
|
||||
return true;
|
||||
|
@ -3259,8 +3245,8 @@ cprop (int alter_jumps)
|
|||
/* Note we start at block 1. */
|
||||
if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
|
||||
{
|
||||
if (gcse_file != NULL)
|
||||
fprintf (gcse_file, "\n");
|
||||
if (dump_file != NULL)
|
||||
fprintf (dump_file, "\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3284,8 +3270,8 @@ cprop (int alter_jumps)
|
|||
}
|
||||
}
|
||||
|
||||
if (gcse_file != NULL)
|
||||
fprintf (gcse_file, "\n");
|
||||
if (dump_file != NULL)
|
||||
fprintf (dump_file, "\n");
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
@ -3374,19 +3360,19 @@ find_implicit_sets (void)
|
|||
new = gen_rtx_SET (VOIDmode, XEXP (cond, 0),
|
||||
XEXP (cond, 1));
|
||||
implicit_sets[dest->index] = new;
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf(gcse_file, "Implicit set of reg %d in ",
|
||||
fprintf(dump_file, "Implicit set of reg %d in ",
|
||||
REGNO (XEXP (cond, 0)));
|
||||
fprintf(gcse_file, "basic block %d\n", dest->index);
|
||||
fprintf(dump_file, "basic block %d\n", dest->index);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gcse_file)
|
||||
fprintf (gcse_file, "Found %d implicit sets\n", count);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Found %d implicit sets\n", count);
|
||||
}
|
||||
|
||||
/* Perform one copy/constant propagation pass.
|
||||
|
@ -3415,8 +3401,8 @@ one_cprop_pass (int pass, bool cprop_jumps, bool bypass_jumps)
|
|||
free (implicit_sets);
|
||||
implicit_sets = NULL;
|
||||
|
||||
if (gcse_file)
|
||||
dump_hash_table (gcse_file, "SET", &set_hash_table);
|
||||
if (dump_file)
|
||||
dump_hash_table (dump_file, "SET", &set_hash_table);
|
||||
if (set_hash_table.n_elems > 0)
|
||||
{
|
||||
alloc_cprop_mem (last_basic_block, set_hash_table.n_elems);
|
||||
|
@ -3429,13 +3415,13 @@ one_cprop_pass (int pass, bool cprop_jumps, bool bypass_jumps)
|
|||
|
||||
free_hash_table (&set_hash_table);
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "CPROP of %s, pass %d: %d bytes needed, ",
|
||||
fprintf (dump_file, "CPROP of %s, pass %d: %d bytes needed, ",
|
||||
current_function_name (), pass, bytes_used);
|
||||
fprintf (gcse_file, "%d local const props, %d local copy props, ",
|
||||
fprintf (dump_file, "%d local const props, %d local copy props, ",
|
||||
local_const_prop_count, local_copy_prop_count);
|
||||
fprintf (gcse_file, "%d global const props, %d global copy props\n\n",
|
||||
fprintf (dump_file, "%d global const props, %d global copy props\n\n",
|
||||
global_const_prop_count, global_copy_prop_count);
|
||||
}
|
||||
/* Global analysis may get into infinite loops for unreachable blocks. */
|
||||
|
@ -3651,13 +3637,13 @@ bypass_block (basic_block bb, rtx setcc, rtx jump)
|
|||
insert_insn_on_edge (copy_insn (pat), e);
|
||||
}
|
||||
|
||||
if (gcse_file != NULL)
|
||||
if (dump_file != NULL)
|
||||
{
|
||||
fprintf (gcse_file, "JUMP-BYPASS: Proved reg %d "
|
||||
fprintf (dump_file, "JUMP-BYPASS: Proved reg %d "
|
||||
"in jump_insn %d equals constant ",
|
||||
regno, INSN_UID (jump));
|
||||
print_rtl (gcse_file, SET_SRC (set->expr));
|
||||
fprintf (gcse_file, "\nBypass edge from %d->%d to %d\n",
|
||||
print_rtl (dump_file, SET_SRC (set->expr));
|
||||
fprintf (dump_file, "\nBypass edge from %d->%d to %d\n",
|
||||
e->src->index, old_dest->index, dest->index);
|
||||
}
|
||||
change = 1;
|
||||
|
@ -3862,7 +3848,7 @@ compute_pre_data (void)
|
|||
sbitmap_not (ae_kill[bb->index], ae_kill[bb->index]);
|
||||
}
|
||||
|
||||
edge_list = pre_edge_lcm (gcse_file, expr_hash_table.n_elems, transp, comp, antloc,
|
||||
edge_list = pre_edge_lcm (expr_hash_table.n_elems, transp, comp, antloc,
|
||||
ae_kill, &pre_insert_map, &pre_delete_map);
|
||||
sbitmap_vector_free (antloc);
|
||||
antloc = NULL;
|
||||
|
@ -4105,11 +4091,11 @@ insert_insn_end_bb (struct expr *expr, basic_block bb, int pre)
|
|||
|
||||
gcse_create_count++;
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "PRE/HOIST: end of bb %d, insn %d, ",
|
||||
fprintf (dump_file, "PRE/HOIST: end of bb %d, insn %d, ",
|
||||
bb->index, INSN_UID (new_insn));
|
||||
fprintf (gcse_file, "copying expression %d to reg %d\n",
|
||||
fprintf (dump_file, "copying expression %d to reg %d\n",
|
||||
expr->bitmap_index, regno);
|
||||
}
|
||||
}
|
||||
|
@ -4174,12 +4160,12 @@ pre_edge_insert (struct edge_list *edge_list, struct expr **index_map)
|
|||
insert_insn_on_edge (insn, eg);
|
||||
}
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "PRE/HOIST: edge (%d,%d), ",
|
||||
fprintf (dump_file, "PRE/HOIST: edge (%d,%d), ",
|
||||
bb->index,
|
||||
INDEX_EDGE_SUCC_BB (edge_list, e)->index);
|
||||
fprintf (gcse_file, "copy expression %d\n",
|
||||
fprintf (dump_file, "copy expression %d\n",
|
||||
expr->bitmap_index);
|
||||
}
|
||||
|
||||
|
@ -4300,8 +4286,8 @@ pre_insert_copy_insn (struct expr *expr, rtx insn)
|
|||
|
||||
gcse_create_count++;
|
||||
|
||||
if (gcse_file)
|
||||
fprintf (gcse_file,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"PRE: bb %d, insn %d, copy expression %d in insn %d to reg %d\n",
|
||||
BLOCK_NUM (insn), INSN_UID (new_insn), indx,
|
||||
INSN_UID (insn), regno);
|
||||
|
@ -4453,12 +4439,12 @@ pre_delete (void)
|
|||
changed = 1;
|
||||
gcse_subst_count++;
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file,
|
||||
fprintf (dump_file,
|
||||
"PRE: redundant insn %d (expression %d) in ",
|
||||
INSN_UID (insn), indx);
|
||||
fprintf (gcse_file, "bb %d, reaching reg is %d\n",
|
||||
fprintf (dump_file, "bb %d, reaching reg is %d\n",
|
||||
bb->index, REGNO (expr->reaching_reg));
|
||||
}
|
||||
}
|
||||
|
@ -4550,8 +4536,8 @@ one_pre_gcse_pass (int pass)
|
|||
|
||||
compute_hash_table (&expr_hash_table);
|
||||
trim_ld_motion_mems ();
|
||||
if (gcse_file)
|
||||
dump_hash_table (gcse_file, "Expression", &expr_hash_table);
|
||||
if (dump_file)
|
||||
dump_hash_table (dump_file, "Expression", &expr_hash_table);
|
||||
|
||||
if (expr_hash_table.n_elems > 0)
|
||||
{
|
||||
|
@ -4566,11 +4552,11 @@ one_pre_gcse_pass (int pass)
|
|||
remove_fake_exit_edges ();
|
||||
free_hash_table (&expr_hash_table);
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "\nPRE GCSE of %s, pass %d: %d bytes needed, ",
|
||||
fprintf (dump_file, "\nPRE GCSE of %s, pass %d: %d bytes needed, ",
|
||||
current_function_name (), pass, bytes_used);
|
||||
fprintf (gcse_file, "%d substs, %d insns created\n",
|
||||
fprintf (dump_file, "%d substs, %d insns created\n",
|
||||
gcse_subst_count, gcse_create_count);
|
||||
}
|
||||
|
||||
|
@ -4749,8 +4735,8 @@ compute_code_hoist_vbeinout (void)
|
|||
passes++;
|
||||
}
|
||||
|
||||
if (gcse_file)
|
||||
fprintf (gcse_file, "hoisting vbeinout computation: %d passes\n", passes);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "hoisting vbeinout computation: %d passes\n", passes);
|
||||
}
|
||||
|
||||
/* Top level routine to do the dataflow analysis needed by code hoisting. */
|
||||
|
@ -4762,8 +4748,8 @@ compute_code_hoist_data (void)
|
|||
compute_transpout ();
|
||||
compute_code_hoist_vbeinout ();
|
||||
calculate_dominance_info (CDI_DOMINATORS);
|
||||
if (gcse_file)
|
||||
fprintf (gcse_file, "\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
|
||||
/* Determine if the expression identified by EXPR_INDEX would
|
||||
|
@ -4995,8 +4981,8 @@ one_code_hoisting_pass (void)
|
|||
|
||||
alloc_hash_table (max_cuid, &expr_hash_table, 0);
|
||||
compute_hash_table (&expr_hash_table);
|
||||
if (gcse_file)
|
||||
dump_hash_table (gcse_file, "Code Hosting Expressions", &expr_hash_table);
|
||||
if (dump_file)
|
||||
dump_hash_table (dump_file, "Code Hosting Expressions", &expr_hash_table);
|
||||
|
||||
if (expr_hash_table.n_elems > 0)
|
||||
{
|
||||
|
@ -5389,8 +5375,8 @@ trim_ld_motion_mems (void)
|
|||
}
|
||||
|
||||
/* Show the world what we've found. */
|
||||
if (gcse_file && pre_ldst_mems != NULL)
|
||||
print_ldst_list (gcse_file);
|
||||
if (dump_file && pre_ldst_mems != NULL)
|
||||
print_ldst_list (dump_file);
|
||||
}
|
||||
|
||||
/* This routine will take an expression which we are replacing with
|
||||
|
@ -5429,13 +5415,13 @@ update_ld_motion_stores (struct expr * expr)
|
|||
if (expr->reaching_reg == src)
|
||||
continue;
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "PRE: store updated with reaching reg ");
|
||||
print_rtl (gcse_file, expr->reaching_reg);
|
||||
fprintf (gcse_file, ":\n ");
|
||||
print_inline_rtx (gcse_file, insn, 8);
|
||||
fprintf (gcse_file, "\n");
|
||||
fprintf (dump_file, "PRE: store updated with reaching reg ");
|
||||
print_rtl (dump_file, expr->reaching_reg);
|
||||
fprintf (dump_file, ":\n ");
|
||||
print_inline_rtx (dump_file, insn, 8);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
|
||||
copy = gen_move_insn ( reg, copy_rtx (SET_SRC (pat)));
|
||||
|
@ -5848,10 +5834,10 @@ compute_store_table (void)
|
|||
|
||||
ret = enumerate_ldsts ();
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "ST_avail and ST_antic (shown under loads..)\n");
|
||||
print_ldst_list (gcse_file);
|
||||
fprintf (dump_file, "ST_avail and ST_antic (shown under loads..)\n");
|
||||
print_ldst_list (dump_file);
|
||||
}
|
||||
|
||||
free (last_set_in);
|
||||
|
@ -6073,8 +6059,8 @@ build_store_vectors (void)
|
|||
if (TEST_BIT (ae_gen[bb->index], ptr->index))
|
||||
{
|
||||
rtx r = gen_reg_rtx (GET_MODE (ptr->pattern));
|
||||
if (gcse_file)
|
||||
fprintf (gcse_file, "Removing redundant store:\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Removing redundant store:\n");
|
||||
replace_store_insn (r, XEXP (st, 0), bb, ptr);
|
||||
continue;
|
||||
}
|
||||
|
@ -6119,12 +6105,12 @@ build_store_vectors (void)
|
|||
|
||||
free (regs_set_in_block);
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_sbitmap_vector (gcse_file, "st_antloc", "", st_antloc, last_basic_block);
|
||||
dump_sbitmap_vector (gcse_file, "st_kill", "", ae_kill, last_basic_block);
|
||||
dump_sbitmap_vector (gcse_file, "Transpt", "", transp, last_basic_block);
|
||||
dump_sbitmap_vector (gcse_file, "st_avloc", "", ae_gen, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_antloc", "", st_antloc, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_kill", "", ae_kill, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "Transpt", "", transp, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_avloc", "", ae_gen, last_basic_block);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6151,12 +6137,12 @@ insert_insn_start_bb (rtx insn, basic_block bb)
|
|||
|
||||
insn = emit_insn_after_noloc (insn, prev);
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "STORE_MOTION insert store at start of BB %d:\n",
|
||||
fprintf (dump_file, "STORE_MOTION insert store at start of BB %d:\n",
|
||||
bb->index);
|
||||
print_inline_rtx (gcse_file, insn, 6);
|
||||
fprintf (gcse_file, "\n");
|
||||
print_inline_rtx (dump_file, insn, 6);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6216,12 +6202,12 @@ insert_store (struct ls_expr * expr, edge e)
|
|||
|
||||
insert_insn_on_edge (insn, e);
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "STORE_MOTION insert insn on edge (%d, %d):\n",
|
||||
fprintf (dump_file, "STORE_MOTION insert insn on edge (%d, %d):\n",
|
||||
e->src->index, e->dest->index);
|
||||
print_inline_rtx (gcse_file, insn, 6);
|
||||
fprintf (gcse_file, "\n");
|
||||
print_inline_rtx (dump_file, insn, 6);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -6291,8 +6277,8 @@ remove_reachable_equiv_notes (basic_block bb, struct ls_expr *smexpr)
|
|||
if (!note || !expr_equiv_p (XEXP (note, 0), mem))
|
||||
continue;
|
||||
|
||||
if (gcse_file)
|
||||
fprintf (gcse_file, "STORE_MOTION drop REG_EQUAL note at insn %d:\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "STORE_MOTION drop REG_EQUAL note at insn %d:\n",
|
||||
INSN_UID (insn));
|
||||
remove_note (insn, note);
|
||||
}
|
||||
|
@ -6322,14 +6308,14 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
|
|||
insn = gen_move_insn (reg, SET_SRC (single_set (del)));
|
||||
insn = emit_insn_after (insn, del);
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file,
|
||||
fprintf (dump_file,
|
||||
"STORE_MOTION delete insn in BB %d:\n ", bb->index);
|
||||
print_inline_rtx (gcse_file, del, 6);
|
||||
fprintf (gcse_file, "\nSTORE MOTION replaced with insn:\n ");
|
||||
print_inline_rtx (gcse_file, insn, 6);
|
||||
fprintf (gcse_file, "\n");
|
||||
print_inline_rtx (dump_file, del, 6);
|
||||
fprintf (dump_file, "\nSTORE MOTION replaced with insn:\n ");
|
||||
print_inline_rtx (dump_file, insn, 6);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
|
||||
for (ptr = ANTIC_STORE_LIST (smexpr); ptr; ptr = XEXP (ptr, 1))
|
||||
|
@ -6375,8 +6361,8 @@ replace_store_insn (rtx reg, rtx del, basic_block bb, struct ls_expr *smexpr)
|
|||
if (!note || !expr_equiv_p (XEXP (note, 0), mem))
|
||||
continue;
|
||||
|
||||
if (gcse_file)
|
||||
fprintf (gcse_file, "STORE_MOTION drop REG_EQUAL note at insn %d:\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "STORE_MOTION drop REG_EQUAL note at insn %d:\n",
|
||||
INSN_UID (insn));
|
||||
remove_note (insn, note);
|
||||
}
|
||||
|
@ -6447,10 +6433,10 @@ store_motion (void)
|
|||
struct ls_expr * ptr;
|
||||
int update_flow = 0;
|
||||
|
||||
if (gcse_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (gcse_file, "before store motion\n");
|
||||
print_rtl (gcse_file, get_insns ());
|
||||
fprintf (dump_file, "before store motion\n");
|
||||
print_rtl (dump_file, get_insns ());
|
||||
}
|
||||
|
||||
init_alias_analysis ();
|
||||
|
@ -6471,7 +6457,7 @@ store_motion (void)
|
|||
add_noreturn_fake_exit_edges ();
|
||||
connect_infinite_loops_to_exit ();
|
||||
|
||||
edge_list = pre_edge_rev_lcm (gcse_file, num_stores, transp, ae_gen,
|
||||
edge_list = pre_edge_rev_lcm (num_stores, transp, ae_gen,
|
||||
st_antloc, ae_kill, &pre_insert_map,
|
||||
&pre_delete_map);
|
||||
|
||||
|
@ -6487,8 +6473,8 @@ store_motion (void)
|
|||
|
||||
if (x >= 0)
|
||||
{
|
||||
if (gcse_file != NULL)
|
||||
fprintf (gcse_file,
|
||||
if (dump_file != NULL)
|
||||
fprintf (dump_file,
|
||||
"Can't replace store %d: abnormal edge from %d to %d\n",
|
||||
ptr->index, INDEX_EDGE (edge_list, x)->src->index,
|
||||
INDEX_EDGE (edge_list, x)->dest->index);
|
||||
|
@ -6519,7 +6505,7 @@ store_motion (void)
|
|||
/* Entry point for jump bypassing optimization pass. */
|
||||
|
||||
static int
|
||||
bypass_jumps (FILE *file)
|
||||
bypass_jumps (void)
|
||||
{
|
||||
int changed;
|
||||
|
||||
|
@ -6528,16 +6514,12 @@ bypass_jumps (FILE *file)
|
|||
if (current_function_calls_setjmp)
|
||||
return 0;
|
||||
|
||||
/* For calling dump_foo fns from gdb. */
|
||||
debug_stderr = stderr;
|
||||
gcse_file = file;
|
||||
|
||||
/* Identify the basic block information for this function, including
|
||||
successors and predecessors. */
|
||||
max_gcse_regno = max_reg_num ();
|
||||
|
||||
if (file)
|
||||
dump_flow_info (file);
|
||||
if (dump_file)
|
||||
dump_flow_info (dump_file);
|
||||
|
||||
/* Return if there's nothing to do, or it is too expensive. */
|
||||
if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1
|
||||
|
@ -6567,11 +6549,11 @@ bypass_jumps (FILE *file)
|
|||
changed = one_cprop_pass (MAX_GCSE_PASSES + 2, true, true);
|
||||
free_gcse_mem ();
|
||||
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "BYPASS of %s: %d basic blocks, ",
|
||||
fprintf (dump_file, "BYPASS of %s: %d basic blocks, ",
|
||||
current_function_name (), n_basic_blocks);
|
||||
fprintf (file, "%d bytes\n\n", bytes_used);
|
||||
fprintf (dump_file, "%d bytes\n\n", bytes_used);
|
||||
}
|
||||
|
||||
obstack_free (&gcse_obstack, NULL);
|
||||
|
@ -6637,7 +6619,7 @@ rest_of_handle_jump_bypass (void)
|
|||
cleanup_cfg (CLEANUP_EXPENSIVE);
|
||||
reg_scan (get_insns (), max_reg_num ());
|
||||
|
||||
if (bypass_jumps (dump_file))
|
||||
if (bypass_jumps ())
|
||||
{
|
||||
rebuild_jump_labels (get_insns ());
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE);
|
||||
|
@ -6677,7 +6659,7 @@ rest_of_handle_gcse (void)
|
|||
int save_csb, save_cfj;
|
||||
int tem2 = 0, tem;
|
||||
|
||||
tem = gcse_main (get_insns (), dump_file);
|
||||
tem = gcse_main (get_insns ());
|
||||
rebuild_jump_labels (get_insns ());
|
||||
delete_trivially_dead_insns (get_insns (), max_reg_num ());
|
||||
|
||||
|
@ -6691,7 +6673,7 @@ rest_of_handle_gcse (void)
|
|||
{
|
||||
timevar_push (TV_CSE);
|
||||
reg_scan (get_insns (), max_reg_num ());
|
||||
tem2 = cse_main (get_insns (), max_reg_num (), dump_file);
|
||||
tem2 = cse_main (get_insns (), max_reg_num ());
|
||||
purge_all_dead_edges ();
|
||||
delete_trivially_dead_insns (get_insns (), max_reg_num ());
|
||||
timevar_pop (TV_CSE);
|
||||
|
|
10
gcc/global.c
10
gcc/global.c
|
@ -326,14 +326,12 @@ static void make_accurate_live_analysis (void);
|
|||
|
||||
|
||||
/* Perform allocation of pseudo-registers not allocated by local_alloc.
|
||||
FILE is a file to output debugging information on,
|
||||
or zero if such output is not desired.
|
||||
|
||||
Return value is nonzero if reload failed
|
||||
and we must not do any more for this function. */
|
||||
|
||||
static int
|
||||
global_alloc (FILE *file)
|
||||
global_alloc (void)
|
||||
{
|
||||
int retval;
|
||||
#ifdef ELIMINABLE_REGS
|
||||
|
@ -590,8 +588,8 @@ global_alloc (FILE *file)
|
|||
|
||||
prune_preferences ();
|
||||
|
||||
if (file)
|
||||
dump_conflicts (file);
|
||||
if (dump_file)
|
||||
dump_conflicts (dump_file);
|
||||
|
||||
/* Try allocating them, one by one, in that order,
|
||||
except for parameters marked with reg_live_length[regno] == -2. */
|
||||
|
@ -2510,7 +2508,7 @@ rest_of_handle_global_alloc (void)
|
|||
pass fixing up any insns that are invalid. */
|
||||
|
||||
if (optimize)
|
||||
failure = global_alloc (dump_file);
|
||||
failure = global_alloc ();
|
||||
else
|
||||
{
|
||||
build_insn_chain (get_insns ());
|
||||
|
|
|
@ -142,6 +142,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
#include "recog.h"
|
||||
#include "sched-int.h"
|
||||
#include "target.h"
|
||||
#include "output.h"
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
|
||||
|
@ -501,7 +502,7 @@ struct sched_info *current_sched_info;
|
|||
|
||||
#ifndef INSN_SCHEDULING
|
||||
void
|
||||
schedule_insns (FILE *dump_file ATTRIBUTE_UNUSED)
|
||||
schedule_insns (void)
|
||||
{
|
||||
}
|
||||
#else
|
||||
|
@ -2210,11 +2211,10 @@ set_priorities (rtx head, rtx tail)
|
|||
return n_insn;
|
||||
}
|
||||
|
||||
/* Initialize some global state for the scheduler. DUMP_FILE is to be used
|
||||
for debugging output. */
|
||||
/* Initialize some global state for the scheduler. */
|
||||
|
||||
void
|
||||
sched_init (FILE *dump_file)
|
||||
sched_init (void)
|
||||
{
|
||||
int luid;
|
||||
basic_block b;
|
||||
|
|
|
@ -1773,9 +1773,6 @@ type_escape_execute (void)
|
|||
result = splay_tree_successor (all_canon_types, (splay_tree_key) key);
|
||||
}
|
||||
|
||||
/* { */
|
||||
/* FILE * tmp = dump_file; */
|
||||
/* dump_file = stderr; */
|
||||
if (dump_file)
|
||||
{
|
||||
EXECUTE_IF_SET_IN_BITMAP (global_types_seen, 0, i, bi)
|
||||
|
@ -1792,8 +1789,6 @@ type_escape_execute (void)
|
|||
fprintf(dump_file, " contained\n");
|
||||
}
|
||||
}
|
||||
/* dump_file = tmp; */
|
||||
/* } */
|
||||
|
||||
/* Get rid of uid_to_addressof_up_map and its bitmaps. */
|
||||
result = splay_tree_min (uid_to_addressof_up_map);
|
||||
|
|
14
gcc/ipa.c
14
gcc/ipa.c
|
@ -94,7 +94,7 @@ cgraph_postorder (struct cgraph_node **order)
|
|||
removes unneeded bodies of extern inline functions. */
|
||||
|
||||
bool
|
||||
cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *dump_file)
|
||||
cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
|
||||
{
|
||||
struct cgraph_node *first = (void *) 1;
|
||||
struct cgraph_node *node;
|
||||
|
@ -104,8 +104,8 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *dump_file)
|
|||
#ifdef ENABLE_CHECKING
|
||||
verify_cgraph ();
|
||||
#endif
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\nReclaiming functions:");
|
||||
if (file)
|
||||
fprintf (file, "\nReclaiming functions:");
|
||||
#ifdef ENABLE_CHECKING
|
||||
for (node = cgraph_nodes; node; node = node->next)
|
||||
gcc_assert (!node->aux);
|
||||
|
@ -163,8 +163,8 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *dump_file)
|
|||
local_insns = node->local.self_insns;
|
||||
else
|
||||
local_insns = 0;
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " %s", cgraph_node_name (node));
|
||||
if (file)
|
||||
fprintf (file, " %s", cgraph_node_name (node));
|
||||
if (!node->analyzed || !DECL_EXTERNAL (node->decl)
|
||||
|| before_inlining_p)
|
||||
cgraph_remove_node (node);
|
||||
|
@ -203,7 +203,7 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *dump_file)
|
|||
}
|
||||
for (node = cgraph_nodes; node; node = node->next)
|
||||
node->aux = NULL;
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\nReclaimed %i insns", insns);
|
||||
if (file)
|
||||
fprintf (file, "\nReclaimed %i insns", insns);
|
||||
return changed;
|
||||
}
|
||||
|
|
84
gcc/lcm.c
84
gcc/lcm.c
|
@ -376,7 +376,7 @@ compute_insert_delete (struct edge_list *edge_list, sbitmap *antloc,
|
|||
map the insert vector to what edge an expression should be inserted on. */
|
||||
|
||||
struct edge_list *
|
||||
pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
||||
pre_edge_lcm (int n_exprs, sbitmap *transp,
|
||||
sbitmap *avloc, sbitmap *antloc, sbitmap *kill,
|
||||
sbitmap **insert, sbitmap **delete)
|
||||
{
|
||||
|
@ -390,15 +390,15 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
num_edges = NUM_EDGES (edge_list);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "Edge List:\n");
|
||||
verify_edge_list (file, edge_list);
|
||||
print_edge_list (file, edge_list);
|
||||
dump_sbitmap_vector (file, "transp", "", transp, last_basic_block);
|
||||
dump_sbitmap_vector (file, "antloc", "", antloc, last_basic_block);
|
||||
dump_sbitmap_vector (file, "avloc", "", avloc, last_basic_block);
|
||||
dump_sbitmap_vector (file, "kill", "", kill, last_basic_block);
|
||||
fprintf (dump_file, "Edge List:\n");
|
||||
verify_edge_list (dump_file, edge_list);
|
||||
print_edge_list (dump_file, edge_list);
|
||||
dump_sbitmap_vector (dump_file, "transp", "", transp, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "antloc", "", antloc, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "avloc", "", avloc, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "kill", "", kill, last_basic_block);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -414,10 +414,10 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
compute_antinout_edge (antloc, transp, antin, antout);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_sbitmap_vector (file, "antin", "", antin, last_basic_block);
|
||||
dump_sbitmap_vector (file, "antout", "", antout, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "antin", "", antin, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "antout", "", antout, last_basic_block);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -426,8 +426,8 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
dump_sbitmap_vector (file, "earliest", "", earliest, num_edges);
|
||||
if (dump_file)
|
||||
dump_sbitmap_vector (dump_file, "earliest", "", earliest, num_edges);
|
||||
#endif
|
||||
|
||||
sbitmap_vector_free (antout);
|
||||
|
@ -441,10 +441,10 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
compute_laterin (edge_list, earliest, antloc, later, laterin);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_sbitmap_vector (file, "laterin", "", laterin, last_basic_block + 1);
|
||||
dump_sbitmap_vector (file, "later", "", later, num_edges);
|
||||
dump_sbitmap_vector (dump_file, "laterin", "", laterin, last_basic_block + 1);
|
||||
dump_sbitmap_vector (dump_file, "later", "", later, num_edges);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -458,10 +458,10 @@ pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
sbitmap_vector_free (later);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_sbitmap_vector (file, "pre_insert_map", "", *insert, num_edges);
|
||||
dump_sbitmap_vector (file, "pre_delete_map", "", *delete,
|
||||
dump_sbitmap_vector (dump_file, "pre_insert_map", "", *insert, num_edges);
|
||||
dump_sbitmap_vector (dump_file, "pre_delete_map", "", *delete,
|
||||
last_basic_block);
|
||||
}
|
||||
#endif
|
||||
|
@ -710,7 +710,7 @@ compute_rev_insert_delete (struct edge_list *edge_list, sbitmap *st_avloc,
|
|||
an expression should be inserted on. */
|
||||
|
||||
struct edge_list *
|
||||
pre_edge_rev_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
||||
pre_edge_rev_lcm (int n_exprs, sbitmap *transp,
|
||||
sbitmap *st_avloc, sbitmap *st_antloc, sbitmap *kill,
|
||||
sbitmap **insert, sbitmap **delete)
|
||||
{
|
||||
|
@ -735,25 +735,25 @@ pre_edge_rev_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
compute_available (st_avloc, kill, st_avout, st_avin);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "Edge List:\n");
|
||||
verify_edge_list (file, edge_list);
|
||||
print_edge_list (file, edge_list);
|
||||
dump_sbitmap_vector (file, "transp", "", transp, last_basic_block);
|
||||
dump_sbitmap_vector (file, "st_avloc", "", st_avloc, last_basic_block);
|
||||
dump_sbitmap_vector (file, "st_antloc", "", st_antloc, last_basic_block);
|
||||
dump_sbitmap_vector (file, "st_antin", "", st_antin, last_basic_block);
|
||||
dump_sbitmap_vector (file, "st_antout", "", st_antout, last_basic_block);
|
||||
dump_sbitmap_vector (file, "st_kill", "", kill, last_basic_block);
|
||||
fprintf (dump_file, "Edge List:\n");
|
||||
verify_edge_list (dump_file, edge_list);
|
||||
print_edge_list (dump_file, edge_list);
|
||||
dump_sbitmap_vector (dump_file, "transp", "", transp, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_avloc", "", st_avloc, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_antloc", "", st_antloc, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_antin", "", st_antin, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_antout", "", st_antout, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_kill", "", kill, last_basic_block);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_sbitmap_vector (file, "st_avout", "", st_avout, last_basic_block);
|
||||
dump_sbitmap_vector (file, "st_avin", "", st_avin, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_avout", "", st_avout, last_basic_block);
|
||||
dump_sbitmap_vector (dump_file, "st_avin", "", st_avin, last_basic_block);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -763,8 +763,8 @@ pre_edge_rev_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
kill, farthest);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
dump_sbitmap_vector (file, "farthest", "", farthest, num_edges);
|
||||
if (dump_file)
|
||||
dump_sbitmap_vector (dump_file, "farthest", "", farthest, num_edges);
|
||||
#endif
|
||||
|
||||
sbitmap_vector_free (st_antin);
|
||||
|
@ -780,11 +780,11 @@ pre_edge_rev_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_sbitmap_vector (file, "nearerout", "", nearerout,
|
||||
dump_sbitmap_vector (dump_file, "nearerout", "", nearerout,
|
||||
last_basic_block + 1);
|
||||
dump_sbitmap_vector (file, "nearer", "", nearer, num_edges);
|
||||
dump_sbitmap_vector (dump_file, "nearer", "", nearer, num_edges);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -799,10 +799,10 @@ pre_edge_rev_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
|
|||
sbitmap_vector_free (nearer);
|
||||
|
||||
#ifdef LCM_DEBUG_INFO
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_sbitmap_vector (file, "pre_insert_map", "", *insert, num_edges);
|
||||
dump_sbitmap_vector (file, "pre_delete_map", "", *delete,
|
||||
dump_sbitmap_vector (dump_file, "pre_insert_map", "", *insert, num_edges);
|
||||
dump_sbitmap_vector (dump_file, "pre_delete_map", "", *delete,
|
||||
last_basic_block);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2542,7 +2542,7 @@ rest_of_handle_local_alloc (void)
|
|||
|
||||
allocate_initial_values (reg_equiv_memory_loc);
|
||||
|
||||
regclass (get_insns (), max_reg_num (), dump_file);
|
||||
regclass (get_insns (), max_reg_num ());
|
||||
rebuild_notes = local_alloc ();
|
||||
|
||||
/* Local allocation may have turned an indirect jump into a direct
|
||||
|
|
|
@ -38,7 +38,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
loops. */
|
||||
|
||||
struct loops *
|
||||
loop_optimizer_init (FILE *dumpfile, unsigned flags)
|
||||
loop_optimizer_init (unsigned flags)
|
||||
{
|
||||
struct loops *loops = XCNEW (struct loops);
|
||||
edge e;
|
||||
|
@ -93,7 +93,7 @@ loop_optimizer_init (FILE *dumpfile, unsigned flags)
|
|||
mark_single_exit_loops (loops);
|
||||
|
||||
/* Dump loops. */
|
||||
flow_loops_dump (loops, dumpfile, NULL, 1);
|
||||
flow_loops_dump (loops, dump_file, NULL, 1);
|
||||
|
||||
#ifdef ENABLE_CHECKING
|
||||
verify_dominators (CDI_DOMINATORS);
|
||||
|
@ -105,7 +105,7 @@ loop_optimizer_init (FILE *dumpfile, unsigned flags)
|
|||
|
||||
/* Finalize loop optimizer. */
|
||||
void
|
||||
loop_optimizer_finalize (struct loops *loops, FILE *dumpfile)
|
||||
loop_optimizer_finalize (struct loops *loops)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
@ -116,9 +116,6 @@ loop_optimizer_finalize (struct loops *loops, FILE *dumpfile)
|
|||
if (loops->parray[i])
|
||||
free_simple_loop_desc (loops->parray[i]);
|
||||
|
||||
/* Another dump. */
|
||||
flow_loops_dump (loops, dumpfile, NULL, 1);
|
||||
|
||||
/* Clean up. */
|
||||
flow_loops_free (loops);
|
||||
free (loops);
|
||||
|
@ -173,7 +170,7 @@ rtl_loop_init (void)
|
|||
/* Initialize structures for layout changes. */
|
||||
cfg_layout_initialize (0);
|
||||
|
||||
current_loops = loop_optimizer_init (dump_file, LOOPS_NORMAL);
|
||||
current_loops = loop_optimizer_init (LOOPS_NORMAL);
|
||||
}
|
||||
|
||||
struct tree_opt_pass pass_rtl_loop_init =
|
||||
|
@ -201,7 +198,7 @@ rtl_loop_done (void)
|
|||
basic_block bb;
|
||||
|
||||
if (current_loops)
|
||||
loop_optimizer_finalize (current_loops, dump_file);
|
||||
loop_optimizer_finalize (current_loops);
|
||||
|
||||
free_dominance_info (CDI_DOMINATORS);
|
||||
|
||||
|
|
402
gcc/loop.c
402
gcc/loop.c
|
@ -590,8 +590,6 @@ struct movable
|
|||
};
|
||||
|
||||
|
||||
static FILE *loop_dump_stream;
|
||||
|
||||
/* Forward declarations. */
|
||||
|
||||
static void invalidate_loops_containing_label (rtx);
|
||||
|
@ -799,12 +797,10 @@ compute_luids (rtx start, rtx end, int prev_luid)
|
|||
}
|
||||
|
||||
/* Entry point of this file. Perform loop optimization
|
||||
on the current function. F is the first insn of the function
|
||||
and DUMPFILE is a stream for output of a trace of actions taken
|
||||
(or 0 if none should be output). */
|
||||
on the current function. F is the first insn of the function. */
|
||||
|
||||
static void
|
||||
loop_optimize (rtx f, FILE *dumpfile, int flags)
|
||||
loop_optimize (rtx f, int flags)
|
||||
{
|
||||
rtx insn;
|
||||
int i;
|
||||
|
@ -812,8 +808,6 @@ loop_optimize (rtx f, FILE *dumpfile, int flags)
|
|||
struct loops *loops = &loops_data;
|
||||
struct loop_info *loops_info;
|
||||
|
||||
loop_dump_stream = dumpfile;
|
||||
|
||||
init_recog_no_volatile ();
|
||||
|
||||
max_reg_before_loop = max_reg_num ();
|
||||
|
@ -1091,8 +1085,8 @@ scan_loop (struct loop *loop, int flags)
|
|||
if (INSN_UID (loop->scan_start) >= max_uid_for_loop
|
||||
|| !LABEL_P (loop->scan_start))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "\nLoop from %d to %d is phony.\n\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\nLoop from %d to %d is phony.\n\n",
|
||||
INSN_UID (loop_start), INSN_UID (loop_end));
|
||||
return;
|
||||
}
|
||||
|
@ -1103,8 +1097,8 @@ scan_loop (struct loop *loop, int flags)
|
|||
loop_regs_scan (loop, loop_info->mems_idx + 16);
|
||||
insn_count = count_insns_in_loop (loop);
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "\nLoop from %d to %d: %d real insns.\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\nLoop from %d to %d: %d real insns.\n",
|
||||
INSN_UID (loop_start), INSN_UID (loop_end), insn_count);
|
||||
|
||||
/* Scan through the loop finding insns that are safe to move.
|
||||
|
@ -2195,27 +2189,27 @@ move_movables (struct loop *loop, struct loop_movables *movables,
|
|||
{
|
||||
/* Describe this movable insn. */
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream, "Insn %d: regno %d (life %d), ",
|
||||
fprintf (dump_file, "Insn %d: regno %d (life %d), ",
|
||||
INSN_UID (m->insn), m->regno, m->lifetime);
|
||||
if (m->consec > 0)
|
||||
fprintf (loop_dump_stream, "consec %d, ", m->consec);
|
||||
fprintf (dump_file, "consec %d, ", m->consec);
|
||||
if (m->cond)
|
||||
fprintf (loop_dump_stream, "cond ");
|
||||
fprintf (dump_file, "cond ");
|
||||
if (m->force)
|
||||
fprintf (loop_dump_stream, "force ");
|
||||
fprintf (dump_file, "force ");
|
||||
if (m->global)
|
||||
fprintf (loop_dump_stream, "global ");
|
||||
fprintf (dump_file, "global ");
|
||||
if (m->done)
|
||||
fprintf (loop_dump_stream, "done ");
|
||||
fprintf (dump_file, "done ");
|
||||
if (m->move_insn)
|
||||
fprintf (loop_dump_stream, "move-insn ");
|
||||
fprintf (dump_file, "move-insn ");
|
||||
if (m->match)
|
||||
fprintf (loop_dump_stream, "matches %d ",
|
||||
fprintf (dump_file, "matches %d ",
|
||||
INSN_UID (m->match->insn));
|
||||
if (m->forces)
|
||||
fprintf (loop_dump_stream, "forces %d ",
|
||||
fprintf (dump_file, "forces %d ",
|
||||
INSN_UID (m->forces->insn));
|
||||
}
|
||||
|
||||
|
@ -2243,11 +2237,11 @@ move_movables (struct loop *loop, struct loop_movables *movables,
|
|||
p = m->insn;
|
||||
regno = m->regno;
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "savings %d ", savings);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "savings %d ", savings);
|
||||
|
||||
if (regs->array[regno].moved_once && loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "halved since already moved ");
|
||||
if (regs->array[regno].moved_once && dump_file)
|
||||
fprintf (dump_file, "halved since already moved ");
|
||||
|
||||
/* An insn MUST be moved if we already moved something else
|
||||
which is safe only if this one is moved too: that is,
|
||||
|
@ -2305,8 +2299,8 @@ move_movables (struct loop *loop, struct loop_movables *movables,
|
|||
if (new_start == 0)
|
||||
new_start = i1;
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, " moved to %d", INSN_UID (i1));
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " moved to %d", INSN_UID (i1));
|
||||
}
|
||||
/* If we are to re-generate the item being moved with a
|
||||
new move insn, first delete what we have and then emit
|
||||
|
@ -2377,8 +2371,8 @@ move_movables (struct loop *loop, struct loop_movables *movables,
|
|||
m->is_equiv ? REG_EQUIV : REG_EQUAL,
|
||||
m->set_src);
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, " moved to %d", INSN_UID (i1));
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " moved to %d", INSN_UID (i1));
|
||||
|
||||
/* The more regs we move, the less we like moving them. */
|
||||
threshold -= 3;
|
||||
|
@ -2566,8 +2560,8 @@ move_movables (struct loop *loop, struct loop_movables *movables,
|
|||
if (new_start == 0)
|
||||
new_start = i1;
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, " moved to %d",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " moved to %d",
|
||||
INSN_UID (i1));
|
||||
|
||||
/* If library call, now fix the REG_NOTES that contain
|
||||
|
@ -2679,14 +2673,14 @@ move_movables (struct loop *loop, struct loop_movables *movables,
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "not desirable");
|
||||
else if (dump_file)
|
||||
fprintf (dump_file, "not desirable");
|
||||
}
|
||||
else if (loop_dump_stream && !m->match)
|
||||
fprintf (loop_dump_stream, "not safe");
|
||||
else if (dump_file && !m->match)
|
||||
fprintf (dump_file, "not safe");
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
|
||||
if (new_start == 0)
|
||||
|
@ -3102,8 +3096,8 @@ find_and_verify_loops (rtx f, struct loops *loops)
|
|||
for (loop = current_loop; loop; loop = loop->outer)
|
||||
{
|
||||
loop->invalid = 1;
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"\nLoop at %d ignored due to setjmp.\n",
|
||||
INSN_UID (loop->start));
|
||||
}
|
||||
|
@ -3464,8 +3458,8 @@ mark_loop_jump (rtx x, struct loop *loop)
|
|||
return;
|
||||
|
||||
/* If we get here, we know we need to invalidate a loop. */
|
||||
if (loop_dump_stream && ! dest_loop->invalid)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file && ! dest_loop->invalid)
|
||||
fprintf (dump_file,
|
||||
"\nLoop at %d ignored due to multiple entry points.\n",
|
||||
INSN_UID (dest_loop->start));
|
||||
|
||||
|
@ -3504,8 +3498,8 @@ mark_loop_jump (rtx x, struct loop *loop)
|
|||
{
|
||||
for (outer_loop = loop; outer_loop; outer_loop = outer_loop->outer)
|
||||
{
|
||||
if (loop_dump_stream && ! outer_loop->invalid)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file && ! outer_loop->invalid)
|
||||
fprintf (dump_file,
|
||||
"\nLoop at %d ignored due to unknown exit jump.\n",
|
||||
INSN_UID (outer_loop->start));
|
||||
outer_loop->invalid = 1;
|
||||
|
@ -4143,8 +4137,8 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
slow enough to read the memory. */
|
||||
if (PREFETCH_NO_CALL && LOOP_INFO (loop)->has_call)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Prefetch: ignoring loop: has call.\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Prefetch: ignoring loop: has call.\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -4154,8 +4148,8 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
&& LOOP_INFO (loop)->n_iterations
|
||||
&& LOOP_INFO (loop)->n_iterations <= PREFETCH_LOW_LOOPCNT)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Prefetch: ignoring loop: not enough iterations.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -4180,26 +4174,26 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
heuristics more conservative. */
|
||||
if (GET_CODE (biv->add_val) != CONST_INT)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"Prefetch: ignoring biv %d: non-constant addition at insn %d:",
|
||||
REGNO (biv->src_reg), INSN_UID (biv->insn));
|
||||
print_rtl (loop_dump_stream, biv->add_val);
|
||||
fprintf (loop_dump_stream, "\n");
|
||||
print_rtl (dump_file, biv->add_val);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (biv->maybe_multiple)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"Prefetch: ignoring biv %d: maybe_multiple at insn %i:",
|
||||
REGNO (biv->src_reg), INSN_UID (biv->insn));
|
||||
print_rtl (loop_dump_stream, biv->add_val);
|
||||
fprintf (loop_dump_stream, "\n");
|
||||
print_rtl (dump_file, biv->add_val);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -4266,8 +4260,8 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
|
||||
if (ignore_reason != NULL)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Prefetch: ignoring giv at %d: %s.\n",
|
||||
INSN_UID (iv->insn), ignore_reason);
|
||||
continue;
|
||||
|
@ -4290,8 +4284,8 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
note_stores (PATTERN (iv->insn), check_store, &d);
|
||||
else
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Prefetch: Ignoring giv at %d: %s\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Prefetch: Ignoring giv at %d: %s\n",
|
||||
INSN_UID (iv->insn), "in conditional code.");
|
||||
continue;
|
||||
}
|
||||
|
@ -4345,8 +4339,8 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
num_prefetches++;
|
||||
if (num_prefetches >= MAX_PREFETCHES)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Maximal number of prefetches exceeded.\n");
|
||||
return;
|
||||
}
|
||||
|
@ -4383,8 +4377,8 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
else
|
||||
{
|
||||
info[i].prefetch_in_loop = 0, info[i].prefetch_before_loop = 0;
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Prefetch: ignoring giv at %d: %d%% density is too low.\n",
|
||||
INSN_UID (info[i].giv->insn), density);
|
||||
}
|
||||
|
@ -4408,8 +4402,8 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
{
|
||||
if ((ahead = SIMULTANEOUS_PREFETCHES / num_real_prefetches) == 0)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Prefetch: ignoring prefetches within loop: ahead is zero; %d < %d\n",
|
||||
SIMULTANEOUS_PREFETCHES, num_real_prefetches);
|
||||
num_real_prefetches = 0, num_real_write_prefetches = 0;
|
||||
|
@ -4438,27 +4432,27 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
num_write_prefetches_before += n;
|
||||
}
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
if (info[i].prefetch_in_loop == 0
|
||||
&& info[i].prefetch_before_loop == 0)
|
||||
continue;
|
||||
fprintf (loop_dump_stream, "Prefetch insn: %d",
|
||||
fprintf (dump_file, "Prefetch insn: %d",
|
||||
INSN_UID (info[i].giv->insn));
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"; in loop: %d; before: %d; %s\n",
|
||||
info[i].prefetch_in_loop,
|
||||
info[i].prefetch_before_loop,
|
||||
info[i].write ? "read/write" : "read only");
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
" density: %d%%; bytes_accessed: %u; total_bytes: %u\n",
|
||||
(int) (info[i].bytes_accessed * 100 / info[i].stride),
|
||||
info[i].bytes_accessed, info[i].total_bytes);
|
||||
fprintf (loop_dump_stream, " index: " HOST_WIDE_INT_PRINT_DEC
|
||||
fprintf (dump_file, " index: " HOST_WIDE_INT_PRINT_DEC
|
||||
"; stride: " HOST_WIDE_INT_PRINT_DEC "; address: ",
|
||||
info[i].index, info[i].stride);
|
||||
print_rtl (loop_dump_stream, info[i].base_address);
|
||||
fprintf (loop_dump_stream, "\n");
|
||||
print_rtl (dump_file, info[i].base_address);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4467,11 +4461,11 @@ emit_prefetch_instructions (struct loop *loop)
|
|||
/* Record that this loop uses prefetch instructions. */
|
||||
LOOP_INFO (loop)->has_prefetch = 1;
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream, "Real prefetches needed within loop: %d (write: %d)\n",
|
||||
fprintf (dump_file, "Real prefetches needed within loop: %d (write: %d)\n",
|
||||
num_real_prefetches, num_real_write_prefetches);
|
||||
fprintf (loop_dump_stream, "Real prefetches needed before loop: %d (write: %d)\n",
|
||||
fprintf (dump_file, "Real prefetches needed before loop: %d (write: %d)\n",
|
||||
num_prefetches_before, num_write_prefetches_before);
|
||||
}
|
||||
}
|
||||
|
@ -4811,8 +4805,8 @@ loop_bivs_find (struct loop *loop)
|
|||
move. So leave it alone. */
|
||||
|| ! bl->incremented)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Biv %d: discarded, %s\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Biv %d: discarded, %s\n",
|
||||
bl->regno,
|
||||
(REG_IV_TYPE (ivs, bl->regno) != BASIC_INDUCT
|
||||
? "not induction variable"
|
||||
|
@ -4826,8 +4820,8 @@ loop_bivs_find (struct loop *loop)
|
|||
{
|
||||
backbl = &bl->next;
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Biv %d: verified\n", bl->regno);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Biv %d: verified\n", bl->regno);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4916,8 +4910,8 @@ loop_bivs_check (struct loop *loop)
|
|||
else
|
||||
src = SET_SRC (bl->init_set);
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Biv %d: initialized at insn %d: initial value ",
|
||||
bl->regno, INSN_UID (bl->init_insn));
|
||||
|
||||
|
@ -4929,16 +4923,16 @@ loop_bivs_check (struct loop *loop)
|
|||
{
|
||||
bl->initial_value = src;
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
print_simple_rtl (loop_dump_stream, src);
|
||||
fputc ('\n', loop_dump_stream);
|
||||
print_simple_rtl (dump_file, src);
|
||||
fputc ('\n', dump_file);
|
||||
}
|
||||
}
|
||||
/* If we can't make it a giv,
|
||||
let biv keep initial value of "itself". */
|
||||
else if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "is complex\n");
|
||||
else if (dump_file)
|
||||
fprintf (dump_file, "is complex\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5152,8 +5146,8 @@ final_biv_value (const struct loop *loop, struct iv_class *bl)
|
|||
no other loop exits, so we can return any value. */
|
||||
if (bl->reversed)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Final biv value for %d, reversed biv.\n", bl->regno);
|
||||
|
||||
return const0_rtx;
|
||||
|
@ -5182,8 +5176,8 @@ final_biv_value (const struct loop *loop, struct iv_class *bl)
|
|||
loop_iv_add_mult_sink (loop, increment, GEN_INT (n_iterations),
|
||||
bl->initial_value, tem);
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Final biv value for %d, calculated.\n", bl->regno);
|
||||
|
||||
return tem;
|
||||
|
@ -5193,8 +5187,8 @@ final_biv_value (const struct loop *loop, struct iv_class *bl)
|
|||
/* Check to see if the biv is dead at all loop exits. */
|
||||
if (reg_dead_after_loop (loop, bl->biv->src_reg))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Final biv value for %d, biv dead after loop exit.\n",
|
||||
bl->regno);
|
||||
|
||||
|
@ -5220,8 +5214,8 @@ loop_biv_eliminable_p (struct loop *loop, struct iv_class *bl,
|
|||
#ifdef HAVE_decrement_and_branch_until_zero
|
||||
if (bl->nonneg)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Cannot eliminate nonneg biv %d.\n", bl->regno);
|
||||
return 0;
|
||||
}
|
||||
|
@ -5242,12 +5236,12 @@ loop_biv_eliminable_p (struct loop *loop, struct iv_class *bl,
|
|||
|| (bl->final_value = final_biv_value (loop, bl)))
|
||||
return maybe_eliminate_biv (loop, bl, 0, threshold, insn_count);
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"Cannot eliminate biv %d.\n",
|
||||
bl->regno);
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"First use: insn %d, last use: insn %d.\n",
|
||||
REGNO_FIRST_UID (bl->regno),
|
||||
REGNO_LAST_UID (bl->regno));
|
||||
|
@ -5537,8 +5531,8 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map)
|
|||
else
|
||||
{
|
||||
end_sequence ();
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"unable to reduce iv in insn %d\n",
|
||||
INSN_UID (v->insn));
|
||||
bl->all_reduced = 0;
|
||||
|
@ -5585,12 +5579,12 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map)
|
|||
gen_load_of_final_value (v->dest_reg,
|
||||
v->final_value));
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream, "giv at %d reduced to ",
|
||||
fprintf (dump_file, "giv at %d reduced to ",
|
||||
INSN_UID (v->insn));
|
||||
print_simple_rtl (loop_dump_stream, v->new_reg);
|
||||
fprintf (loop_dump_stream, "\n");
|
||||
print_simple_rtl (dump_file, v->new_reg);
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5826,8 +5820,8 @@ loop_iterations (struct loop *loop)
|
|||
the last loop insn is a jump to the top of the loop. */
|
||||
if (!JUMP_P (last_loop_insn))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: No final conditional branch found.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5836,8 +5830,8 @@ loop_iterations (struct loop *loop)
|
|||
we cannot (easily) determine the iteration count. */
|
||||
if (LABEL_NUSES (JUMP_LABEL (last_loop_insn)) > 1)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Loop has multiple back edges.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5849,8 +5843,8 @@ loop_iterations (struct loop *loop)
|
|||
comparison = get_condition_for_loop (loop, last_loop_insn);
|
||||
if (comparison == 0)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: No final comparison found.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5864,8 +5858,8 @@ loop_iterations (struct loop *loop)
|
|||
|
||||
if (!REG_P (iteration_var))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Comparison not against register.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5895,8 +5889,8 @@ loop_iterations (struct loop *loop)
|
|||
reg_iv_type entry for it. */
|
||||
if ((unsigned) REGNO (iteration_var) >= ivs->n_regs)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: No reg_iv_type entry for iteration var.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5907,15 +5901,15 @@ loop_iterations (struct loop *loop)
|
|||
else if ((GET_MODE_BITSIZE (GET_MODE (iteration_var))
|
||||
> HOST_BITS_PER_WIDE_INT))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Iteration var rejected because mode too large.\n");
|
||||
return 0;
|
||||
}
|
||||
else if (GET_MODE_CLASS (GET_MODE (iteration_var)) != MODE_INT)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Iteration var not an integer.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5941,8 +5935,8 @@ loop_iterations (struct loop *loop)
|
|||
initial_value = bl->initial_value;
|
||||
if (!bl->biv->always_executed || bl->biv->maybe_multiple)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Basic induction var not set once in each iteration.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5959,8 +5953,8 @@ loop_iterations (struct loop *loop)
|
|||
|
||||
if (!v->always_executed || v->maybe_multiple)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: General induction var not set once in each iteration.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -5989,8 +5983,8 @@ loop_iterations (struct loop *loop)
|
|||
{
|
||||
if (REG_P (biv_inc->add_val))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Basic induction var add_val is REG %d.\n",
|
||||
REGNO (biv_inc->add_val));
|
||||
return 0;
|
||||
|
@ -6004,8 +5998,8 @@ loop_iterations (struct loop *loop)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Giv iterator, initial value bias %ld.\n",
|
||||
(long) offset);
|
||||
|
||||
|
@ -6019,8 +6013,8 @@ loop_iterations (struct loop *loop)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Not basic or general induction var.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -6165,8 +6159,8 @@ loop_iterations (struct loop *loop)
|
|||
|
||||
if (increment == 0)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Increment value can't be calculated.\n");
|
||||
return 0;
|
||||
}
|
||||
|
@ -6181,12 +6175,12 @@ loop_iterations (struct loop *loop)
|
|||
|
||||
if (GET_CODE (increment) != CONST_INT)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Increment value not constant ");
|
||||
print_simple_rtl (loop_dump_stream, increment);
|
||||
fprintf (loop_dump_stream, ".\n");
|
||||
print_simple_rtl (dump_file, increment);
|
||||
fprintf (dump_file, ".\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -6195,23 +6189,23 @@ loop_iterations (struct loop *loop)
|
|||
|
||||
if (GET_CODE (initial_value) != CONST_INT)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Initial value not constant ");
|
||||
print_simple_rtl (loop_dump_stream, initial_value);
|
||||
fprintf (loop_dump_stream, ".\n");
|
||||
print_simple_rtl (dump_file, initial_value);
|
||||
fprintf (dump_file, ".\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (GET_CODE (final_value) != CONST_INT)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream,
|
||||
fprintf (dump_file,
|
||||
"Loop iterations: Final value not constant ");
|
||||
print_simple_rtl (loop_dump_stream, final_value);
|
||||
fprintf (loop_dump_stream, ".\n");
|
||||
print_simple_rtl (dump_file, final_value);
|
||||
fprintf (dump_file, ".\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -6219,8 +6213,8 @@ loop_iterations (struct loop *loop)
|
|||
{
|
||||
rtx inc_once;
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Loop iterations: EQ comparison loop.\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Loop iterations: EQ comparison loop.\n");
|
||||
|
||||
inc_once = gen_int_mode (INTVAL (initial_value) + INTVAL (increment),
|
||||
GET_MODE (iteration_var));
|
||||
|
@ -6304,8 +6298,8 @@ loop_iterations (struct loop *loop)
|
|||
;
|
||||
else
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Loop iterations: Not normal loop.\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Loop iterations: Not normal loop.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -6477,8 +6471,8 @@ strength_reduce (struct loop *loop, int flags)
|
|||
if (v->lifetime * threshold * benefit < insn_count
|
||||
&& ! bl->reversed)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"giv of insn %d not worth while, %d vs %d.\n",
|
||||
INSN_UID (v->insn),
|
||||
v->lifetime * threshold * benefit, insn_count);
|
||||
|
@ -6489,8 +6483,8 @@ strength_reduce (struct loop *loop, int flags)
|
|||
&& (may_trap_or_fault_p (v->add_val)
|
||||
|| may_trap_or_fault_p (v->mult_val)))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"giv of insn %d: not always computable.\n",
|
||||
INSN_UID (v->insn));
|
||||
v->ignore = 1;
|
||||
|
@ -6505,8 +6499,8 @@ strength_reduce (struct loop *loop, int flags)
|
|||
if (tv->mult_val == const1_rtx
|
||||
&& ! product_cheap_p (tv->add_val, v->mult_val))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"giv of insn %d: would need a multiply.\n",
|
||||
INSN_UID (v->insn));
|
||||
v->ignore = 1;
|
||||
|
@ -6589,8 +6583,8 @@ strength_reduce (struct loop *loop, int flags)
|
|||
gen_load_of_final_value (bl->biv->dest_reg,
|
||||
bl->final_value));
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Reg %d: biv eliminated\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Reg %d: biv eliminated\n",
|
||||
bl->regno);
|
||||
}
|
||||
/* See above note wrt final_value. But since we couldn't eliminate
|
||||
|
@ -6611,8 +6605,8 @@ strength_reduce (struct loop *loop, int flags)
|
|||
INSN_CODE (p) = -1;
|
||||
}
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\n");
|
||||
|
||||
loop_ivs_free (loop);
|
||||
if (reg_map)
|
||||
|
@ -6947,8 +6941,8 @@ record_biv (struct loop *loop, struct induction *v, rtx insn, rtx dest_reg,
|
|||
if (mult_val == const1_rtx)
|
||||
bl->incremented = 1;
|
||||
|
||||
if (loop_dump_stream)
|
||||
loop_biv_dump (v, loop_dump_stream, 0);
|
||||
if (dump_file)
|
||||
loop_biv_dump (v, dump_file, 0);
|
||||
}
|
||||
|
||||
/* Fill in the data about one giv.
|
||||
|
@ -7155,8 +7149,8 @@ record_giv (const struct loop *loop, struct induction *v, rtx insn,
|
|||
}
|
||||
}
|
||||
|
||||
if (loop_dump_stream)
|
||||
loop_giv_dump (v, loop_dump_stream, 0);
|
||||
if (dump_file)
|
||||
loop_giv_dump (v, dump_file, 0);
|
||||
}
|
||||
|
||||
/* Try to calculate the final value of the giv, the value it will have at
|
||||
|
@ -7181,8 +7175,8 @@ final_giv_value (const struct loop *loop, struct induction *v)
|
|||
and there are no other loop exits, so we can return any value. */
|
||||
if (bl->reversed)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Final giv value for %d, depends on reversed biv\n",
|
||||
REGNO (v->dest_reg));
|
||||
return const0_rtx;
|
||||
|
@ -7258,8 +7252,8 @@ final_giv_value (const struct loop *loop, struct induction *v)
|
|||
/* Now calculate the giv's final value. */
|
||||
loop_iv_add_mult_sink (loop, tem, v->mult_val, v->add_val, tem);
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Final giv value for %d, calc from biv's value.\n",
|
||||
REGNO (v->dest_reg));
|
||||
|
||||
|
@ -7273,8 +7267,8 @@ final_giv_value (const struct loop *loop, struct induction *v)
|
|||
/* Check to see if the biv is dead at all loop exits. */
|
||||
if (reg_dead_after_loop (loop, v->dest_reg))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Final giv value for %d, giv dead after loop exit.\n",
|
||||
REGNO (v->dest_reg));
|
||||
|
||||
|
@ -7407,8 +7401,8 @@ check_final_value (const struct loop *loop, struct induction *v)
|
|||
v->replaceable = 0;
|
||||
v->not_replaceable = 1;
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Found branch outside giv lifetime.\n");
|
||||
|
||||
break;
|
||||
|
@ -7421,8 +7415,8 @@ check_final_value (const struct loop *loop, struct induction *v)
|
|||
v->final_value = final_value;
|
||||
}
|
||||
|
||||
if (loop_dump_stream && v->replaceable)
|
||||
fprintf (loop_dump_stream, "Insn %d: giv reg %d final_value replaceable\n",
|
||||
if (dump_file && v->replaceable)
|
||||
fprintf (dump_file, "Insn %d: giv reg %d final_value replaceable\n",
|
||||
INSN_UID (v->insn), REGNO (v->dest_reg));
|
||||
}
|
||||
|
||||
|
@ -8935,15 +8929,15 @@ check_ext_dependent_givs (const struct loop *loop, struct iv_class *bl)
|
|||
if (incr != 0
|
||||
&& extension_within_bounds_p (loop, bl, incr, v->ext_dependent))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Verified ext dependent giv at %d of reg %d\n",
|
||||
INSN_UID (v->insn), bl->regno);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Failed ext dependent giv at %d\n",
|
||||
INSN_UID (v->insn));
|
||||
|
||||
|
@ -9069,18 +9063,18 @@ combine_givs (struct loop_regs *regs, struct iv_class *bl)
|
|||
restart:
|
||||
qsort (stats, giv_count, sizeof (*stats), cmp_combine_givs_stats);
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream, "Sorted combine statistics:\n");
|
||||
fprintf (dump_file, "Sorted combine statistics:\n");
|
||||
for (k = 0; k < giv_count; k++)
|
||||
{
|
||||
g1 = giv_array[stats[k].giv_number];
|
||||
if (!g1->combined_with && !g1->same)
|
||||
fprintf (loop_dump_stream, " {%d, %d}",
|
||||
fprintf (dump_file, " {%d, %d}",
|
||||
INSN_UID (giv_array[stats[k].giv_number]->insn),
|
||||
stats[k].total_benefit);
|
||||
}
|
||||
putc ('\n', loop_dump_stream);
|
||||
putc ('\n', dump_file);
|
||||
}
|
||||
|
||||
for (k = 0; k < giv_count; k++)
|
||||
|
@ -9132,8 +9126,8 @@ restart:
|
|||
stats[l].total_benefit -= g2->benefit + extra_benefit;
|
||||
}
|
||||
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"giv at %d combined with giv at %d; new benefit %d + %d, lifetime %d\n",
|
||||
INSN_UID (g2->insn), INSN_UID (g1->insn),
|
||||
g1->benefit, g1_add_benefit, g1->lifetime);
|
||||
|
@ -9694,8 +9688,8 @@ check_dbra_loop (struct loop *loop, int insn_count)
|
|||
rtx tem;
|
||||
|
||||
/* Loop can be reversed. */
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "Can reverse loop\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Can reverse loop\n");
|
||||
|
||||
/* Now check other conditions:
|
||||
|
||||
|
@ -9989,13 +9983,13 @@ check_dbra_loop (struct loop *loop, int insn_count)
|
|||
|
||||
bl->reversed = 1;
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream, "Reversed loop");
|
||||
fprintf (dump_file, "Reversed loop");
|
||||
if (bl->nonneg)
|
||||
fprintf (loop_dump_stream, " and added reg_nonneg\n");
|
||||
fprintf (dump_file, " and added reg_nonneg\n");
|
||||
else
|
||||
fprintf (loop_dump_stream, "\n");
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -10061,8 +10055,8 @@ maybe_eliminate_biv (const struct loop *loop, struct iv_class *bl,
|
|||
&& ! maybe_eliminate_biv_1 (loop, PATTERN (p), p, bl,
|
||||
eliminate_p, where_bb, where_insn))
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Cannot eliminate biv %d: biv used in insn %d.\n",
|
||||
bl->regno, INSN_UID (p));
|
||||
break;
|
||||
|
@ -10077,8 +10071,8 @@ maybe_eliminate_biv (const struct loop *loop, struct iv_class *bl,
|
|||
|
||||
if (p == loop->end)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, "biv %d %s eliminated.\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "biv %d %s eliminated.\n",
|
||||
bl->regno, eliminate_p ? "was" : "can be");
|
||||
return 1;
|
||||
}
|
||||
|
@ -11016,12 +11010,12 @@ load_mems (const struct loop *loop)
|
|||
loop_insn_emit_after (loop, 0, label, set);
|
||||
}
|
||||
|
||||
if (loop_dump_stream)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (loop_dump_stream, "Hoisted regno %d %s from ",
|
||||
fprintf (dump_file, "Hoisted regno %d %s from ",
|
||||
REGNO (reg), (written ? "r/w" : "r/o"));
|
||||
print_rtl (loop_dump_stream, mem);
|
||||
fputc ('\n', loop_dump_stream);
|
||||
print_rtl (dump_file, mem);
|
||||
fputc ('\n', dump_file);
|
||||
}
|
||||
|
||||
/* Attempt a bit of copy propagation. This helps untangle the
|
||||
|
@ -11142,8 +11136,8 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno)
|
|||
gcc_assert (init_insn);
|
||||
if (apply_change_group ())
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, " Replaced reg %d", regno);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " Replaced reg %d", regno);
|
||||
if (store_is_first && replaced_last)
|
||||
{
|
||||
rtx first;
|
||||
|
@ -11162,8 +11156,8 @@ try_copy_prop (const struct loop *loop, rtx replacement, unsigned int regno)
|
|||
/* Delete the instructions. */
|
||||
loop_delete_insns (first, init_insn);
|
||||
}
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, ".\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, ".\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11175,8 +11169,8 @@ loop_delete_insns (rtx first, rtx last)
|
|||
{
|
||||
while (1)
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream, ", deleting init_insn (%d)",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, ", deleting init_insn (%d)",
|
||||
INSN_UID (first));
|
||||
delete_insn (first);
|
||||
|
||||
|
@ -11256,8 +11250,8 @@ try_swap_copy_prop (const struct loop *loop, rtx replacement,
|
|||
|
||||
if (apply_change_group ())
|
||||
{
|
||||
if (loop_dump_stream)
|
||||
fprintf (loop_dump_stream,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
" Swapped set of reg %d at %d with reg %d at %d.\n",
|
||||
regno, INSN_UID (insn),
|
||||
new_regno, INSN_UID (prev_insn));
|
||||
|
@ -11793,7 +11787,7 @@ rest_of_handle_loop_optimize (void)
|
|||
cleanup_barriers ();
|
||||
|
||||
/* We only want to perform unrolling once. */
|
||||
loop_optimize (get_insns (), dump_file, 0);
|
||||
loop_optimize (get_insns (), 0);
|
||||
|
||||
/* The first call to loop_optimize makes some instructions
|
||||
trivially dead. We delete those instructions now in the
|
||||
|
@ -11806,7 +11800,7 @@ rest_of_handle_loop_optimize (void)
|
|||
reg_scan (get_insns (), max_reg_num ());
|
||||
}
|
||||
cleanup_barriers ();
|
||||
loop_optimize (get_insns (), dump_file, do_prefetch);
|
||||
loop_optimize (get_insns (), do_prefetch);
|
||||
|
||||
/* Loop can create trivially dead instructions. */
|
||||
delete_trivially_dead_insns (get_insns (), max_reg_num ());
|
||||
|
|
|
@ -383,7 +383,7 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
|
|||
necessary mode switches. Return true if we did work. */
|
||||
|
||||
static int
|
||||
optimize_mode_switching (FILE *file)
|
||||
optimize_mode_switching (void)
|
||||
{
|
||||
rtx insn;
|
||||
int e;
|
||||
|
@ -563,7 +563,7 @@ optimize_mode_switching (FILE *file)
|
|||
|
||||
FOR_EACH_BB (bb)
|
||||
sbitmap_not (kill[bb->index], transp[bb->index]);
|
||||
edge_list = pre_edge_lcm (file, n_entities, transp, comp, antic,
|
||||
edge_list = pre_edge_lcm (n_entities, transp, comp, antic,
|
||||
kill, &insert, &delete);
|
||||
|
||||
for (j = n_entities - 1; j >= 0; j--)
|
||||
|
@ -740,7 +740,7 @@ rest_of_handle_mode_switching (void)
|
|||
{
|
||||
#ifdef OPTIMIZE_MODE_SWITCHING
|
||||
no_new_pseudos = 0;
|
||||
optimize_mode_switching (NULL);
|
||||
optimize_mode_switching ();
|
||||
no_new_pseudos = 1;
|
||||
#endif /* OPTIMIZE_MODE_SWITCHING */
|
||||
}
|
||||
|
|
|
@ -181,13 +181,9 @@ static bool ps_unschedule_node (partial_schedule_ptr, ddg_node_ptr );
|
|||
|
||||
static int issue_rate;
|
||||
|
||||
/* For printing statistics. */
|
||||
static FILE *stats_file;
|
||||
|
||||
static int sms_order_nodes (ddg_ptr, int, int * result);
|
||||
static void set_node_sched_params (ddg_ptr);
|
||||
static partial_schedule_ptr sms_schedule_by_order (ddg_ptr, int, int,
|
||||
int *, FILE*);
|
||||
static partial_schedule_ptr sms_schedule_by_order (ddg_ptr, int, int, int *);
|
||||
static void permute_partial_schedule (partial_schedule_ptr ps, rtx last);
|
||||
static void generate_prolog_epilog (partial_schedule_ptr ,struct loop * loop, rtx);
|
||||
static void duplicate_insns_of_cycles (partial_schedule_ptr ps,
|
||||
|
@ -374,11 +370,11 @@ set_node_sched_params (ddg_ptr g)
|
|||
}
|
||||
|
||||
static void
|
||||
print_node_sched_params (FILE * dump_file, int num_nodes)
|
||||
print_node_sched_params (FILE * file, int num_nodes)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (! dump_file)
|
||||
if (! file)
|
||||
return;
|
||||
for (i = 0; i < num_nodes; i++)
|
||||
{
|
||||
|
@ -386,14 +382,14 @@ print_node_sched_params (FILE * dump_file, int num_nodes)
|
|||
rtx reg_move = nsp->first_reg_move;
|
||||
int j;
|
||||
|
||||
fprintf (dump_file, "Node %d:\n", i);
|
||||
fprintf (dump_file, " asap = %d:\n", nsp->asap);
|
||||
fprintf (dump_file, " time = %d:\n", nsp->time);
|
||||
fprintf (dump_file, " nreg_moves = %d:\n", nsp->nreg_moves);
|
||||
fprintf (file, "Node %d:\n", i);
|
||||
fprintf (file, " asap = %d:\n", nsp->asap);
|
||||
fprintf (file, " time = %d:\n", nsp->time);
|
||||
fprintf (file, " nreg_moves = %d:\n", nsp->nreg_moves);
|
||||
for (j = 0; j < nsp->nreg_moves; j++)
|
||||
{
|
||||
fprintf (dump_file, " reg_move = ");
|
||||
print_rtl_single (dump_file, reg_move);
|
||||
fprintf (file, " reg_move = ");
|
||||
print_rtl_single (file, reg_move);
|
||||
reg_move = PREV_INSN (reg_move);
|
||||
}
|
||||
}
|
||||
|
@ -824,7 +820,7 @@ loop_single_full_bb_p (struct loop *loop)
|
|||
/* Return true if the loop is in its canonical form and false if not.
|
||||
i.e. SIMPLE_SMS_LOOP_P and have one preheader block, and single exit. */
|
||||
static bool
|
||||
loop_canon_p (struct loop *loop, FILE *dump_file)
|
||||
loop_canon_p (struct loop *loop)
|
||||
{
|
||||
|
||||
if (loop->inner || ! loop->outer)
|
||||
|
@ -841,7 +837,7 @@ loop_canon_p (struct loop *loop, FILE *dump_file)
|
|||
{
|
||||
expanded_location xloc;
|
||||
NOTE_EXPANDED_LOCATION (xloc, line_note);
|
||||
fprintf (stats_file, " %s %d (file, line)\n",
|
||||
fprintf (dump_file, " %s %d (file, line)\n",
|
||||
xloc.file, xloc.line);
|
||||
}
|
||||
}
|
||||
|
@ -859,7 +855,7 @@ loop_canon_p (struct loop *loop, FILE *dump_file)
|
|||
{
|
||||
expanded_location xloc;
|
||||
NOTE_EXPANDED_LOCATION (xloc, line_note);
|
||||
fprintf (stats_file, " %s %d (file, line)\n",
|
||||
fprintf (dump_file, " %s %d (file, line)\n",
|
||||
xloc.file, xloc.line);
|
||||
}
|
||||
}
|
||||
|
@ -897,7 +893,7 @@ canon_loop (struct loop *loop)
|
|||
/* Main entry point, perform SMS scheduling on the loops of the function
|
||||
that consist of single basic blocks. */
|
||||
static void
|
||||
sms_schedule (FILE *dump_file)
|
||||
sms_schedule (void)
|
||||
{
|
||||
static int passes = 0;
|
||||
rtx insn;
|
||||
|
@ -915,13 +911,11 @@ sms_schedule (FILE *dump_file)
|
|||
edge latch_edge;
|
||||
gcov_type trip_count = 0;
|
||||
|
||||
loops = loop_optimizer_init (dump_file, (LOOPS_HAVE_PREHEADERS
|
||||
| LOOPS_HAVE_MARKED_SINGLE_EXITS));
|
||||
loops = loop_optimizer_init (LOOPS_HAVE_PREHEADERS
|
||||
| LOOPS_HAVE_MARKED_SINGLE_EXITS);
|
||||
if (!loops)
|
||||
return; /* There is no loops to schedule. */
|
||||
|
||||
stats_file = dump_file;
|
||||
|
||||
/* Initialize issue_rate. */
|
||||
if (targetm.sched.issue_rate)
|
||||
{
|
||||
|
@ -936,7 +930,7 @@ sms_schedule (FILE *dump_file)
|
|||
|
||||
/* Initialize the scheduler. */
|
||||
current_sched_info = &sms_sched_info;
|
||||
sched_init (NULL);
|
||||
sched_init ();
|
||||
|
||||
/* Init Data Flow analysis, to be used in interloop dep calculation. */
|
||||
df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES | DF_SUBREGS);
|
||||
|
@ -967,7 +961,7 @@ sms_schedule (FILE *dump_file)
|
|||
break;
|
||||
}
|
||||
|
||||
if (! loop_canon_p (loop, dump_file))
|
||||
if (! loop_canon_p (loop))
|
||||
continue;
|
||||
|
||||
if (! loop_single_full_bb_p (loop))
|
||||
|
@ -986,7 +980,7 @@ sms_schedule (FILE *dump_file)
|
|||
if ( latch_edge->count
|
||||
&& (latch_edge->count < loop->single_exit->count * SMS_LOOP_AVERAGE_COUNT_THRESHOLD))
|
||||
{
|
||||
if (stats_file)
|
||||
if (dump_file)
|
||||
{
|
||||
rtx line_note = find_line_note (tail);
|
||||
|
||||
|
@ -994,24 +988,24 @@ sms_schedule (FILE *dump_file)
|
|||
{
|
||||
expanded_location xloc;
|
||||
NOTE_EXPANDED_LOCATION (xloc, line_note);
|
||||
fprintf (stats_file, "SMS bb %s %d (file, line)\n",
|
||||
fprintf (dump_file, "SMS bb %s %d (file, line)\n",
|
||||
xloc.file, xloc.line);
|
||||
}
|
||||
fprintf (stats_file, "SMS single-bb-loop\n");
|
||||
fprintf (dump_file, "SMS single-bb-loop\n");
|
||||
if (profile_info && flag_branch_probabilities)
|
||||
{
|
||||
fprintf (stats_file, "SMS loop-count ");
|
||||
fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
fprintf (dump_file, "SMS loop-count ");
|
||||
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
(HOST_WIDEST_INT) bb->count);
|
||||
fprintf (stats_file, "\n");
|
||||
fprintf (stats_file, "SMS trip-count ");
|
||||
fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
fprintf (dump_file, "\n");
|
||||
fprintf (dump_file, "SMS trip-count ");
|
||||
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
(HOST_WIDEST_INT) trip_count);
|
||||
fprintf (stats_file, "\n");
|
||||
fprintf (stats_file, "SMS profile-sum-max ");
|
||||
fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
fprintf (dump_file, "\n");
|
||||
fprintf (dump_file, "SMS profile-sum-max ");
|
||||
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
(HOST_WIDEST_INT) profile_info->sum_max);
|
||||
fprintf (stats_file, "\n");
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
}
|
||||
continue;
|
||||
|
@ -1031,15 +1025,15 @@ sms_schedule (FILE *dump_file)
|
|||
|
||||
if (insn != NEXT_INSN (tail))
|
||||
{
|
||||
if (stats_file)
|
||||
if (dump_file)
|
||||
{
|
||||
if (CALL_P (insn))
|
||||
fprintf (stats_file, "SMS loop-with-call\n");
|
||||
fprintf (dump_file, "SMS loop-with-call\n");
|
||||
else if (BARRIER_P (insn))
|
||||
fprintf (stats_file, "SMS loop-with-barrier\n");
|
||||
fprintf (dump_file, "SMS loop-with-barrier\n");
|
||||
else
|
||||
fprintf (stats_file, "SMS loop-with-not-single-set\n");
|
||||
print_rtl_single (stats_file, insn);
|
||||
fprintf (dump_file, "SMS loop-with-not-single-set\n");
|
||||
print_rtl_single (dump_file, insn);
|
||||
}
|
||||
|
||||
continue;
|
||||
|
@ -1047,8 +1041,8 @@ sms_schedule (FILE *dump_file)
|
|||
|
||||
if (! (g = create_ddg (bb, df, 0)))
|
||||
{
|
||||
if (stats_file)
|
||||
fprintf (stats_file, "SMS doloop\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "SMS doloop\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1078,7 @@ sms_schedule (FILE *dump_file)
|
|||
if (loop->single_exit->count)
|
||||
trip_count = latch_edge->count / loop->single_exit->count;
|
||||
|
||||
if (stats_file)
|
||||
if (dump_file)
|
||||
{
|
||||
rtx line_note = find_line_note (tail);
|
||||
|
||||
|
@ -1092,25 +1086,25 @@ sms_schedule (FILE *dump_file)
|
|||
{
|
||||
expanded_location xloc;
|
||||
NOTE_EXPANDED_LOCATION (xloc, line_note);
|
||||
fprintf (stats_file, "SMS bb %s %d (file, line)\n",
|
||||
fprintf (dump_file, "SMS bb %s %d (file, line)\n",
|
||||
xloc.file, xloc.line);
|
||||
}
|
||||
fprintf (stats_file, "SMS single-bb-loop\n");
|
||||
fprintf (dump_file, "SMS single-bb-loop\n");
|
||||
if (profile_info && flag_branch_probabilities)
|
||||
{
|
||||
fprintf (stats_file, "SMS loop-count ");
|
||||
fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
fprintf (dump_file, "SMS loop-count ");
|
||||
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
(HOST_WIDEST_INT) bb->count);
|
||||
fprintf (stats_file, "\n");
|
||||
fprintf (stats_file, "SMS profile-sum-max ");
|
||||
fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
fprintf (dump_file, "\n");
|
||||
fprintf (dump_file, "SMS profile-sum-max ");
|
||||
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
(HOST_WIDEST_INT) profile_info->sum_max);
|
||||
fprintf (stats_file, "\n");
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
fprintf (stats_file, "SMS doloop\n");
|
||||
fprintf (stats_file, "SMS built-ddg %d\n", g->num_nodes);
|
||||
fprintf (stats_file, "SMS num-loads %d\n", g->num_loads);
|
||||
fprintf (stats_file, "SMS num-stores %d\n", g->num_stores);
|
||||
fprintf (dump_file, "SMS doloop\n");
|
||||
fprintf (dump_file, "SMS built-ddg %d\n", g->num_nodes);
|
||||
fprintf (dump_file, "SMS num-loads %d\n", g->num_loads);
|
||||
fprintf (dump_file, "SMS num-stores %d\n", g->num_stores);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1127,12 +1121,12 @@ sms_schedule (FILE *dump_file)
|
|||
}
|
||||
gcc_assert (count_reg);
|
||||
|
||||
if (stats_file && count_init)
|
||||
if (dump_file && count_init)
|
||||
{
|
||||
fprintf (stats_file, "SMS const-doloop ");
|
||||
fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
fprintf (dump_file, "SMS const-doloop ");
|
||||
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
|
||||
loop_count);
|
||||
fprintf (stats_file, "\n");
|
||||
fprintf (dump_file, "\n");
|
||||
}
|
||||
|
||||
node_order = XNEWVEC (int, g->num_nodes);
|
||||
|
@ -1142,15 +1136,15 @@ sms_schedule (FILE *dump_file)
|
|||
mii = MAX (res_MII (g), rec_mii);
|
||||
maxii = (calculate_maxii (g) * SMS_MAX_II_FACTOR) / 100;
|
||||
|
||||
if (stats_file)
|
||||
fprintf (stats_file, "SMS iis %d %d %d (rec_mii, mii, maxii)\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "SMS iis %d %d %d (rec_mii, mii, maxii)\n",
|
||||
rec_mii, mii, maxii);
|
||||
|
||||
/* After sms_order_nodes and before sms_schedule_by_order, to copy over
|
||||
ASAP. */
|
||||
set_node_sched_params (g);
|
||||
|
||||
ps = sms_schedule_by_order (g, mii, maxii, node_order, dump_file);
|
||||
ps = sms_schedule_by_order (g, mii, maxii, node_order);
|
||||
|
||||
if (ps)
|
||||
stage_count = PS_STAGE_COUNT (ps);
|
||||
|
@ -1178,13 +1172,13 @@ sms_schedule (FILE *dump_file)
|
|||
int new_cycles;
|
||||
struct undo_replace_buff_elem *reg_move_replaces;
|
||||
|
||||
if (stats_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (stats_file,
|
||||
fprintf (dump_file,
|
||||
"SMS succeeded %d %d (with ii, sc)\n", ps->ii,
|
||||
stage_count);
|
||||
print_partial_schedule (ps, stats_file);
|
||||
fprintf (stats_file,
|
||||
print_partial_schedule (ps, dump_file);
|
||||
fprintf (dump_file,
|
||||
"SMS Branch (%d) will later be scheduled at cycle %d.\n",
|
||||
g->closing_branch->cuid, PS_MIN_CYCLE (ps) - 1);
|
||||
}
|
||||
|
@ -1267,7 +1261,7 @@ sms_schedule (FILE *dump_file)
|
|||
|
||||
/* Release scheduler data, needed until now because of DFA. */
|
||||
sched_finish ();
|
||||
loop_optimizer_finalize (loops, dump_file);
|
||||
loop_optimizer_finalize (loops);
|
||||
}
|
||||
|
||||
/* The SMS scheduling algorithm itself
|
||||
|
@ -1481,7 +1475,7 @@ get_sched_window (partial_schedule_ptr ps, int *nodes_order, int i,
|
|||
/* This function implements the scheduling algorithm for SMS according to the
|
||||
above algorithm. */
|
||||
static partial_schedule_ptr
|
||||
sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order, FILE *dump_file)
|
||||
sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order)
|
||||
{
|
||||
int ii = mii;
|
||||
int i, c, success;
|
||||
|
@ -2510,7 +2504,7 @@ rest_of_handle_sms (void)
|
|||
no_new_pseudos = 0;
|
||||
/* Collect loop information to be used in SMS. */
|
||||
cfg_layout_initialize (CLEANUP_UPDATE_LIFE);
|
||||
sms_schedule (dump_file);
|
||||
sms_schedule ();
|
||||
|
||||
/* Update the life information, because we add pseudos. */
|
||||
max_regno = max_reg_num ();
|
||||
|
|
|
@ -478,7 +478,7 @@ combine_predictions_for_insn (rtx insn, basic_block bb)
|
|||
Remove now useless prediction entries. */
|
||||
|
||||
static void
|
||||
combine_predictions_for_bb (FILE *file, basic_block bb)
|
||||
combine_predictions_for_bb (basic_block bb)
|
||||
{
|
||||
int best_probability = PROB_EVEN;
|
||||
int best_predictor = END_PREDICTORS;
|
||||
|
@ -512,14 +512,14 @@ combine_predictions_for_bb (FILE *file, basic_block bb)
|
|||
if (!bb->count)
|
||||
set_even_probabilities (bb);
|
||||
bb->predictions = NULL;
|
||||
if (file)
|
||||
fprintf (file, "%i edges in bb %i predicted to even probabilities\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "%i edges in bb %i predicted to even probabilities\n",
|
||||
nedges, bb->index);
|
||||
return;
|
||||
}
|
||||
|
||||
if (file)
|
||||
fprintf (file, "Predictions for bb %i\n", bb->index);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Predictions for bb %i\n", bb->index);
|
||||
|
||||
/* We implement "first match" heuristics and use probability guessed
|
||||
by predictor with smallest index. */
|
||||
|
@ -556,18 +556,18 @@ combine_predictions_for_bb (FILE *file, basic_block bb)
|
|||
first_match = true;
|
||||
|
||||
if (!found)
|
||||
dump_prediction (file, PRED_NO_PREDICTION, combined_probability, bb, true);
|
||||
dump_prediction (dump_file, PRED_NO_PREDICTION, combined_probability, bb, true);
|
||||
else
|
||||
{
|
||||
dump_prediction (file, PRED_DS_THEORY, combined_probability, bb,
|
||||
dump_prediction (dump_file, PRED_DS_THEORY, combined_probability, bb,
|
||||
!first_match);
|
||||
dump_prediction (file, PRED_FIRST_MATCH, best_probability, bb,
|
||||
dump_prediction (dump_file, PRED_FIRST_MATCH, best_probability, bb,
|
||||
first_match);
|
||||
}
|
||||
|
||||
if (first_match)
|
||||
combined_probability = best_probability;
|
||||
dump_prediction (file, PRED_COMBINED, combined_probability, bb, true);
|
||||
dump_prediction (dump_file, PRED_COMBINED, combined_probability, bb, true);
|
||||
|
||||
for (pred = bb->predictions; pred; pred = pred->ep_next)
|
||||
{
|
||||
|
@ -576,7 +576,7 @@ combine_predictions_for_bb (FILE *file, basic_block bb)
|
|||
|
||||
if (pred->ep_edge != EDGE_SUCC (bb, 0))
|
||||
probability = REG_BR_PROB_BASE - probability;
|
||||
dump_prediction (file, predictor, probability, bb,
|
||||
dump_prediction (dump_file, predictor, probability, bb,
|
||||
!first_match || best_predictor == predictor);
|
||||
}
|
||||
bb->predictions = NULL;
|
||||
|
@ -1385,7 +1385,7 @@ tree_estimate_probability (void)
|
|||
tree_predict_by_opcode (bb);
|
||||
}
|
||||
FOR_EACH_BB (bb)
|
||||
combine_predictions_for_bb (dump_file, bb);
|
||||
combine_predictions_for_bb (bb);
|
||||
|
||||
if (!flag_loop_optimize)
|
||||
strip_builtin_expect ();
|
||||
|
|
|
@ -72,12 +72,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
/* Hooks for profiling. */
|
||||
static struct profile_hooks* profile_hooks;
|
||||
|
||||
/* File for profiling debug output. */
|
||||
static inline FILE*
|
||||
profile_dump_file (void) {
|
||||
return profile_hooks->profile_dump_file ();
|
||||
}
|
||||
|
||||
/* Additional information about the edges we need. */
|
||||
struct edge_info {
|
||||
unsigned int count_valid : 1;
|
||||
|
@ -1155,8 +1149,8 @@ branch_prob (void)
|
|||
/* Re-merge split basic blocks and the mess introduced by
|
||||
insert_insn_on_edge. */
|
||||
cleanup_cfg (profile_arc_flag ? CLEANUP_EXPENSIVE : 0);
|
||||
if (profile_dump_file())
|
||||
dump_flow_info (profile_dump_file());
|
||||
if (dump_file)
|
||||
dump_flow_info (dump_file);
|
||||
}
|
||||
|
||||
free_edge_list (el);
|
||||
|
|
|
@ -3023,7 +3023,7 @@ peep2_find_free_register (int from, int to, const char *class_str,
|
|||
/* Perform the peephole2 optimization pass. */
|
||||
|
||||
static void
|
||||
peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
|
||||
peephole2_optimize (void)
|
||||
{
|
||||
rtx insn, prev;
|
||||
regset live;
|
||||
|
@ -3446,7 +3446,7 @@ static void
|
|||
rest_of_handle_peephole2 (void)
|
||||
{
|
||||
#ifdef HAVE_peephole2
|
||||
peephole2_optimize (dump_file);
|
||||
peephole2_optimize ();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -2624,7 +2624,7 @@ propagate_stack (edge e)
|
|||
should have been defined by now. */
|
||||
|
||||
static bool
|
||||
compensate_edge (edge e, FILE *file)
|
||||
compensate_edge (edge e)
|
||||
{
|
||||
basic_block source = e->src, target = e->dest;
|
||||
stack target_stack = &BLOCK_INFO (target)->stack_in;
|
||||
|
@ -2632,8 +2632,8 @@ compensate_edge (edge e, FILE *file)
|
|||
struct stack_def regstack;
|
||||
int reg;
|
||||
|
||||
if (file)
|
||||
fprintf (file, "Edge %d->%d: ", source->index, target->index);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Edge %d->%d: ", source->index, target->index);
|
||||
|
||||
gcc_assert (target_stack->top != -2);
|
||||
|
||||
|
@ -2646,16 +2646,16 @@ compensate_edge (edge e, FILE *file)
|
|||
|
||||
if (reg == -1)
|
||||
{
|
||||
if (file)
|
||||
fprintf (file, "no changes needed\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "no changes needed\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "correcting stack to ");
|
||||
print_stack (file, target_stack);
|
||||
fprintf (dump_file, "correcting stack to ");
|
||||
print_stack (dump_file, target_stack);
|
||||
}
|
||||
|
||||
/* Abnormal calls may appear to have values live in st(0), but the
|
||||
|
@ -2724,7 +2724,7 @@ compensate_edge (edge e, FILE *file)
|
|||
source block to the stack_in of the destination block. */
|
||||
|
||||
static bool
|
||||
compensate_edges (FILE *file)
|
||||
compensate_edges (void)
|
||||
{
|
||||
bool inserted = false;
|
||||
basic_block bb;
|
||||
|
@ -2738,7 +2738,7 @@ compensate_edges (FILE *file)
|
|||
edge_iterator ei;
|
||||
|
||||
FOR_EACH_EDGE (e, ei, bb->succs)
|
||||
inserted |= compensate_edge (e, file);
|
||||
inserted |= compensate_edge (e);
|
||||
}
|
||||
return inserted;
|
||||
}
|
||||
|
@ -2777,7 +2777,7 @@ better_edge (edge e1, edge e2)
|
|||
/* Convert stack register references in one block. */
|
||||
|
||||
static void
|
||||
convert_regs_1 (FILE *file, basic_block block)
|
||||
convert_regs_1 (basic_block block)
|
||||
{
|
||||
struct stack_def regstack;
|
||||
block_info bi = BLOCK_INFO (block);
|
||||
|
@ -2811,10 +2811,10 @@ convert_regs_1 (FILE *file, basic_block block)
|
|||
}
|
||||
}
|
||||
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "\nBasic block %d\nInput stack: ", block->index);
|
||||
print_stack (file, &bi->stack_in);
|
||||
fprintf (dump_file, "\nBasic block %d\nInput stack: ", block->index);
|
||||
print_stack (dump_file, &bi->stack_in);
|
||||
}
|
||||
|
||||
/* Process all insns in this block. Keep track of NEXT so that we
|
||||
|
@ -2839,11 +2839,11 @@ convert_regs_1 (FILE *file, basic_block block)
|
|||
if (stack_regs_mentioned (insn)
|
||||
|| CALL_P (insn))
|
||||
{
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, " insn %d input stack: ",
|
||||
fprintf (dump_file, " insn %d input stack: ",
|
||||
INSN_UID (insn));
|
||||
print_stack (file, ®stack);
|
||||
print_stack (dump_file, ®stack);
|
||||
}
|
||||
control_flow_insn_deleted |= subst_stack_regs (insn, ®stack);
|
||||
starting_stack_p = false;
|
||||
|
@ -2851,14 +2851,14 @@ convert_regs_1 (FILE *file, basic_block block)
|
|||
}
|
||||
while (next);
|
||||
|
||||
if (file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (file, "Expected live registers [");
|
||||
fprintf (dump_file, "Expected live registers [");
|
||||
for (reg = FIRST_STACK_REG; reg <= LAST_STACK_REG; ++reg)
|
||||
if (TEST_HARD_REG_BIT (bi->out_reg_set, reg))
|
||||
fprintf (file, " %d", reg);
|
||||
fprintf (file, " ]\nOutput stack: ");
|
||||
print_stack (file, ®stack);
|
||||
fprintf (dump_file, " %d", reg);
|
||||
fprintf (dump_file, " ]\nOutput stack: ");
|
||||
print_stack (dump_file, ®stack);
|
||||
}
|
||||
|
||||
insn = BB_END (block);
|
||||
|
@ -2876,8 +2876,8 @@ convert_regs_1 (FILE *file, basic_block block)
|
|||
{
|
||||
rtx set;
|
||||
|
||||
if (file)
|
||||
fprintf (file, "Emitting insn initializing reg %d\n", reg);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Emitting insn initializing reg %d\n", reg);
|
||||
|
||||
set = gen_rtx_SET (VOIDmode, FP_MODE_REG (reg, SFmode), not_a_num);
|
||||
insn = emit_insn_after (set, insn);
|
||||
|
@ -2918,7 +2918,7 @@ convert_regs_1 (FILE *file, basic_block block)
|
|||
/* Convert registers in all blocks reachable from BLOCK. */
|
||||
|
||||
static void
|
||||
convert_regs_2 (FILE *file, basic_block block)
|
||||
convert_regs_2 (basic_block block)
|
||||
{
|
||||
basic_block *stack, *sp;
|
||||
|
||||
|
@ -2959,7 +2959,7 @@ convert_regs_2 (FILE *file, basic_block block)
|
|||
*sp++ = e->dest;
|
||||
}
|
||||
|
||||
convert_regs_1 (file, block);
|
||||
convert_regs_1 (block);
|
||||
}
|
||||
while (sp != stack);
|
||||
|
||||
|
@ -2971,7 +2971,7 @@ convert_regs_2 (FILE *file, basic_block block)
|
|||
to the stack-like registers the 387 uses. */
|
||||
|
||||
static void
|
||||
convert_regs (FILE *file)
|
||||
convert_regs (void)
|
||||
{
|
||||
int inserted;
|
||||
basic_block b;
|
||||
|
@ -2991,7 +2991,7 @@ convert_regs (FILE *file)
|
|||
|
||||
/* Process all blocks reachable from all entry points. */
|
||||
FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
|
||||
convert_regs_2 (file, e->dest);
|
||||
convert_regs_2 (e->dest);
|
||||
|
||||
/* ??? Process all unreachable blocks. Though there's no excuse
|
||||
for keeping these even when not optimizing. */
|
||||
|
@ -3000,10 +3000,10 @@ convert_regs (FILE *file)
|
|||
block_info bi = BLOCK_INFO (b);
|
||||
|
||||
if (! bi->done)
|
||||
convert_regs_2 (file, b);
|
||||
convert_regs_2 (b);
|
||||
}
|
||||
|
||||
inserted |= compensate_edges (file);
|
||||
inserted |= compensate_edges ();
|
||||
|
||||
clear_aux_for_blocks ();
|
||||
|
||||
|
@ -3011,8 +3011,8 @@ convert_regs (FILE *file)
|
|||
if (inserted)
|
||||
commit_edge_insertions ();
|
||||
|
||||
if (file)
|
||||
fputc ('\n', file);
|
||||
if (dump_file)
|
||||
fputc ('\n', dump_file);
|
||||
}
|
||||
|
||||
/* Convert register usage from "flat" register file usage to a "stack
|
||||
|
@ -3024,7 +3024,7 @@ convert_regs (FILE *file)
|
|||
the edges. */
|
||||
|
||||
static bool
|
||||
reg_to_stack (FILE *file)
|
||||
reg_to_stack (void)
|
||||
{
|
||||
basic_block bb;
|
||||
int i;
|
||||
|
@ -3050,7 +3050,7 @@ reg_to_stack (FILE *file)
|
|||
&& flag_schedule_insns_after_reload))
|
||||
{
|
||||
count_or_remove_death_notes (NULL, 1);
|
||||
life_analysis (file, PROP_DEATH_NOTES);
|
||||
life_analysis (PROP_DEATH_NOTES);
|
||||
}
|
||||
mark_dfs_back_edges ();
|
||||
|
||||
|
@ -3117,7 +3117,7 @@ reg_to_stack (FILE *file)
|
|||
VARRAY_CHAR_INIT (stack_regs_mentioned_data, max_uid + 1,
|
||||
"stack_regs_mentioned cache");
|
||||
|
||||
convert_regs (file);
|
||||
convert_regs ();
|
||||
|
||||
free_aux_for_blocks ();
|
||||
return true;
|
||||
|
@ -3140,7 +3140,7 @@ static void
|
|||
rest_of_handle_stack_regs (void)
|
||||
{
|
||||
#ifdef STACK_REGS
|
||||
if (reg_to_stack (dump_file) && optimize)
|
||||
if (reg_to_stack () && optimize)
|
||||
{
|
||||
if (cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
|
||||
| (flag_crossjumping ? CLEANUP_CROSSJUMP : 0))
|
||||
|
|
|
@ -1182,7 +1182,7 @@ init_reg_autoinc (void)
|
|||
This pass comes just before local register allocation. */
|
||||
|
||||
void
|
||||
regclass (rtx f, int nregs, FILE *dump)
|
||||
regclass (rtx f, int nregs)
|
||||
{
|
||||
rtx insn;
|
||||
int i;
|
||||
|
@ -1207,8 +1207,8 @@ regclass (rtx f, int nregs, FILE *dump)
|
|||
{
|
||||
basic_block bb;
|
||||
|
||||
if (dump)
|
||||
fprintf (dump, "\n\nPass %i\n\n",pass);
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\n\nPass %i\n\n",pass);
|
||||
/* Zero out our accumulation of the cost of each class for each reg. */
|
||||
|
||||
memset (costs, 0, nregs * sizeof (struct costs));
|
||||
|
@ -1250,10 +1250,10 @@ regclass (rtx f, int nregs, FILE *dump)
|
|||
if (pass == 0)
|
||||
reg_pref = reg_pref_buffer;
|
||||
|
||||
if (dump)
|
||||
if (dump_file)
|
||||
{
|
||||
dump_regclass (dump);
|
||||
fprintf (dump,"\n");
|
||||
dump_regclass (dump_file);
|
||||
fprintf (dump_file,"\n");
|
||||
}
|
||||
for (i = FIRST_PSEUDO_REGISTER; i < nregs; i++)
|
||||
{
|
||||
|
@ -1299,7 +1299,7 @@ regclass (rtx f, int nregs, FILE *dump)
|
|||
should be provided as a register class. Don't do this if we
|
||||
will be doing it again later. */
|
||||
|
||||
if ((pass == 1 || dump) || ! flag_expensive_optimizations)
|
||||
if ((pass == 1 || dump_file) || ! flag_expensive_optimizations)
|
||||
for (class = 0; class < N_REG_CLASSES; class++)
|
||||
if (p->cost[class] < p->mem_cost
|
||||
&& (reg_class_size[(int) reg_class_subunion[(int) alt][class]]
|
||||
|
@ -1318,17 +1318,17 @@ regclass (rtx f, int nregs, FILE *dump)
|
|||
if (alt == best)
|
||||
alt = NO_REGS;
|
||||
|
||||
if (dump
|
||||
if (dump_file
|
||||
&& (reg_pref[i].prefclass != (int) best
|
||||
|| reg_pref[i].altclass != (int) alt))
|
||||
{
|
||||
fprintf (dump, " Register %i", i);
|
||||
fprintf (dump_file, " Register %i", i);
|
||||
if (alt == ALL_REGS || best == ALL_REGS)
|
||||
fprintf (dump, " pref %s\n", reg_class_names[(int) best]);
|
||||
fprintf (dump_file, " pref %s\n", reg_class_names[(int) best]);
|
||||
else if (alt == NO_REGS)
|
||||
fprintf (dump, " pref %s or none\n", reg_class_names[(int) best]);
|
||||
fprintf (dump_file, " pref %s or none\n", reg_class_names[(int) best]);
|
||||
else
|
||||
fprintf (dump, " pref %s, else %s\n",
|
||||
fprintf (dump_file, " pref %s, else %s\n",
|
||||
reg_class_names[(int) best],
|
||||
reg_class_names[(int) alt]);
|
||||
}
|
||||
|
|
|
@ -76,12 +76,12 @@ static void flags_set_1 (rtx, rtx, void *);
|
|||
static int try_auto_increment (rtx, rtx, rtx, rtx, HOST_WIDE_INT, int);
|
||||
static int find_matches (rtx, struct match *);
|
||||
static void replace_in_call_usage (rtx *, unsigned int, rtx, rtx);
|
||||
static int fixup_match_1 (rtx, rtx, rtx, rtx, rtx, int, int, int, FILE *);
|
||||
static int fixup_match_1 (rtx, rtx, rtx, rtx, rtx, int, int, int);
|
||||
static int reg_is_remote_constant_p (rtx, rtx, rtx);
|
||||
static int stable_and_no_regs_but_for_p (rtx, rtx, rtx);
|
||||
static int regclass_compatible_p (int, int);
|
||||
static int replacement_quality (rtx);
|
||||
static int fixup_match_2 (rtx, rtx, rtx, rtx, FILE *);
|
||||
static int fixup_match_2 (rtx, rtx, rtx, rtx);
|
||||
|
||||
/* Return nonzero if registers with CLASS1 and CLASS2 can be merged without
|
||||
causing too much register allocation problems. */
|
||||
|
@ -916,7 +916,7 @@ reg_is_remote_constant_p (rtx reg, rtx insn, rtx first)
|
|||
hard register as ultimate source, like the frame pointer. */
|
||||
|
||||
static int
|
||||
fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset, FILE *regmove_dump_file)
|
||||
fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
|
||||
{
|
||||
rtx p, dst_death = 0;
|
||||
int length, num_calls = 0;
|
||||
|
@ -965,8 +965,8 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset, FILE *regmove_dump_file)
|
|||
REG_N_CALLS_CROSSED (REGNO (dst)) += num_calls;
|
||||
}
|
||||
|
||||
if (regmove_dump_file)
|
||||
fprintf (regmove_dump_file,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Fixed operand of insn %d.\n",
|
||||
INSN_UID (insn));
|
||||
|
||||
|
@ -1038,7 +1038,7 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset, FILE *regmove_dump_file)
|
|||
(or 0 if none should be output). */
|
||||
|
||||
static void
|
||||
regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
|
||||
regmove_optimize (rtx f, int nregs)
|
||||
{
|
||||
int old_max_uid = get_max_uid ();
|
||||
rtx insn;
|
||||
|
@ -1072,8 +1072,8 @@ regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
|
|||
if (! flag_regmove && pass >= flag_expensive_optimizations)
|
||||
goto done;
|
||||
|
||||
if (regmove_dump_file)
|
||||
fprintf (regmove_dump_file, "Starting %s pass...\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Starting %s pass...\n",
|
||||
pass ? "backward" : "forward");
|
||||
|
||||
for (insn = pass ? get_last_insn () : f; insn;
|
||||
|
@ -1209,8 +1209,7 @@ regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
|
|||
continue;
|
||||
|
||||
if (fixup_match_1 (insn, set, src, src_subreg, dst, pass,
|
||||
op_no, match_no,
|
||||
regmove_dump_file))
|
||||
op_no, match_no))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1218,8 +1217,8 @@ regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
|
|||
|
||||
/* A backward pass. Replace input operands with output operands. */
|
||||
|
||||
if (regmove_dump_file)
|
||||
fprintf (regmove_dump_file, "Starting backward pass...\n");
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "Starting backward pass...\n");
|
||||
|
||||
for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
|
||||
{
|
||||
|
@ -1308,8 +1307,7 @@ regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
|
|||
&& GET_CODE (XEXP (SET_SRC (set), 1)) == CONST_INT
|
||||
&& XEXP (SET_SRC (set), 0) == src
|
||||
&& fixup_match_2 (insn, dst, src,
|
||||
XEXP (SET_SRC (set), 1),
|
||||
regmove_dump_file))
|
||||
XEXP (SET_SRC (set), 1)))
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
@ -1368,8 +1366,8 @@ regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
|
|||
}
|
||||
|
||||
|
||||
if (regmove_dump_file)
|
||||
fprintf (regmove_dump_file,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Could fix operand %d of insn %d matching operand %d.\n",
|
||||
op_no, INSN_UID (insn), match_no);
|
||||
|
||||
|
@ -1472,8 +1470,8 @@ regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
|
|||
REG_LIVE_LENGTH (srcno) = 2;
|
||||
}
|
||||
|
||||
if (regmove_dump_file)
|
||||
fprintf (regmove_dump_file,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Fixed operand %d of insn %d matching operand %d.\n",
|
||||
op_no, INSN_UID (insn), match_no);
|
||||
|
||||
|
@ -1643,8 +1641,7 @@ replace_in_call_usage (rtx *loc, unsigned int dst_reg, rtx src, rtx insn)
|
|||
|
||||
static int
|
||||
fixup_match_1 (rtx insn, rtx set, rtx src, rtx src_subreg, rtx dst,
|
||||
int backward, int operand_number, int match_number,
|
||||
FILE *regmove_dump_file)
|
||||
int backward, int operand_number, int match_number)
|
||||
{
|
||||
rtx p;
|
||||
rtx post_inc = 0, post_inc_set = 0, search_end = 0;
|
||||
|
@ -1679,8 +1676,8 @@ fixup_match_1 (rtx insn, rtx set, rtx src, rtx src_subreg, rtx dst,
|
|||
code = NOTE;
|
||||
}
|
||||
|
||||
if (regmove_dump_file)
|
||||
fprintf (regmove_dump_file,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Could fix operand %d of insn %d matching operand %d.\n",
|
||||
operand_number, INSN_UID (insn), match_number);
|
||||
|
||||
|
@ -2020,8 +2017,8 @@ fixup_match_1 (rtx insn, rtx set, rtx src, rtx src_subreg, rtx dst,
|
|||
if (REG_LIVE_LENGTH (REGNO (dst)) < 2)
|
||||
REG_LIVE_LENGTH (REGNO (dst)) = 2;
|
||||
}
|
||||
if (regmove_dump_file)
|
||||
fprintf (regmove_dump_file,
|
||||
if (dump_file)
|
||||
fprintf (dump_file,
|
||||
"Fixed operand %d of insn %d matching operand %d.\n",
|
||||
operand_number, INSN_UID (insn), match_number);
|
||||
return 1;
|
||||
|
@ -2476,7 +2473,7 @@ gate_handle_regmove (void)
|
|||
static void
|
||||
rest_of_handle_regmove (void)
|
||||
{
|
||||
regmove_optimize (get_insns (), max_reg_num (), dump_file);
|
||||
regmove_optimize (get_insns (), max_reg_num ());
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
|
||||
}
|
||||
|
||||
|
@ -2508,7 +2505,7 @@ gate_handle_stack_adjustments (void)
|
|||
static void
|
||||
rest_of_handle_stack_adjustments (void)
|
||||
{
|
||||
life_analysis (dump_file, PROP_POSTRELOAD);
|
||||
life_analysis (PROP_POSTRELOAD);
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE
|
||||
| (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
|
||||
|
||||
|
|
|
@ -3532,7 +3532,7 @@ make_return_insns (rtx first)
|
|||
/* Try to find insns to place in delay slots. */
|
||||
|
||||
void
|
||||
dbr_schedule (rtx first, FILE *file)
|
||||
dbr_schedule (rtx first)
|
||||
{
|
||||
rtx insn, next, epilogue_insn = 0;
|
||||
int i;
|
||||
|
@ -3779,7 +3779,7 @@ static void
|
|||
rest_of_handle_delay_slots (void)
|
||||
{
|
||||
#ifdef DELAY_SLOTS
|
||||
dbr_schedule (get_insns (), dump_file);
|
||||
dbr_schedule (get_insns ());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1394,9 +1394,8 @@ rtl_seqabstr (void)
|
|||
/* Update notes. */
|
||||
count_or_remove_death_notes (NULL, 1);
|
||||
|
||||
life_analysis (dump_file, PROP_DEATH_NOTES |
|
||||
PROP_SCAN_DEAD_CODE |
|
||||
PROP_KILL_DEAD_CODE);
|
||||
life_analysis (PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE
|
||||
| PROP_KILL_DEAD_CODE);
|
||||
|
||||
/* Extra cleanup. */
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE |
|
||||
|
@ -1418,9 +1417,7 @@ gate_rtl_seqabstr (void)
|
|||
static void
|
||||
rest_of_rtl_seqabstr (void)
|
||||
{
|
||||
life_analysis (dump_file, PROP_DEATH_NOTES |
|
||||
PROP_SCAN_DEAD_CODE |
|
||||
PROP_KILL_DEAD_CODE);
|
||||
life_analysis (PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE);
|
||||
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE |
|
||||
CLEANUP_UPDATE_LIFE |
|
||||
|
|
|
@ -358,11 +358,6 @@ rtl_gen_const_delta_profiler (histogram_value value, unsigned tag, unsigned base
|
|||
safe_insert_insn_on_edge (sequence, e);
|
||||
}
|
||||
|
||||
/* Return the file on which profile dump output goes, if any. */
|
||||
|
||||
static FILE *rtl_profile_dump_file (void) {
|
||||
return dump_file;
|
||||
}
|
||||
|
||||
struct profile_hooks rtl_profile_hooks =
|
||||
{
|
||||
|
@ -371,6 +366,5 @@ struct profile_hooks rtl_profile_hooks =
|
|||
rtl_gen_interval_profiler,
|
||||
rtl_gen_pow2_profiler,
|
||||
rtl_gen_one_value_profiler,
|
||||
rtl_gen_const_delta_profiler,
|
||||
rtl_profile_dump_file
|
||||
rtl_gen_const_delta_profiler
|
||||
};
|
||||
|
|
12
gcc/rtl.h
12
gcc/rtl.h
|
@ -1908,7 +1908,7 @@ extern int rtx_to_tree_code (enum rtx_code);
|
|||
|
||||
/* In cse.c */
|
||||
extern int delete_trivially_dead_insns (rtx, int);
|
||||
extern int cse_main (rtx, int, FILE *);
|
||||
extern int cse_main (rtx, int);
|
||||
extern int exp_equiv_p (rtx, rtx, int, bool);
|
||||
extern unsigned hash_rtx (rtx x, enum machine_mode, int *, int *, bool);
|
||||
|
||||
|
@ -1974,7 +1974,7 @@ extern void add_insn_after (rtx, rtx);
|
|||
extern void remove_insn (rtx);
|
||||
extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
|
||||
extern rtx emit (rtx);
|
||||
extern void renumber_insns (FILE *);
|
||||
extern void renumber_insns (void);
|
||||
extern void remove_unnecessary_notes (void);
|
||||
extern rtx delete_insn (rtx);
|
||||
extern rtx entry_of_function (void);
|
||||
|
@ -2001,10 +2001,10 @@ extern void dump_insn_slim (FILE *f, rtx x);
|
|||
extern void debug_insn_slim (rtx x);
|
||||
|
||||
/* In sched-rgn.c. */
|
||||
extern void schedule_insns (FILE *);
|
||||
extern void schedule_insns (void);
|
||||
|
||||
/* In sched-ebb.c. */
|
||||
extern void schedule_ebbs (FILE *);
|
||||
extern void schedule_ebbs (void);
|
||||
|
||||
/* In haifa-sched.c. */
|
||||
extern void fix_sched_param (const char *, const char *);
|
||||
|
@ -2077,7 +2077,7 @@ extern void init_regs (void);
|
|||
extern void init_fake_stack_mems (void);
|
||||
extern void init_reg_sets (void);
|
||||
extern void regclass_init (void);
|
||||
extern void regclass (rtx, int, FILE *);
|
||||
extern void regclass (rtx, int);
|
||||
extern void reg_scan (rtx, unsigned int);
|
||||
extern void reg_scan_update (rtx, rtx, unsigned int);
|
||||
extern void fix_register (const char *, int, int);
|
||||
|
@ -2091,7 +2091,7 @@ extern bool invalid_mode_change_p (unsigned int, enum reg_class,
|
|||
enum machine_mode);
|
||||
|
||||
/* In reorg.c */
|
||||
extern void dbr_schedule (rtx, FILE *);
|
||||
extern void dbr_schedule (rtx);
|
||||
|
||||
/* In local-alloc.c */
|
||||
extern void dump_local_alloc (FILE *);
|
||||
|
|
|
@ -41,6 +41,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
#include "params.h"
|
||||
#include "sched-int.h"
|
||||
#include "target.h"
|
||||
#include "output.h"
|
||||
|
||||
/* The number of insns to be scheduled in total. */
|
||||
static int target_n_insns;
|
||||
|
@ -551,11 +552,10 @@ schedule_ebb (rtx head, rtx tail)
|
|||
return b;
|
||||
}
|
||||
|
||||
/* The one entry point in this file. DUMP_FILE is the dump file for
|
||||
this pass. */
|
||||
/* The one entry point in this file. */
|
||||
|
||||
void
|
||||
schedule_ebbs (FILE *dump_file)
|
||||
schedule_ebbs (void)
|
||||
{
|
||||
basic_block bb;
|
||||
int probability_cutoff;
|
||||
|
@ -571,7 +571,7 @@ schedule_ebbs (FILE *dump_file)
|
|||
if (n_basic_blocks == NUM_FIXED_BLOCKS)
|
||||
return;
|
||||
|
||||
sched_init (dump_file);
|
||||
sched_init ();
|
||||
|
||||
current_sched_info = &ebb_sched_info;
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ extern int insn_cost (rtx, rtx, rtx);
|
|||
extern int set_priorities (rtx, rtx);
|
||||
|
||||
extern void schedule_block (int, int);
|
||||
extern void sched_init (FILE *);
|
||||
extern void sched_init (void);
|
||||
extern void sched_finish (void);
|
||||
|
||||
extern void ready_add (struct ready_list *, rtx);
|
||||
|
|
|
@ -2511,11 +2511,10 @@ init_regions (void)
|
|||
count_or_remove_death_notes (NULL, 1);
|
||||
}
|
||||
|
||||
/* The one entry point in this file. DUMP_FILE is the dump file for
|
||||
this pass. */
|
||||
/* The one entry point in this file. */
|
||||
|
||||
void
|
||||
schedule_insns (FILE *dump_file)
|
||||
schedule_insns (void)
|
||||
{
|
||||
sbitmap large_region_blocks, blocks;
|
||||
int rgn;
|
||||
|
@ -2529,7 +2528,7 @@ schedule_insns (FILE *dump_file)
|
|||
|
||||
nr_inter = 0;
|
||||
nr_spec = 0;
|
||||
sched_init (dump_file);
|
||||
sched_init ();
|
||||
|
||||
init_regions ();
|
||||
|
||||
|
@ -2656,7 +2655,7 @@ rest_of_handle_sched (void)
|
|||
/* Do control and data sched analysis,
|
||||
and write some of the results to dump file. */
|
||||
|
||||
schedule_insns (dump_file);
|
||||
schedule_insns ();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2682,14 +2681,14 @@ rest_of_handle_sched2 (void)
|
|||
|
||||
if (flag_sched2_use_superblocks || flag_sched2_use_traces)
|
||||
{
|
||||
schedule_ebbs (dump_file);
|
||||
schedule_ebbs ();
|
||||
/* No liveness updating code yet, but it should be easy to do.
|
||||
reg-stack recomputes the liveness when needed for now. */
|
||||
count_or_remove_death_notes (NULL, 1);
|
||||
cleanup_cfg (CLEANUP_EXPENSIVE);
|
||||
}
|
||||
else
|
||||
schedule_insns (dump_file);
|
||||
schedule_insns ();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -207,11 +207,11 @@ build_tree_cfg (tree *tp)
|
|||
/* Write the flowgraph to a VCG file. */
|
||||
{
|
||||
int local_dump_flags;
|
||||
FILE *dump_file = dump_begin (TDI_vcg, &local_dump_flags);
|
||||
if (dump_file)
|
||||
FILE *vcg_file = dump_begin (TDI_vcg, &local_dump_flags);
|
||||
if (vcg_file)
|
||||
{
|
||||
tree_cfg2vcg (dump_file);
|
||||
dump_end (TDI_vcg, dump_file);
|
||||
tree_cfg2vcg (vcg_file);
|
||||
dump_end (TDI_vcg, vcg_file);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2052,11 +2052,10 @@ fini_analyze_edges_for_bb (void)
|
|||
|
||||
|
||||
/* Look at all the incoming edges to block BB, and decide where the best place
|
||||
to insert the stmts on each edge are, and perform those insertions. Output
|
||||
any debug information to DEBUG_FILE. */
|
||||
to insert the stmts on each edge are, and perform those insertions. */
|
||||
|
||||
static void
|
||||
analyze_edges_for_bb (basic_block bb, FILE *debug_file)
|
||||
analyze_edges_for_bb (basic_block bb)
|
||||
{
|
||||
edge e;
|
||||
edge_iterator ei;
|
||||
|
@ -2180,8 +2179,8 @@ analyze_edges_for_bb (basic_block bb, FILE *debug_file)
|
|||
}
|
||||
|
||||
|
||||
if (debug_file)
|
||||
fprintf (debug_file, "\nOpportunities in BB %d for stmt/block reduction:\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, "\nOpportunities in BB %d for stmt/block reduction:\n",
|
||||
bb->index);
|
||||
|
||||
|
||||
|
@ -2207,19 +2206,19 @@ analyze_edges_for_bb (basic_block bb, FILE *debug_file)
|
|||
new_edge = make_forwarder_block (leader->dest, same_stmt_list_p,
|
||||
NULL);
|
||||
bb = new_edge->dest;
|
||||
if (debug_file)
|
||||
if (dump_file)
|
||||
{
|
||||
fprintf (debug_file, "Splitting BB %d for Common stmt list. ",
|
||||
fprintf (dump_file, "Splitting BB %d for Common stmt list. ",
|
||||
leader->dest->index);
|
||||
fprintf (debug_file, "Original block is now BB%d.\n", bb->index);
|
||||
print_generic_stmt (debug_file, curr_stmt_list, TDF_VOPS);
|
||||
fprintf (dump_file, "Original block is now BB%d.\n", bb->index);
|
||||
print_generic_stmt (dump_file, curr_stmt_list, TDF_VOPS);
|
||||
}
|
||||
|
||||
FOR_EACH_EDGE (e, ei, new_edge->src->preds)
|
||||
{
|
||||
e->aux = NULL;
|
||||
if (debug_file)
|
||||
fprintf (debug_file, " Edge (%d->%d) lands here.\n",
|
||||
if (dump_file)
|
||||
fprintf (dump_file, " Edge (%d->%d) lands here.\n",
|
||||
e->src->index, e->dest->index);
|
||||
}
|
||||
|
||||
|
@ -2246,11 +2245,10 @@ analyze_edges_for_bb (basic_block bb, FILE *debug_file)
|
|||
/* This function will analyze the insertions which were performed on edges,
|
||||
and decide whether they should be left on that edge, or whether it is more
|
||||
efficient to emit some subset of them in a single block. All stmts are
|
||||
inserted somewhere, and if non-NULL, debug information is printed via
|
||||
DUMP_FILE. */
|
||||
inserted somewhere. */
|
||||
|
||||
static void
|
||||
perform_edge_inserts (FILE *dump_file)
|
||||
perform_edge_inserts (void)
|
||||
{
|
||||
basic_block bb;
|
||||
|
||||
|
@ -2268,9 +2266,9 @@ perform_edge_inserts (FILE *dump_file)
|
|||
init_analyze_edges_for_bb ();
|
||||
|
||||
FOR_EACH_BB (bb)
|
||||
analyze_edges_for_bb (bb, dump_file);
|
||||
analyze_edges_for_bb (bb);
|
||||
|
||||
analyze_edges_for_bb (EXIT_BLOCK_PTR, dump_file);
|
||||
analyze_edges_for_bb (EXIT_BLOCK_PTR);
|
||||
|
||||
/* Free data structures used in analyze_edges_for_bb. */
|
||||
fini_analyze_edges_for_bb ();
|
||||
|
@ -2311,21 +2309,17 @@ perform_edge_inserts (FILE *dump_file)
|
|||
}
|
||||
|
||||
|
||||
/* Remove the variables specified in MAP from SSA form. Any debug information
|
||||
is sent to DUMP. FLAGS indicate what options should be used. */
|
||||
/* Remove the variables specified in MAP from SSA form. FLAGS indicate what
|
||||
options should be used. */
|
||||
|
||||
static void
|
||||
remove_ssa_form (FILE *dump, var_map map, int flags)
|
||||
remove_ssa_form (var_map map, int flags)
|
||||
{
|
||||
tree_live_info_p liveinfo;
|
||||
basic_block bb;
|
||||
tree phi, next;
|
||||
FILE *save;
|
||||
tree *values = NULL;
|
||||
|
||||
save = dump_file;
|
||||
dump_file = dump;
|
||||
|
||||
/* If we are not combining temps, don't calculate live ranges for variables
|
||||
with only one SSA version. */
|
||||
if ((flags & SSANORM_COMBINE_TEMPS) == 0)
|
||||
|
@ -2396,9 +2390,7 @@ remove_ssa_form (FILE *dump, var_map map, int flags)
|
|||
fini_ssa_operands ();
|
||||
|
||||
/* If any copies were inserted on edges, analyze and insert them now. */
|
||||
perform_edge_inserts (dump_file);
|
||||
|
||||
dump_file = save;
|
||||
perform_edge_inserts ();
|
||||
}
|
||||
|
||||
/* Search every PHI node for arguments associated with backedges which
|
||||
|
@ -2527,7 +2519,7 @@ rewrite_out_of_ssa (void)
|
|||
if (flag_tree_ter && !flag_mudflap)
|
||||
ssa_flags |= SSANORM_PERFORM_TER;
|
||||
|
||||
remove_ssa_form (dump_file, map, ssa_flags);
|
||||
remove_ssa_form (map, ssa_flags);
|
||||
|
||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||
dump_tree_cfg (dump_file, dump_flags & ~TDF_DETAILS);
|
||||
|
|
|
@ -234,12 +234,6 @@ do_tree_profiling (void)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Return the file on which profile dump output goes, if any. */
|
||||
|
||||
static FILE *tree_profile_dump_file (void) {
|
||||
return dump_file;
|
||||
}
|
||||
|
||||
static void
|
||||
tree_profiling (void)
|
||||
{
|
||||
|
@ -306,8 +300,7 @@ struct profile_hooks tree_profile_hooks =
|
|||
tree_gen_interval_profiler, /* gen_interval_profiler */
|
||||
tree_gen_pow2_profiler, /* gen_pow2_profiler */
|
||||
tree_gen_one_value_profiler, /* gen_one_value_profiler */
|
||||
tree_gen_const_delta_profiler,/* gen_const_delta_profiler */
|
||||
tree_profile_dump_file /* profile_dump_file */
|
||||
tree_gen_const_delta_profiler /* gen_const_delta_profiler */
|
||||
};
|
||||
|
||||
#include "gt-tree-profile.h"
|
||||
|
|
|
@ -479,15 +479,15 @@ set_copy_of_val (tree dest, tree first, tree mem_ref)
|
|||
}
|
||||
|
||||
|
||||
/* Dump the copy-of value for variable VAR to DUMP_FILE. */
|
||||
/* Dump the copy-of value for variable VAR to FILE. */
|
||||
|
||||
static void
|
||||
dump_copy_of (FILE *dump_file, tree var)
|
||||
dump_copy_of (FILE *file, tree var)
|
||||
{
|
||||
tree val;
|
||||
sbitmap visited;
|
||||
|
||||
print_generic_expr (dump_file, var, dump_flags);
|
||||
print_generic_expr (file, var, dump_flags);
|
||||
|
||||
if (TREE_CODE (var) != SSA_NAME)
|
||||
return;
|
||||
|
@ -496,17 +496,17 @@ dump_copy_of (FILE *dump_file, tree var)
|
|||
sbitmap_zero (visited);
|
||||
SET_BIT (visited, SSA_NAME_VERSION (var));
|
||||
|
||||
fprintf (dump_file, " copy-of chain: ");
|
||||
fprintf (file, " copy-of chain: ");
|
||||
|
||||
val = var;
|
||||
print_generic_expr (dump_file, val, 0);
|
||||
fprintf (dump_file, " ");
|
||||
print_generic_expr (file, val, 0);
|
||||
fprintf (file, " ");
|
||||
while (copy_of[SSA_NAME_VERSION (val)].value)
|
||||
{
|
||||
fprintf (dump_file, "-> ");
|
||||
fprintf (file, "-> ");
|
||||
val = copy_of[SSA_NAME_VERSION (val)].value;
|
||||
print_generic_expr (dump_file, val, 0);
|
||||
fprintf (dump_file, " ");
|
||||
print_generic_expr (file, val, 0);
|
||||
fprintf (file, " ");
|
||||
if (TEST_BIT (visited, SSA_NAME_VERSION (val)))
|
||||
break;
|
||||
SET_BIT (visited, SSA_NAME_VERSION (val));
|
||||
|
@ -514,11 +514,11 @@ dump_copy_of (FILE *dump_file, tree var)
|
|||
|
||||
val = get_copy_of_val (var)->value;
|
||||
if (val == NULL_TREE)
|
||||
fprintf (dump_file, "[UNDEFINED]");
|
||||
fprintf (file, "[UNDEFINED]");
|
||||
else if (val != var)
|
||||
fprintf (dump_file, "[COPY]");
|
||||
fprintf (file, "[COPY]");
|
||||
else
|
||||
fprintf (dump_file, "[NOT A COPY]");
|
||||
fprintf (file, "[NOT A COPY]");
|
||||
|
||||
sbitmap_free (visited);
|
||||
}
|
||||
|
|
|
@ -132,8 +132,8 @@ copy_loop_headers (void)
|
|||
unsigned n_bbs;
|
||||
unsigned bbs_size;
|
||||
|
||||
loops = loop_optimizer_init (dump_file, (LOOPS_HAVE_PREHEADERS
|
||||
| LOOPS_HAVE_SIMPLE_LATCHES));
|
||||
loops = loop_optimizer_init (LOOPS_HAVE_PREHEADERS
|
||||
| LOOPS_HAVE_SIMPLE_LATCHES);
|
||||
if (!loops)
|
||||
return;
|
||||
|
||||
|
@ -213,7 +213,7 @@ copy_loop_headers (void)
|
|||
free (bbs);
|
||||
free (copied_bbs);
|
||||
|
||||
loop_optimizer_finalize (loops, NULL);
|
||||
loop_optimizer_finalize (loops);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
@ -42,16 +42,15 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
|
||||
struct loops *current_loops = NULL;
|
||||
|
||||
/* Initializes the loop structures. DUMP is the file to that the details
|
||||
about the analysis should be dumped. */
|
||||
/* Initializes the loop structures. */
|
||||
|
||||
static struct loops *
|
||||
tree_loop_optimizer_init (FILE *dump)
|
||||
tree_loop_optimizer_init (void)
|
||||
{
|
||||
struct loops *loops;
|
||||
|
||||
loops = loop_optimizer_init (dump, (LOOPS_NORMAL
|
||||
| LOOPS_HAVE_MARKED_SINGLE_EXITS));
|
||||
loops = loop_optimizer_init (LOOPS_NORMAL
|
||||
| LOOPS_HAVE_MARKED_SINGLE_EXITS);
|
||||
|
||||
if (!loops)
|
||||
return NULL;
|
||||
|
@ -91,7 +90,7 @@ struct tree_opt_pass pass_tree_loop =
|
|||
static void
|
||||
tree_ssa_loop_init (void)
|
||||
{
|
||||
current_loops = tree_loop_optimizer_init (dump_file);
|
||||
current_loops = tree_loop_optimizer_init ();
|
||||
if (!current_loops)
|
||||
return;
|
||||
|
||||
|
@ -448,8 +447,7 @@ tree_ssa_loop_done (void)
|
|||
|
||||
free_numbers_of_iterations_estimates (current_loops);
|
||||
scev_finalize ();
|
||||
loop_optimizer_finalize (current_loops,
|
||||
(dump_flags & TDF_DETAILS ? dump_file : NULL));
|
||||
loop_optimizer_finalize (current_loops);
|
||||
current_loops = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -3614,7 +3614,7 @@ init_pre (bool do_fre)
|
|||
|
||||
vn_init ();
|
||||
if (!do_fre)
|
||||
current_loops = loop_optimizer_init (dump_file, LOOPS_NORMAL);
|
||||
current_loops = loop_optimizer_init (LOOPS_NORMAL);
|
||||
|
||||
connect_infinite_loops_to_exit ();
|
||||
memset (&pre_stats, 0, sizeof (pre_stats));
|
||||
|
@ -3729,7 +3729,7 @@ fini_pre (bool do_fre)
|
|||
}
|
||||
if (!do_fre && current_loops)
|
||||
{
|
||||
loop_optimizer_finalize (current_loops, dump_file);
|
||||
loop_optimizer_finalize (current_loops);
|
||||
current_loops = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -522,7 +522,8 @@ sink_code_in_bb (basic_block bb)
|
|||
static void
|
||||
execute_sink_code (void)
|
||||
{
|
||||
struct loops *loops = loop_optimizer_init (dump_file, LOOPS_NORMAL);
|
||||
struct loops *loops = loop_optimizer_init (LOOPS_NORMAL);
|
||||
|
||||
connect_infinite_loops_to_exit ();
|
||||
memset (&sink_stats, 0, sizeof (sink_stats));
|
||||
calculate_dominance_info (CDI_DOMINATORS | CDI_POST_DOMINATORS);
|
||||
|
@ -531,7 +532,7 @@ execute_sink_code (void)
|
|||
fprintf (dump_file, "Sunk statements:%d\n", sink_stats.sunk);
|
||||
free_dominance_info (CDI_POST_DOMINATORS);
|
||||
remove_fake_exit_edges ();
|
||||
loop_optimizer_finalize (loops, dump_file);
|
||||
loop_optimizer_finalize (loops);
|
||||
}
|
||||
|
||||
/* Gate and execute functions for PRE. */
|
||||
|
|
|
@ -4308,7 +4308,7 @@ execute_vrp (void)
|
|||
{
|
||||
insert_range_assertions ();
|
||||
|
||||
current_loops = loop_optimizer_init (NULL, LOOPS_NORMAL);
|
||||
current_loops = loop_optimizer_init (LOOPS_NORMAL);
|
||||
if (current_loops)
|
||||
scev_initialize (current_loops);
|
||||
|
||||
|
@ -4319,7 +4319,7 @@ execute_vrp (void)
|
|||
if (current_loops)
|
||||
{
|
||||
scev_finalize ();
|
||||
loop_optimizer_finalize (current_loops, NULL);
|
||||
loop_optimizer_finalize (current_loops);
|
||||
current_loops = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@ struct profile_hooks {
|
|||
/* Insert code to find the most common value of a difference between two
|
||||
evaluations of an expression. */
|
||||
void (*gen_const_delta_profiler) (histogram_value, unsigned, unsigned);
|
||||
FILE * (*profile_dump_file) (void);
|
||||
};
|
||||
|
||||
/* In profile.c. */
|
||||
|
|
Loading…
Add table
Reference in a new issue