gcc/gcc/modulo-sched.c

2520 lines
72 KiB
C
Raw Normal View History

/* Swing Modulo Scheduling implementation.
df.h (DF_SCAN, [...]): New macros. 2005-01-11 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN, DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN, DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS, DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO, DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT, DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN, DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO, DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO, DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN, DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG, DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P, DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P, DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET, DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET, DF_REG_USE_GET, DF_REG_USE_SET, DF_REGNO_FIRST_DEF, DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET, DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES, DF_INSN_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS, DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC): New macros. (df_flow_dir, df_ref_type, df_ref_flags, df_alloc_function, df_free_bb_function, df_local_compute_function, df_init_function, df_dataflow_function, df_confluence_function_0, df_confluence_function_n, df_transfer_function, df_finalizer_function, df_free_function, df_dump_problem_function, df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link, df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info, df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info, df_urec_bb_info, ) New types. (df_invalidated_by_call, df_all_hard_regs, df_state) New public variables. (df_init, df_add_problem, df_set_blocks, df_finish, df_analyze, df_analyze_simple_change_some_blocks, df_analyze_simple_change_one_block, df_compact_blocks, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_find_use, df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno, debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref, debug_df_chain, df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem, df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info, df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem, df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem, df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink, df_ref_remove, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_hard_reg_init, df_read_modify_subreg_p) New public functions. * df-core.c: The core dataflow solver and glue routines for rtl dataflow. (df_init, df_add_problem, df_set_blocks, df_finish, df_hybrid_search_forward, df_hybrid_search_backward, df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem, df_analyze, df_get_bb_info, df_set_bb_info, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_reg_defined, df_find_use, df_reg_used, df_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno, debug_df_useno, reset_df_after_reload): New functions. * df-scan.c: The scanning fuctions, once in df.c, completely rewritten so that they now fully model the functionality of register usage at the backend. (df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info, df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump, df_scan_add_problem, df_grow_reg_info, df_grow_ref_info, df_grow_insn_info, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink, df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_ref_create_structure, df_ref_record, df_read_modify_subreg_p, df_def_record_1, df_defs_record, df_uses_record, df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record, df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg, df_record_exit_block_uses, df_hard_reg_init): New functions. * df-problems.c: Seven concrete dataflow problems that use the scanning in df-scan.c and are solved by the engine in df-core.c. (df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen, df_unset_seen, df_ru_get_bb_info, df_ru_set_bb_info, df_ru_free_bb_info, df_ru_alloc, df_ru_bb_local_compute_process_def, df_ru_bb_local_compute_process_use, df_ru_bb_local_compute, df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n, df_ru_transfer_function, df_ru_free, df_ru_dump, df_ru_add_problem, df_rd_get_bb_info, df_rd_set_bb_info, df_rd_free_bb_info, df_rd_alloc, df_rd_bb_local_compute_process_def, df_rd_bb_local_compute, df_rd_local_compute, df_rd_init_solution, df_rd_confluence_n, df_rd_transfer_function, df_rd_free, df_rd_dump, df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info, df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute, df_lr_local_compute, df_lr_init, df_lr_confluence_0, df_lr_confluence_n, df_lr_transfer_function, df_lr_free, df_lr_dump, df_lr_add_problem, df_ur_get_bb_info, df_ur_set_bb_info, df_ur_free_bb_info, df_ur_alloc, df_ur_bb_local_compute, df_ur_local_compute, df_ur_init, df_ur_local_finalize, df_ur_confluence_n, df_ur_transfer_function, df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info, df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc, df_urec_mark_reg_change, df_urec_check_earlyclobber, df_urec_mark_reg_use_for_earlyclobber, df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute, df_urec_local_compute, df_urec_init, df_urec_local_finalize, df_urec_confluence_n, df_urec_transfer_function, df_urec_free, df_urec_dump, df_urec_add_problem, df_chain_alloc, df_chain_create_bb_process_use, df_chain_create_bb, df_chain_finalize, df_chain_free, df_chains_dump, df_chain_add_problem, df_ri_alloc, df_ri_bb_compute, df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem, df_reg_lifetime): New functions. * df.c: Deleted file. * ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code consistent with new df api. * modulo-sched.c (sms_schedule, rest_of_handle_sms, rest_of_handle_sms): Ditto. * web.c (unionfind_union, union_defs, entry_register, web_main): Ditto. * loop_invariant.c (invariant_for_use, hash_invariant_expr_1, invariant_expr_equal_p, find_defs, check_dependencies, find_invariant_insn, find_invariants_to_move, move_invariant_reg, free_inv_motion_data, move_loop_invariants): Ditto. * sched-deps.c (sched_analyze_1): Ditto. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r109577
2006-01-11 13:57:18 +01:00
Copyright (C) 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Ayal Zaks and Mustafa Hagog <zaks,mustafa@il.ibm.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
2005-06-25 04:02:01 +02:00
Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "toplev.h"
#include "rtl.h"
#include "tm_p.h"
#include "hard-reg-set.h"
#include "regs.h"
#include "function.h"
#include "flags.h"
#include "insn-config.h"
#include "insn-attr.h"
#include "except.h"
#include "toplev.h"
#include "recog.h"
#include "sched-int.h"
#include "target.h"
#include "cfglayout.h"
#include "cfgloop.h"
#include "cfghooks.h"
#include "expr.h"
#include "params.h"
#include "gcov-io.h"
#include "df.h"
#include "ddg.h"
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
#include "timevar.h"
#include "tree-pass.h"
#ifdef INSN_SCHEDULING
/* This file contains the implementation of the Swing Modulo Scheduler,
described in the following references:
[1] J. Llosa, A. Gonzalez, E. Ayguade, M. Valero., and J. Eckhardt.
Lifetime--sensitive modulo scheduling in a production environment.
IEEE Trans. on Comps., 50(3), March 2001
[2] J. Llosa, A. Gonzalez, E. Ayguade, and M. Valero.
Swing Modulo Scheduling: A Lifetime Sensitive Approach.
PACT '96 , pages 80-87, October 1996 (Boston - Massachusetts - USA).
The basic structure is:
1. Build a data-dependence graph (DDG) for each loop.
2. Use the DDG to order the insns of a loop (not in topological order
necessarily, but rather) trying to place each insn after all its
predecessors _or_ after all its successors.
3. Compute MII: a lower bound on the number of cycles to schedule the loop.
4. Use the ordering to perform list-scheduling of the loop:
1. Set II = MII. We will try to schedule the loop within II cycles.
2. Try to schedule the insns one by one according to the ordering.
For each insn compute an interval of cycles by considering already-
scheduled preds and succs (and associated latencies); try to place
the insn in the cycles of this window checking for potential
resource conflicts (using the DFA interface).
Note: this is different from the cycle-scheduling of schedule_insns;
here the insns are not scheduled monotonically top-down (nor bottom-
up).
3. If failed in scheduling all insns - bump II++ and try again, unless
II reaches an upper bound MaxII, in which case report failure.
5. If we succeeded in scheduling the loop within II cycles, we now
generate prolog and epilog, decrease the counter of the loop, and
perform modulo variable expansion for live ranges that span more than
II cycles (i.e. use register copies to prevent a def from overwriting
itself before reaching the use).
*/
/* This page defines partial-schedule structures and functions for
modulo scheduling. */
typedef struct partial_schedule *partial_schedule_ptr;
typedef struct ps_insn *ps_insn_ptr;
/* The minimum (absolute) cycle that a node of ps was scheduled in. */
#define PS_MIN_CYCLE(ps) (((partial_schedule_ptr)(ps))->min_cycle)
/* The maximum (absolute) cycle that a node of ps was scheduled in. */
#define PS_MAX_CYCLE(ps) (((partial_schedule_ptr)(ps))->max_cycle)
/* Perform signed modulo, always returning a non-negative value. */
#define SMODULO(x,y) ((x) % (y) < 0 ? ((x) % (y) + (y)) : (x) % (y))
/* The number of different iterations the nodes in ps span, assuming
the stage boundaries are placed efficiently. */
#define PS_STAGE_COUNT(ps) ((PS_MAX_CYCLE (ps) - PS_MIN_CYCLE (ps) \
+ 1 + (ps)->ii - 1) / (ps)->ii)
/* A single instruction in the partial schedule. */
struct ps_insn
{
/* The corresponding DDG_NODE. */
ddg_node_ptr node;
/* The (absolute) cycle in which the PS instruction is scheduled.
Same as SCHED_TIME (node). */
int cycle;
/* The next/prev PS_INSN in the same row. */
ps_insn_ptr next_in_row,
prev_in_row;
/* The number of nodes in the same row that come after this node. */
int row_rest_count;
};
/* Holds the partial schedule as an array of II rows. Each entry of the
array points to a linked list of PS_INSNs, which represents the
instructions that are scheduled for that row. */
struct partial_schedule
{
int ii; /* Number of rows in the partial schedule. */
int history; /* Threshold for conflict checking using DFA. */
/* rows[i] points to linked list of insns scheduled in row i (0<=i<ii). */
ps_insn_ptr *rows;
/* The earliest absolute cycle of an insn in the partial schedule. */
int min_cycle;
/* The latest absolute cycle of an insn in the partial schedule. */
int max_cycle;
ddg_ptr g; /* The DDG of the insns in the partial schedule. */
};
/* We use this to record all the register replacements we do in
the kernel so we can undo SMS if it is not profitable. */
struct undo_replace_buff_elem
{
rtx insn;
rtx orig_reg;
rtx new_reg;
struct undo_replace_buff_elem *next;
};
static partial_schedule_ptr create_partial_schedule (int ii, ddg_ptr, int history);
static void free_partial_schedule (partial_schedule_ptr);
static void reset_partial_schedule (partial_schedule_ptr, int new_ii);
void print_partial_schedule (partial_schedule_ptr, FILE *);
static int kernel_number_of_cycles (rtx first_insn, rtx last_insn);
static ps_insn_ptr ps_add_node_check_conflicts (partial_schedule_ptr,
ddg_node_ptr node, int cycle,
sbitmap must_precede,
sbitmap must_follow);
static void rotate_partial_schedule (partial_schedule_ptr, int);
void set_row_column_for_ps (partial_schedule_ptr);
static bool ps_unschedule_node (partial_schedule_ptr, ddg_node_ptr );
/* This page defines constants and structures for the modulo scheduling
driver. */
/* As in haifa-sched.c: */
/* issue_rate is the number of insns that can be scheduled in the same
machine cycle. It can be defined in the config/mach/mach.h file,
otherwise we set it to 1. */
static int issue_rate;
static int sms_order_nodes (ddg_ptr, int, int * result);
static void set_node_sched_params (ddg_ptr);
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
2006-02-06 19:20:47 +01:00
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,
int from_stage, int to_stage,
int is_prolog);
#define SCHED_ASAP(x) (((node_sched_params_ptr)(x)->aux.info)->asap)
#define SCHED_TIME(x) (((node_sched_params_ptr)(x)->aux.info)->time)
#define SCHED_FIRST_REG_MOVE(x) \
(((node_sched_params_ptr)(x)->aux.info)->first_reg_move)
#define SCHED_NREG_MOVES(x) \
(((node_sched_params_ptr)(x)->aux.info)->nreg_moves)
#define SCHED_ROW(x) (((node_sched_params_ptr)(x)->aux.info)->row)
#define SCHED_STAGE(x) (((node_sched_params_ptr)(x)->aux.info)->stage)
#define SCHED_COLUMN(x) (((node_sched_params_ptr)(x)->aux.info)->column)
/* The scheduling parameters held for each node. */
typedef struct node_sched_params
{
int asap; /* A lower-bound on the absolute scheduling cycle. */
int time; /* The absolute scheduling cycle (time >= asap). */
/* The following field (first_reg_move) is a pointer to the first
register-move instruction added to handle the modulo-variable-expansion
of the register defined by this node. This register-move copies the
original register defined by the node. */
rtx first_reg_move;
/* The number of register-move instructions added, immediately preceding
first_reg_move. */
int nreg_moves;
int row; /* Holds time % ii. */
int stage; /* Holds time / ii. */
/* The column of a node inside the ps. If nodes u, v are on the same row,
u will precede v if column (u) < column (v). */
int column;
} *node_sched_params_ptr;
/* The following three functions are copied from the current scheduler
code in order to use sched_analyze() for computing the dependencies.
They are used when initializing the sched_info structure. */
static const char *
sms_print_insn (rtx insn, int aligned ATTRIBUTE_UNUSED)
{
static char tmp[80];
sprintf (tmp, "i%4d", INSN_UID (insn));
return tmp;
}
static void
compute_jump_reg_dependencies (rtx insn ATTRIBUTE_UNUSED,
regset cond_exec ATTRIBUTE_UNUSED,
regset used ATTRIBUTE_UNUSED,
regset set ATTRIBUTE_UNUSED)
{
}
static struct sched_info sms_sched_info =
{
NULL,
NULL,
NULL,
NULL,
NULL,
sms_print_insn,
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
NULL,
compute_jump_reg_dependencies,
NULL, NULL,
NULL, NULL,
ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> Andrey Belevantsev <abel@ispras.ru> * ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. * lists.c (unused_deps_list): New variable. (free_list): Add assertions to verify the proper distinguishing between INSN_LISTs and DEPS_LISTs. (find_list_elem, remove_list_elem, remove_list_node): New static functions. (alloc_DEPS_LIST, free_DEPS_LIST, free_DEPS_LIST_node, remove_free_INSN_LIST_elem, remove_free_DEPS_LIST_elem, remove_free_INSN_LIST_node, remove_free_DEPS_LIST_node): New functions. (alloc_INSN_LIST): Assert that the list we're working on is indeed an INSN_LIST. (free_INSN_LIST_node): Likewise. * modulo-sched.c (current_sched_info): Initialize flags field. * reg-notes.def: Exchange DEP_ANTI and DEP_OUTPUT. * rtl.def (DEPS_LIST): Define. * rtl.h: Declare new functions from lists.c. * sched-deps.c (spec_dependency_cache): New static variable. (maybe_add_or_update_back_dep_1, add_back_dep): New static functions. (add_dependence): Change return type to void. Move the logic to ... (add_or_update_back_dep_1): ... here. Handle speculative dependencies. (delete_all_dependences): Add comment about forward_dependency_cache. Handle spec_dependency_cache. Handle DEPS_LISTs. (fixup_sched_groups): Clarify the change of priority of output and anti dependencies. (sched_analyze_2): Adjust add_dependence calls to create data speculative dependence. (add_forward_dependence): Renamed to add_forw_dep, change prototype. Adjust all callers. Handle DEPS_LISTS. (compute_forward_dependences): Use add_forw_dep. Sort LOG_LINKs in presence of speculation. (init_dependency_caches, free_dependency_caches): Handle spec_dependency_cache. (adjust_add_sorted_back_dep, adjust_back_add_forw_dep, delete_forw_dep, estimate_dep_weak, get_dep_weak, ds_merge, check_dep_status): New static functions. (add_or_update_back_dep, add_or_update_back_forw_dep, add_back_forw_dep, delete_back_forw_dep): New functions. * sched-int.h (ds_t, dw_t): New typedefs. (struct sched_info): Add new field flags. (struct haifa_insn_data): Add new bitfield has_internal_dep. Prototype new sched-deps.c functions. (HAS_INTERNAL_DEP, DEP_STATUS): New access macros. (BITS_PER_DEP_STATUS, BITS_PER_DEP_WEAK, DEP_WEAK_MASK, MAX_DEP_WEAK, MIN_DEP_WEAK, NO_DEP_WEAK, UNCERTAIN_DEP_WEAK, BEGIN_DATA, BE_IN_DATA, BEGIN_CONTROL, BE_IN_CONTROL, BEGIN_SPEC, DATA_SPEC, CONTROL_SPEC, SPECULATIVE, BE_IN_SPEC, FIRST_SPEC_TYPE, LAST_SPEC_TYPE, SPEC_TYPE_SHIFT, DEP_TRUE, DEP_OUTPUT, DEP_ANTI, DEP_TYPES, HARD_DEP): New constants. (enum SPEC_TYPES_OFFSETS, enum DEPS_ADJUST_RESULT, enum SCHED_FLAGS): New enums. * sched-rgn.c (current_sched_info): Initialize flags field. (schedule_insns): Initialize current_sched_info before the sched_init call. * sched-ebb.c (current_sched_info): Initialize flags field. (add_deps_for_risky_insns): Use control_flow_insn_p instead of JUMP_P. Call add_or_update_back_dep instead of add_dependence. Create control speculative dependencies. (schedule_insns): Initialize current_sched_info before the sched_init call. Co-Authored-By: Andrey Belevantsev <abel@ispras.ru> From-SVN: r112125
2006-03-16 06:17:41 +01:00
0, 0, 0,
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
NULL, NULL, NULL, NULL, NULL,
#ifdef ENABLE_CHECKING
NULL,
#endif
ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> Andrey Belevantsev <abel@ispras.ru> * ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call. * lists.c (unused_deps_list): New variable. (free_list): Add assertions to verify the proper distinguishing between INSN_LISTs and DEPS_LISTs. (find_list_elem, remove_list_elem, remove_list_node): New static functions. (alloc_DEPS_LIST, free_DEPS_LIST, free_DEPS_LIST_node, remove_free_INSN_LIST_elem, remove_free_DEPS_LIST_elem, remove_free_INSN_LIST_node, remove_free_DEPS_LIST_node): New functions. (alloc_INSN_LIST): Assert that the list we're working on is indeed an INSN_LIST. (free_INSN_LIST_node): Likewise. * modulo-sched.c (current_sched_info): Initialize flags field. * reg-notes.def: Exchange DEP_ANTI and DEP_OUTPUT. * rtl.def (DEPS_LIST): Define. * rtl.h: Declare new functions from lists.c. * sched-deps.c (spec_dependency_cache): New static variable. (maybe_add_or_update_back_dep_1, add_back_dep): New static functions. (add_dependence): Change return type to void. Move the logic to ... (add_or_update_back_dep_1): ... here. Handle speculative dependencies. (delete_all_dependences): Add comment about forward_dependency_cache. Handle spec_dependency_cache. Handle DEPS_LISTs. (fixup_sched_groups): Clarify the change of priority of output and anti dependencies. (sched_analyze_2): Adjust add_dependence calls to create data speculative dependence. (add_forward_dependence): Renamed to add_forw_dep, change prototype. Adjust all callers. Handle DEPS_LISTS. (compute_forward_dependences): Use add_forw_dep. Sort LOG_LINKs in presence of speculation. (init_dependency_caches, free_dependency_caches): Handle spec_dependency_cache. (adjust_add_sorted_back_dep, adjust_back_add_forw_dep, delete_forw_dep, estimate_dep_weak, get_dep_weak, ds_merge, check_dep_status): New static functions. (add_or_update_back_dep, add_or_update_back_forw_dep, add_back_forw_dep, delete_back_forw_dep): New functions. * sched-int.h (ds_t, dw_t): New typedefs. (struct sched_info): Add new field flags. (struct haifa_insn_data): Add new bitfield has_internal_dep. Prototype new sched-deps.c functions. (HAS_INTERNAL_DEP, DEP_STATUS): New access macros. (BITS_PER_DEP_STATUS, BITS_PER_DEP_WEAK, DEP_WEAK_MASK, MAX_DEP_WEAK, MIN_DEP_WEAK, NO_DEP_WEAK, UNCERTAIN_DEP_WEAK, BEGIN_DATA, BE_IN_DATA, BEGIN_CONTROL, BE_IN_CONTROL, BEGIN_SPEC, DATA_SPEC, CONTROL_SPEC, SPECULATIVE, BE_IN_SPEC, FIRST_SPEC_TYPE, LAST_SPEC_TYPE, SPEC_TYPE_SHIFT, DEP_TRUE, DEP_OUTPUT, DEP_ANTI, DEP_TYPES, HARD_DEP): New constants. (enum SPEC_TYPES_OFFSETS, enum DEPS_ADJUST_RESULT, enum SCHED_FLAGS): New enums. * sched-rgn.c (current_sched_info): Initialize flags field. (schedule_insns): Initialize current_sched_info before the sched_init call. * sched-ebb.c (current_sched_info): Initialize flags field. (add_deps_for_risky_insns): Use control_flow_insn_p instead of JUMP_P. Call add_or_update_back_dep instead of add_dependence. Create control speculative dependencies. (schedule_insns): Initialize current_sched_info before the sched_init call. Co-Authored-By: Andrey Belevantsev <abel@ispras.ru> From-SVN: r112125
2006-03-16 06:17:41 +01:00
0
};
/* Return the register decremented and tested in INSN,
or zero if it is not a decrement-and-branch insn. */
static rtx
doloop_register_get (rtx insn ATTRIBUTE_UNUSED)
{
#ifdef HAVE_doloop_end
rtx pattern, reg, condition;
if (! JUMP_P (insn))
return NULL_RTX;
pattern = PATTERN (insn);
condition = doloop_condition_get (pattern);
if (! condition)
return NULL_RTX;
if (REG_P (XEXP (condition, 0)))
reg = XEXP (condition, 0);
else if (GET_CODE (XEXP (condition, 0)) == PLUS
&& REG_P (XEXP (XEXP (condition, 0), 0)))
reg = XEXP (XEXP (condition, 0), 0);
else
gcc_unreachable ();
return reg;
#else
return NULL_RTX;
#endif
}
/* Check if COUNT_REG is set to a constant in the PRE_HEADER block, so
that the number of iterations is a compile-time constant. If so,
return the rtx that sets COUNT_REG to a constant, and set COUNT to
this constant. Otherwise return 0. */
static rtx
const_iteration_count (rtx count_reg, basic_block pre_header,
HOST_WIDEST_INT * count)
{
rtx insn;
rtx head, tail;
if (! pre_header)
return NULL_RTX;
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (pre_header, pre_header, &head, &tail);
for (insn = tail; insn != PREV_INSN (head); insn = PREV_INSN (insn))
if (INSN_P (insn) && single_set (insn) &&
rtx_equal_p (count_reg, SET_DEST (single_set (insn))))
{
rtx pat = single_set (insn);
if (GET_CODE (SET_SRC (pat)) == CONST_INT)
{
*count = INTVAL (SET_SRC (pat));
return insn;
}
return NULL_RTX;
}
return NULL_RTX;
}
/* A very simple resource-based lower bound on the initiation interval.
??? Improve the accuracy of this bound by considering the
utilization of various units. */
static int
res_MII (ddg_ptr g)
{
return (g->num_nodes / issue_rate);
}
/* Points to the array that contains the sched data for each node. */
static node_sched_params_ptr node_sched_params;
/* Allocate sched_params for each node and initialize it. Assumes that
the aux field of each node contain the asap bound (computed earlier),
and copies it into the sched_params field. */
static void
set_node_sched_params (ddg_ptr g)
{
int i;
/* Allocate for each node in the DDG a place to hold the "sched_data". */
/* Initialize ASAP/ALAP/HIGHT to zero. */
node_sched_params = (node_sched_params_ptr)
xcalloc (g->num_nodes,
sizeof (struct node_sched_params));
/* Set the pointer of the general data of the node to point to the
appropriate sched_params structure. */
for (i = 0; i < g->num_nodes; i++)
{
/* Watch out for aliasing problems? */
node_sched_params[i].asap = g->nodes[i].aux.count;
g->nodes[i].aux.info = &node_sched_params[i];
}
}
static void
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
2006-02-06 19:20:47 +01:00
print_node_sched_params (FILE * file, int num_nodes)
{
int i;
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
2006-02-06 19:20:47 +01:00
if (! file)
return;
for (i = 0; i < num_nodes; i++)
{
node_sched_params_ptr nsp = &node_sched_params[i];
rtx reg_move = nsp->first_reg_move;
int j;
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
2006-02-06 19:20:47 +01:00
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++)
{
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
2006-02-06 19:20:47 +01:00
fprintf (file, " reg_move = ");
print_rtl_single (file, reg_move);
reg_move = PREV_INSN (reg_move);
}
}
}
/* Calculate an upper bound for II. SMS should not schedule the loop if it
requires more cycles than this bound. Currently set to the sum of the
longest latency edge for each node. Reset based on experiments. */
static int
calculate_maxii (ddg_ptr g)
{
int i;
int maxii = 0;
for (i = 0; i < g->num_nodes; i++)
{
ddg_node_ptr u = &g->nodes[i];
ddg_edge_ptr e;
int max_edge_latency = 0;
for (e = u->out; e; e = e->next_out)
max_edge_latency = MAX (max_edge_latency, e->latency);
maxii += max_edge_latency;
}
return maxii;
}
/*
Breaking intra-loop register anti-dependences:
Each intra-loop register anti-dependence implies a cross-iteration true
dependence of distance 1. Therefore, we can remove such false dependencies
and figure out if the partial schedule broke them by checking if (for a
true-dependence of distance 1): SCHED_TIME (def) < SCHED_TIME (use) and
if so generate a register move. The number of such moves is equal to:
SCHED_TIME (use) - SCHED_TIME (def) { 0 broken
nreg_moves = ----------------------------------- + 1 - { dependence.
ii { 1 if not.
*/
static struct undo_replace_buff_elem *
generate_reg_moves (partial_schedule_ptr ps)
{
ddg_ptr g = ps->g;
int ii = ps->ii;
int i;
struct undo_replace_buff_elem *reg_move_replaces = NULL;
for (i = 0; i < g->num_nodes; i++)
{
ddg_node_ptr u = &g->nodes[i];
ddg_edge_ptr e;
int nreg_moves = 0, i_reg_move;
sbitmap *uses_of_defs;
rtx last_reg_move;
rtx prev_reg, old_reg;
/* Compute the number of reg_moves needed for u, by looking at life
ranges started at u (excluding self-loops). */
for (e = u->out; e; e = e->next_out)
if (e->type == TRUE_DEP && e->dest != e->src)
{
int nreg_moves4e = (SCHED_TIME (e->dest) - SCHED_TIME (e->src)) / ii;
if (e->distance == 1)
nreg_moves4e = (SCHED_TIME (e->dest) - SCHED_TIME (e->src) + ii) / ii;
/* If dest precedes src in the schedule of the kernel, then dest
will read before src writes and we can save one reg_copy. */
if (SCHED_ROW (e->dest) == SCHED_ROW (e->src)
&& SCHED_COLUMN (e->dest) < SCHED_COLUMN (e->src))
nreg_moves4e--;
nreg_moves = MAX (nreg_moves, nreg_moves4e);
}
if (nreg_moves == 0)
continue;
/* Every use of the register defined by node may require a different
copy of this register, depending on the time the use is scheduled.
Set a bitmap vector, telling which nodes use each copy of this
register. */
uses_of_defs = sbitmap_vector_alloc (nreg_moves, g->num_nodes);
sbitmap_vector_zero (uses_of_defs, nreg_moves);
for (e = u->out; e; e = e->next_out)
if (e->type == TRUE_DEP && e->dest != e->src)
{
int dest_copy = (SCHED_TIME (e->dest) - SCHED_TIME (e->src)) / ii;
if (e->distance == 1)
dest_copy = (SCHED_TIME (e->dest) - SCHED_TIME (e->src) + ii) / ii;
if (SCHED_ROW (e->dest) == SCHED_ROW (e->src)
&& SCHED_COLUMN (e->dest) < SCHED_COLUMN (e->src))
dest_copy--;
if (dest_copy)
SET_BIT (uses_of_defs[dest_copy - 1], e->dest->cuid);
}
/* Now generate the reg_moves, attaching relevant uses to them. */
SCHED_NREG_MOVES (u) = nreg_moves;
old_reg = prev_reg = copy_rtx (SET_DEST (single_set (u->insn)));
last_reg_move = u->insn;
for (i_reg_move = 0; i_reg_move < nreg_moves; i_reg_move++)
{
unsigned int i_use = 0;
rtx new_reg = gen_reg_rtx (GET_MODE (prev_reg));
rtx reg_move = gen_move_insn (new_reg, prev_reg);
sbitmap_iterator sbi;
add_insn_before (reg_move, last_reg_move);
last_reg_move = reg_move;
if (!SCHED_FIRST_REG_MOVE (u))
SCHED_FIRST_REG_MOVE (u) = reg_move;
EXECUTE_IF_SET_IN_SBITMAP (uses_of_defs[i_reg_move], 0, i_use, sbi)
{
struct undo_replace_buff_elem *rep;
rep = (struct undo_replace_buff_elem *)
xcalloc (1, sizeof (struct undo_replace_buff_elem));
rep->insn = g->nodes[i_use].insn;
rep->orig_reg = old_reg;
rep->new_reg = new_reg;
if (! reg_move_replaces)
reg_move_replaces = rep;
else
{
rep->next = reg_move_replaces;
reg_move_replaces = rep;
}
replace_rtx (g->nodes[i_use].insn, old_reg, new_reg);
}
prev_reg = new_reg;
}
sbitmap_vector_free (uses_of_defs);
}
return reg_move_replaces;
}
/* We call this when we want to undo the SMS schedule for a given loop.
One of the things that we do is to delete the register moves generated
for the sake of SMS; this function deletes the register move instructions
recorded in the undo buffer. */
static void
undo_generate_reg_moves (partial_schedule_ptr ps,
struct undo_replace_buff_elem *reg_move_replaces)
{
int i,j;
for (i = 0; i < ps->g->num_nodes; i++)
{
ddg_node_ptr u = &ps->g->nodes[i];
rtx prev;
rtx crr = SCHED_FIRST_REG_MOVE (u);
for (j = 0; j < SCHED_NREG_MOVES (u); j++)
{
prev = PREV_INSN (crr);
delete_insn (crr);
crr = prev;
}
SCHED_FIRST_REG_MOVE (u) = NULL_RTX;
}
while (reg_move_replaces)
{
struct undo_replace_buff_elem *rep = reg_move_replaces;
reg_move_replaces = reg_move_replaces->next;
replace_rtx (rep->insn, rep->new_reg, rep->orig_reg);
}
}
/* Free memory allocated for the undo buffer. */
static void
free_undo_replace_buff (struct undo_replace_buff_elem *reg_move_replaces)
{
while (reg_move_replaces)
{
struct undo_replace_buff_elem *rep = reg_move_replaces;
reg_move_replaces = reg_move_replaces->next;
free (rep);
}
}
/* Bump the SCHED_TIMEs of all nodes to start from zero. Set the values
of SCHED_ROW and SCHED_STAGE. */
static void
normalize_sched_times (partial_schedule_ptr ps)
{
int i;
ddg_ptr g = ps->g;
int amount = PS_MIN_CYCLE (ps);
int ii = ps->ii;
/* Don't include the closing branch assuming that it is the last node. */
for (i = 0; i < g->num_nodes - 1; i++)
{
ddg_node_ptr u = &g->nodes[i];
int normalized_time = SCHED_TIME (u) - amount;
alias.c (true_dependence): Remove 'abort' from comments. * alias.c (true_dependence): Remove 'abort' from comments. Use gcc_assert and gcc_unreachable as appropriate. (canon_true_dependence): Likewise. * bb-reorder.c (connect_traces): Likewise. * c-common.c (c_add_case_label): Likewise. * c-decl.c (finish_function): Likewise. * caller-save.c (insert_restore, insert_save): Likewise. * cfg.c (update_bb_profile_for_threading): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfgrtl.c (rtl_redirect_edge_and_branch_force, rtl_split_edge, cfg_layout_merge_blocks): Likewise. * ifcvt.c (cond_exec_process_insns, merge_if_block, find_if_block): Likewise. * integrate.c (allocate_initial_values): Likewise. * jump.c (reverse_condition, reverse_condition_maybe_unordered, swap_condition, unsigned_condition, signed_condition, mark_jump_label, invert_jump_1, rtx_renumbered_equal_p, reg_or_subregno): Likewise. * lambda-code.c (lambda_compute_auxillary_space, lambda_transform_legal_p): Likewise. * lambda-mat.c (lambda_matrix_inverse_hard): Likewise. * langhooks.c (lhd_set_decl_assembler_name, lhd_type_promotes_to, lhd_incomplete_type_error, lhd_expand_expr, lhd_types_compatible_p, lhd_tree_size): Likewise. * lcm.c (create_pre_exit, optimize_mode_switching): Likewise. * local-alloc.c (update_equiv_regs): Likewise. * loop-unroll.c (peel_loop_completely unroll_loop_constant_iterations, unroll_loop_runtime_iterations, peel_loop_simple, unroll_loop_stupid, analyze_iv_to_split_insn): Likewise. * loop.c (gen_prefetch, find_and_verify_loops, basic_induction_var): Likewise. * modulo-sched.c (normalize_sched_times, check_nodes_order): Likewise. * value-prof.c (tree_find_values_to_profile): Likewise. * varasm.c (named_section, default_assemble_integer, decode_addr_const): Likewise. From-SVN: r98508
2005-04-21 17:47:33 +02:00
gcc_assert (normalized_time >= 0);
SCHED_TIME (u) = normalized_time;
SCHED_ROW (u) = normalized_time % ii;
SCHED_STAGE (u) = normalized_time / ii;
}
}
/* Set SCHED_COLUMN of each node according to its position in PS. */
static void
set_columns_for_ps (partial_schedule_ptr ps)
{
int row;
for (row = 0; row < ps->ii; row++)
{
ps_insn_ptr cur_insn = ps->rows[row];
int column = 0;
for (; cur_insn; cur_insn = cur_insn->next_in_row)
SCHED_COLUMN (cur_insn->node) = column++;
}
}
/* Permute the insns according to their order in PS, from row 0 to
row ii-1, and position them right before LAST. This schedules
the insns of the loop kernel. */
static void
permute_partial_schedule (partial_schedule_ptr ps, rtx last)
{
int ii = ps->ii;
int row;
ps_insn_ptr ps_ij;
for (row = 0; row < ii ; row++)
for (ps_ij = ps->rows[row]; ps_ij; ps_ij = ps_ij->next_in_row)
if (PREV_INSN (last) != ps_ij->node->insn)
reorder_insns_nobb (ps_ij->node->first_note, ps_ij->node->insn,
PREV_INSN (last));
}
/* As part of undoing SMS we return to the original ordering of the
instructions inside the loop kernel. Given the partial schedule PS, this
function returns the ordering of the instruction according to their CUID
in the DDG (PS->G), which is the original order of the instruction before
performing SMS. */
static void
undo_permute_partial_schedule (partial_schedule_ptr ps, rtx last)
{
int i;
for (i = 0 ; i < ps->g->num_nodes; i++)
if (last == ps->g->nodes[i].insn
|| last == ps->g->nodes[i].first_note)
break;
else if (PREV_INSN (last) != ps->g->nodes[i].insn)
reorder_insns_nobb (ps->g->nodes[i].first_note, ps->g->nodes[i].insn,
PREV_INSN (last));
}
/* Used to generate the prologue & epilogue. Duplicate the subset of
nodes whose stages are between FROM_STAGE and TO_STAGE (inclusive
of both), together with a prefix/suffix of their reg_moves. */
static void
duplicate_insns_of_cycles (partial_schedule_ptr ps, int from_stage,
int to_stage, int for_prolog)
{
int row;
ps_insn_ptr ps_ij;
for (row = 0; row < ps->ii; row++)
for (ps_ij = ps->rows[row]; ps_ij; ps_ij = ps_ij->next_in_row)
{
ddg_node_ptr u_node = ps_ij->node;
int j, i_reg_moves;
rtx reg_move = NULL_RTX;
if (for_prolog)
{
/* SCHED_STAGE (u_node) >= from_stage == 0. Generate increasing
number of reg_moves starting with the second occurrence of
u_node, which is generated if its SCHED_STAGE <= to_stage. */
i_reg_moves = to_stage - SCHED_STAGE (u_node) + 1;
i_reg_moves = MAX (i_reg_moves, 0);
i_reg_moves = MIN (i_reg_moves, SCHED_NREG_MOVES (u_node));
/* The reg_moves start from the *first* reg_move backwards. */
if (i_reg_moves)
{
reg_move = SCHED_FIRST_REG_MOVE (u_node);
for (j = 1; j < i_reg_moves; j++)
reg_move = PREV_INSN (reg_move);
}
}
else /* It's for the epilog. */
{
/* SCHED_STAGE (u_node) <= to_stage. Generate all reg_moves,
starting to decrease one stage after u_node no longer occurs;
that is, generate all reg_moves until
SCHED_STAGE (u_node) == from_stage - 1. */
i_reg_moves = SCHED_NREG_MOVES (u_node)
- (from_stage - SCHED_STAGE (u_node) - 1);
i_reg_moves = MAX (i_reg_moves, 0);
i_reg_moves = MIN (i_reg_moves, SCHED_NREG_MOVES (u_node));
/* The reg_moves start from the *last* reg_move forwards. */
if (i_reg_moves)
{
reg_move = SCHED_FIRST_REG_MOVE (u_node);
for (j = 1; j < SCHED_NREG_MOVES (u_node); j++)
reg_move = PREV_INSN (reg_move);
}
}
for (j = 0; j < i_reg_moves; j++, reg_move = NEXT_INSN (reg_move))
emit_insn (copy_rtx (PATTERN (reg_move)));
if (SCHED_STAGE (u_node) >= from_stage
&& SCHED_STAGE (u_node) <= to_stage)
duplicate_insn_chain (u_node->first_note, u_node->insn);
}
}
/* Generate the instructions (including reg_moves) for prolog & epilog. */
static void
generate_prolog_epilog (partial_schedule_ptr ps, struct loop * loop, rtx count_reg)
{
int i;
int last_stage = PS_STAGE_COUNT (ps) - 1;
edge e;
/* Generate the prolog, inserting its insns on the loop-entry edge. */
start_sequence ();
if (count_reg)
/* Generate a subtract instruction at the beginning of the prolog to
adjust the loop count by STAGE_COUNT. */
emit_insn (gen_sub2_insn (count_reg, GEN_INT (last_stage)));
for (i = 0; i < last_stage; i++)
duplicate_insns_of_cycles (ps, 0, i, 1);
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
/* Put the prolog on the entry edge. */
e = loop_preheader_edge (loop);
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
split_edge_and_insert (e, get_insns());
end_sequence ();
/* Generate the epilog, inserting its insns on the loop-exit edge. */
start_sequence ();
for (i = 0; i < last_stage; i++)
duplicate_insns_of_cycles (ps, i + 1, last_stage, 0);
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
/* Put the epilogue on the exit edge. */
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
gcc_assert (single_exit (loop));
e = single_exit (loop);
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
split_edge_and_insert (e, get_insns());
end_sequence ();
}
/* Return true if all the BBs of the loop are empty except the
loop header. */
static bool
loop_single_full_bb_p (struct loop *loop)
{
unsigned i;
basic_block *bbs = get_loop_body (loop);
for (i = 0; i < loop->num_nodes ; i++)
{
rtx head, tail;
bool empty_bb = true;
if (bbs[i] == loop->header)
continue;
/* Make sure that basic blocks other than the header
have only notes labels or jumps. */
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (bbs[i], bbs[i], &head, &tail);
for (; head != NEXT_INSN (tail); head = NEXT_INSN (head))
{
if (NOTE_P (head) || LABEL_P (head)
|| (INSN_P (head) && JUMP_P (head)))
continue;
empty_bb = false;
break;
}
if (! empty_bb)
{
free (bbs);
return false;
}
}
free (bbs);
return true;
}
/* A simple loop from SMS point of view; it is a loop that is composed of
either a single basic block or two BBs - a header and a latch. */
#define SIMPLE_SMS_LOOP_P(loop) ((loop->num_nodes < 3 ) \
&& (EDGE_COUNT (loop->latch->preds) == 1) \
&& (EDGE_COUNT (loop->latch->succs) == 1))
/* 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
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
2006-02-06 19:20:47 +01:00
loop_canon_p (struct loop *loop)
{
if (loop->inner || ! loop->outer)
return false;
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
if (!single_exit (loop))
{
if (dump_file)
{
rtx insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop many exits ");
fprintf (dump_file, " %s %d (file, line)\n",
insn_file (insn), insn_line (insn));
}
return false;
}
if (! SIMPLE_SMS_LOOP_P (loop) && ! loop_single_full_bb_p (loop))
{
if (dump_file)
{
rtx insn = BB_END (loop->header);
fprintf (dump_file, "SMS loop many BBs. ");
fprintf (dump_file, " %s %d (file, line)\n",
insn_file (insn), insn_line (insn));
}
return false;
}
return true;
}
/* If there are more than one entry for the loop,
make it one by splitting the first entry edge and
redirecting the others to the new BB. */
static void
canon_loop (struct loop *loop)
{
edge e;
edge_iterator i;
/* Avoid annoying special cases of edges going to exit
block. */
FOR_EACH_EDGE (e, i, EXIT_BLOCK_PTR->preds)
if ((e->flags & EDGE_FALLTHRU) && (EDGE_COUNT (e->src->succs) > 1))
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
split_edge (e);
if (loop->latch == loop->header
|| EDGE_COUNT (loop->latch->succs) > 1)
{
FOR_EACH_EDGE (e, i, loop->header->preds)
if (e->src == loop->latch)
break;
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
split_edge (e);
}
}
/* Probability in % that the sms-ed loop rolls enough so that optimized
version may be entered. Just a guess. */
#define PROB_SMS_ENOUGH_ITERATIONS 80
/* Main entry point, perform SMS scheduling on the loops of the function
that consist of single basic blocks. */
static void
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
2006-02-06 19:20:47 +01:00
sms_schedule (void)
{
static int passes = 0;
rtx insn;
ddg_ptr *g_arr, g;
int * node_order;
int maxii;
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
loop_iterator li;
partial_schedule_ptr ps;
struct df *df;
basic_block bb = NULL;
struct loop *loop;
basic_block condition_bb = NULL;
edge latch_edge;
gcov_type trip_count = 0;
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
loop_optimizer_init (LOOPS_HAVE_PREHEADERS
| LOOPS_HAVE_MARKED_SINGLE_EXITS);
if (!current_loops)
return; /* There are no loops to schedule. */
/* Initialize issue_rate. */
if (targetm.sched.issue_rate)
{
int temp = reload_completed;
reload_completed = 1;
issue_rate = targetm.sched.issue_rate ();
reload_completed = temp;
}
else
issue_rate = 1;
/* Initialize the scheduler. */
current_sched_info = &sms_sched_info;
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
2006-02-06 19:20:47 +01:00
sched_init ();
/* Init Data Flow analysis, to be used in interloop dep calculation. */
re PR rtl-optimization/26855 (ICE in add_deps_for_def with -fmodulo-sched -maltivec) 2006-05-19 Daniel Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> PR rtl-optimization/26855 * df-scan.c (mw_reg_pool, mw_link_pool): New allocation pools for multiword refs. (df_scan_alloc): Added code to properly handle multiword hard registers and add all_blocks parameter. (df_scan_free_internal, df_insn_refs_delete, df_ref_record): Added code to properly handle multiword hard registers. (df_rescan_blocks): Added code to remove deleted blocks from bitmap. (df_ref_create_structure, df_ref_record): Added code to properly handle subregs. (df_ref_record_1): Changed DF_REF_CLOBBER into DF_REF_MUST_CLOBBER and set DF_REF_PARTIAL. (df_defs_record): Changed DF_REF_CLOBBER into DF_REF_MUST_CLOBBER. (df_uses_record): Added DF_REF_PARTIAL for subreg. (df_scan_add_problem): Added flags parameter. (df_ref_create_structure): Changed switching structure. (df_bb_refs_record): Fixed case where duplicate artificial refs were created. Changed location of flags. (df_record_entry_block_defs): Added code to make stack pointer live in entry block. Refined cases where frame pointer is needed. Changed location of flags. (df_record_exit_block_uses, df_insn_refs_record): Changed location of flags. (df_set_state): Removed function. (df_grow_reg_info, df_reg_chain_unlink, df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete, df_ref_create_structure): Formatting changes. * df-core.c (df_mvs_dump, df_set_flags, df_clear_flags, df_delete_basic_block): New function. (df_init): Changed location of flags. (df_add_problem): Added flags parameter and the way flags are processed. (df_insn_uid_debug, df_ref_debug, debug_df_defno, debug_df_ref, debug_df_chain): Improved debugging output. (df_insn_debug, df_insn_uid_debug): Added multiword reg support. (df_refs_chain_dump): Removed df parameter. (df_iterative_dataflow): Added consistency check. (df_prune_to_subcfg): Made public. (df_analyze_problem): Added blocks_to_init parameter and made public. (df_ref_record, df_bb_refs_record, df_mark_reg, df_record_exit_block_uses): Whitespace changes. (df_dump): Whitespace changes. * df.h: Some reordering to remove forward references. (df_ref_flags.DF_REF_MW_HARDREG, DF_REF_PARTIAL, DF_REF_MUST_CLOBBER, DF_REF_MAY_CLOBBER): New fields. (df_ref_flags.DF_REF_CLOBBER): Deleted field. (dataflow.flags): New field. (df.flag): Deleted field. (df_alloc_function): Added additional bitmap parameter. (df_dependent_problem_function): New type. (df_problem.changeable_flags): New field. (df_ref_flags.DF_REF_DIES_AFTER_THIS_USE, DF_SCAN_INITIAL, DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC, df_state): Removed. (df_mw_hardreg): New struct. (DF_INSN_UID_MWS): New macro. (df_refs_chain_dump, df_ref_debug, df_chain_dump): Removed df parameter. (df_add_problem, df_ru_add_problem, df_rd_add_problem, df_lr_add_problem, df_ur_add_problem, df_urec_add_problem, df_ri_add_problem, df_scan_add_problem): Added flags parameter. (df_set_state): Removed function. (df_set_flags, df_clear_flags, df_delete_basic_block) New functions. * df-problems.c (df_chain_dump): Removed df parameter. (df_ru_alloc, df_rd_alloc, df_lr_alloc, df_ur_alloc, df_urec_alloc, df_chain_alloc, df_ri_alloc): Added all blocks parameter. (df_ru_alloc, df_rd_alloc): Now resets all blocks. (df_rd_bb_local_compute_process_def, df_ur_bb_local_compute, df_chain_create_bb, df_create_unused_note, df_ri_bb_compute): Split DF_REF_CLOBBER into DF_REF_MAY_CLOBBER and DF_REF_MUST_CLOBBER cases. (df_ru_bb_local_compute_process_def, df_rd_bb_local_compute_process_def, df_lr_bb_local_compute, df_lr_bb_local_compute, df_ur_bb_local_compute, df_chain_create_bb): Made subreg aware. (df_ru_bb_local_compute, df_rd_bb_local_compute, df_lr_bb_local_compute, df_lr_bb_local_compute, df_chain_create_bb): Cleanup to use proper macros. (df_ur_local_finalize, df_urec_local_finalize): Removed unnecessary code to fixup bitvectors. (df_ri_alloc): Cleared lifetime. (df_ignore_stack_reg, df_kill_notes, df_set_notes_for_mw, df_create_unused_note): New function. (df_ri_bb_compute, df_ri_compute): Added code to create/update REG_DEAD and REG_UNUSED notes as well as register information. (df_ru_dump, df_rd_dump, df_lr_dump, df_ur_dump, df_urec_dump, df_chains_dump): Fixed crash if problem was never run. (df_ru_add_problem, df_rd_add_problem, df_lr_add_problem, df_ur_add_problem, df_urec_add_problem, df_chain_add_problem, df_ri_add_problem): Processes flags in uniform manner. (df_ru_alloc, df_ru_local_compute, df_ru_confluence_n, df_ru_free, df_ru_dump, df_rd_local_compute, df_rd_confluence_n, df_rd_free, df_rd_dump, df_urec_free_bb_info): Formatting changes. (df_ru_free_bb_info, df_ru_bb_local_compute, df_ru_dump, df_rd_free_bb_info, df_rd_bb_local_compute_process_def, df_rd_bb_local_compute, df_rd_dump, df_lr_free_bb_info, df_lr_bb_local_compute, df_lr_local_compute, df_ur_free_bb_info, df_ur_dump, df_urec_free_bb_info, df_urec_dump, df_chain_create_bb, df_ri_bb_compute): Whitespace changes. * modulo-sched.c (sms_schedule): Added flag parameter to calls. * see.c (see_initialize_data): Ditto. * final.c (rest_of_clean_state) Added regstack_completed. * rtl.h (regstack_completed): Ditto. * reg-stack.c (regstack_completed): Ditto. From-SVN: r113915
2006-05-19 23:18:23 +02:00
df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES | DF_SUBREGS);
df_rd_add_problem (df, 0);
df_ru_add_problem (df, 0);
df.h (DF_SCAN, [...]): New macros. 2005-01-11 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN, DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN, DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS, DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO, DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT, DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN, DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO, DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO, DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN, DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG, DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P, DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P, DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET, DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET, DF_REG_USE_GET, DF_REG_USE_SET, DF_REGNO_FIRST_DEF, DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET, DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES, DF_INSN_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS, DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC): New macros. (df_flow_dir, df_ref_type, df_ref_flags, df_alloc_function, df_free_bb_function, df_local_compute_function, df_init_function, df_dataflow_function, df_confluence_function_0, df_confluence_function_n, df_transfer_function, df_finalizer_function, df_free_function, df_dump_problem_function, df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link, df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info, df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info, df_urec_bb_info, ) New types. (df_invalidated_by_call, df_all_hard_regs, df_state) New public variables. (df_init, df_add_problem, df_set_blocks, df_finish, df_analyze, df_analyze_simple_change_some_blocks, df_analyze_simple_change_one_block, df_compact_blocks, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_find_use, df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno, debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref, debug_df_chain, df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem, df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info, df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem, df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem, df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink, df_ref_remove, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_hard_reg_init, df_read_modify_subreg_p) New public functions. * df-core.c: The core dataflow solver and glue routines for rtl dataflow. (df_init, df_add_problem, df_set_blocks, df_finish, df_hybrid_search_forward, df_hybrid_search_backward, df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem, df_analyze, df_get_bb_info, df_set_bb_info, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_reg_defined, df_find_use, df_reg_used, df_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno, debug_df_useno, reset_df_after_reload): New functions. * df-scan.c: The scanning fuctions, once in df.c, completely rewritten so that they now fully model the functionality of register usage at the backend. (df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info, df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump, df_scan_add_problem, df_grow_reg_info, df_grow_ref_info, df_grow_insn_info, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink, df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_ref_create_structure, df_ref_record, df_read_modify_subreg_p, df_def_record_1, df_defs_record, df_uses_record, df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record, df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg, df_record_exit_block_uses, df_hard_reg_init): New functions. * df-problems.c: Seven concrete dataflow problems that use the scanning in df-scan.c and are solved by the engine in df-core.c. (df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen, df_unset_seen, df_ru_get_bb_info, df_ru_set_bb_info, df_ru_free_bb_info, df_ru_alloc, df_ru_bb_local_compute_process_def, df_ru_bb_local_compute_process_use, df_ru_bb_local_compute, df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n, df_ru_transfer_function, df_ru_free, df_ru_dump, df_ru_add_problem, df_rd_get_bb_info, df_rd_set_bb_info, df_rd_free_bb_info, df_rd_alloc, df_rd_bb_local_compute_process_def, df_rd_bb_local_compute, df_rd_local_compute, df_rd_init_solution, df_rd_confluence_n, df_rd_transfer_function, df_rd_free, df_rd_dump, df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info, df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute, df_lr_local_compute, df_lr_init, df_lr_confluence_0, df_lr_confluence_n, df_lr_transfer_function, df_lr_free, df_lr_dump, df_lr_add_problem, df_ur_get_bb_info, df_ur_set_bb_info, df_ur_free_bb_info, df_ur_alloc, df_ur_bb_local_compute, df_ur_local_compute, df_ur_init, df_ur_local_finalize, df_ur_confluence_n, df_ur_transfer_function, df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info, df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc, df_urec_mark_reg_change, df_urec_check_earlyclobber, df_urec_mark_reg_use_for_earlyclobber, df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute, df_urec_local_compute, df_urec_init, df_urec_local_finalize, df_urec_confluence_n, df_urec_transfer_function, df_urec_free, df_urec_dump, df_urec_add_problem, df_chain_alloc, df_chain_create_bb_process_use, df_chain_create_bb, df_chain_finalize, df_chain_free, df_chains_dump, df_chain_add_problem, df_ri_alloc, df_ri_bb_compute, df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem, df_reg_lifetime): New functions. * df.c: Deleted file. * ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code consistent with new df api. * modulo-sched.c (sms_schedule, rest_of_handle_sms, rest_of_handle_sms): Ditto. * web.c (unionfind_union, union_defs, entry_register, web_main): Ditto. * loop_invariant.c (invariant_for_use, hash_invariant_expr_1, invariant_expr_equal_p, find_defs, check_dependencies, find_invariant_insn, find_invariants_to_move, move_invariant_reg, free_inv_motion_data, move_loop_invariants): Ditto. * sched-deps.c (sched_analyze_1): Ditto. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r109577
2006-01-11 13:57:18 +01:00
df_chain_add_problem (df, DF_DU_CHAIN | DF_UD_CHAIN);
df_analyze (df);
if (dump_file)
df_dump (df, dump_file);
/* Allocate memory to hold the DDG array one entry for each loop.
We use loop->num as index into this array. */
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
g_arr = XCNEWVEC (ddg_ptr, number_of_loops ());
/* Build DDGs for all the relevant loops and hold them in G_ARR
indexed by the loop index. */
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
FOR_EACH_LOOP (li, loop, 0)
{
rtx head, tail;
rtx count_reg;
/* For debugging. */
if ((passes++ > MAX_SMS_LOOP_NUMBER) && (MAX_SMS_LOOP_NUMBER != -1))
{
if (dump_file)
fprintf (dump_file, "SMS reached MAX_PASSES... \n");
break;
}
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
2006-02-06 19:20:47 +01:00
if (! loop_canon_p (loop))
continue;
if (! loop_single_full_bb_p (loop))
continue;
bb = loop->header;
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (bb, bb, &head, &tail);
latch_edge = loop_latch_edge (loop);
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
gcc_assert (single_exit (loop));
if (single_exit (loop)->count)
trip_count = latch_edge->count / single_exit (loop)->count;
/* Perfrom SMS only on loops that their average count is above threshold. */
if ( latch_edge->count
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
&& (latch_edge->count < single_exit (loop)->count * SMS_LOOP_AVERAGE_COUNT_THRESHOLD))
{
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
2006-02-06 19:20:47 +01:00
if (dump_file)
{
fprintf (dump_file, " %s %d (file, line)\n",
insn_file (tail), insn_line (tail));
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS single-bb-loop\n");
if (profile_info && flag_branch_probabilities)
{
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-count ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) bb->count);
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
fprintf (dump_file, "SMS trip-count ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) trip_count);
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
2006-02-06 19:20:47 +01:00
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);
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
}
}
continue;
}
/* Make sure this is a doloop. */
if ( !(count_reg = doloop_register_get (tail)))
continue;
/* Don't handle BBs with calls or barriers, or !single_set insns. */
for (insn = head; insn != NEXT_INSN (tail); insn = NEXT_INSN (insn))
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (CALL_P (insn)
|| BARRIER_P (insn)
|| (INSN_P (insn) && !JUMP_P (insn)
&& !single_set (insn) && GET_CODE (PATTERN (insn)) != USE))
break;
if (insn != NEXT_INSN (tail))
{
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
2006-02-06 19:20:47 +01:00
if (dump_file)
{
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
if (CALL_P (insn))
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-with-call\n");
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. 2004-07-08 Jerry Quinn <jlquinn@optonline.net> * alias.c (nonlocal_mentioned_p, nonlocal_referenced_p, nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P. * bb-reorder.c (mark_bb_for_unlikely_executed_section, add_labels_and_missing_jumps, find_jump_block, fix_crossing_unconditional_branches, add_reg_crossing_jump_notes): Likewise. * bt-load.c (btr_referenced_p, compute_defs_uses_and_gen, link_btr_uses, move_btr_def): Likewise. * builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto, expand_builtin_expect_jump): Likewise. * caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise. * calls.c (expand_call, emit_library_call_value_1): Likewise. * cfganal.c (forwarder_block_p): Likewise. * cfgbuild.c (inside_basic_block_p, count_basic_blocks, make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1, find_bb_boundaries): Likewise. * cfgcleanup.c (try_simplify_condjump, try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, insns_match_p, flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg): Likewise. * cfgexpand.c (expand_block, construct_exit_block): Likewise. * cfglayout.c (skip_insns_after_block, label_for_bb, record_effective_endpoints, insn_locators_initialize, fixup_reorder_chain, update_unlikely_executed_notes): Likewise. * cfgmainloop.c (create_loop_notes): Likewise. * cfgrtl.c (delete_insn, delete_insn_chain, create_basic_block_structure, rtl_delete_block, free_bb_for_insn, update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks, block_label, try_redirect_by_replacing_jump, last_loop_beg_note, redirect_branch_edge, force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p, rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb, update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info, purge_dead_edges, cfg_layout_redirect_edge_and_branch, cfg_layout_delete_block, cfg_layout_can_merge_blocks_p, cfg_layout_merge_blocks, rtl_block_ends_with_call_p, need_fake_edge_p, rtl_flow_call_edges_add): Likewise. * combine.c (combine_instructions, can_combine_p, try_combine, find_split_point, record_dead_and_set_regs, reg_dead_at_p, distribute_notes, distribute_links, insn_cuid): Likewise. * cse.c (fold_rtx, cse_insn, cse_around_loop, invalidate_skipped_block, cse_set_around_loop, cse_end_of_basic_block, cse_main, cse_basic_block, cse_condition_code_reg): Likewise. * cselib.c (cselib_process_insn): Likewise. * ddg.c (create_ddg): Likewise. * df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify): Likewise. * dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug, gen_label_die, dwarf2out_var_location): Likewise. * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn, next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn, last_call_insn, active_insn_p, next_label, prev_label, link_cc0_insns, next_cc0_user, try_split, add_insn_after, add_insn_before, remove_insn, add_function_usage_to, reorder_insns, find_line_note, remove_unnecessary_notes, emit_insn_after_1, classify_insn): Likewise. * except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before, connect_post_landing_pads, sjlj_mark_call_sites, sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers, can_throw_internal, can_throw_external, set_nothrow_function_flags, convert_to_eh_region_ranges): Likewise. * explow.c (optimize_save_area_alloca): Likewise. * expr.c (expand_expr_real): Likewise. * final.c (insn_current_reference_address, compute_alignments, shorten_branches, final, scan_ahead_for_unlikely_executed_note, final_scan_insn, output_asm_label, leaf_function_p): Likewise. * flow.c (first_insn_after_basic_block_note, delete_dead_jumptables, propagate_block_delete_insn, propagate_one_insn, init_propagate_block_info, propagate_block, libcall_dead_p, mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment): Likewise. * function.c (instantiate_virtual_regs, reorder_blocks_1, expand_function_start, expand_function_end, contains, thread_prologue_and_epilogue_insns, reposition_prologue_and_epilogue_notes): Likewise. * gcse.c (constprop_register, bypass_conditional_jumps, insert_insn_end_bb, gcse_after_reload): Likewise. * genemit.c (gen_expand, gen_split): Likewise. * genpeep.c (gen_peephole, main): Likewise. * global.c (build_insn_chain): Likewise. * graph.c (node_data, print_rtl_graph_with_bb): Likewise. * haifa-sched.c (unlink_other_notes, unlink_line_notes, get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes, restore_line_notes, rm_redundant_line_notes, rm_other_notes, ok_for_early_queue_removal, set_priorities, sched_init): Likewise. * ifcvt.c (count_bb_insns, first_active_insn, last_active_insn, cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block, merge_if_block, block_jumps_and_fallthru_p, find_if_block, dead_or_predicable): Likewise. * integrate.c (try_constants): Likewise. * jump.c (rebuild_jump_labels, cleanup_barriers, purge_line_number_notes, init_label_info, mark_all_labels, squeeze_notes, get_label_before, get_label_after, reversed_comparison_code_parts, simplejump_p, pc_set, returnjump_p, onlyjump_p, follow_jumps, mark_jump_label, delete_barrier, delete_prior_computation, delete_computation, delete_related_insns, delete_for_peephole, redirect_jump): Likewise. * lcm.c (optimize_mode_switching): Likewise. * local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc): Likewise. * loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise. * loop-invariant.c (find_exits, find_invariants_bb): Likewise. * loop-iv.c (simplify_using_assignment): Likewise. * loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg, libcall_benefit, skip_consec_insns, move_movables, prescan_loop, find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop, loop_bivs_init_find, strength_reduce, check_insn_for_bivs, check_insn_for_givs, check_final_value, update_giv_derive, basic_induction_var, product_cheap_p, check_dbra_loop, loop_insn_first_p, last_use_this_basic_block, canonicalize_condition, get_condition, loop_regs_scan, load_mems, try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise. * modulo-sched.c (doloop_register_get, find_line_note, sms_schedule, sms_schedule_by_order): Likewise. * optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise. * postreload.c (reload_cse_simplify_operands, reload_combine, reload_cse_move2add): Likewise. * predict.c (can_predict_insn_p, estimate_probability, expected_value_to_br_prob, process_note_predictions): Likewise. * print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise. * profile.c (branch_prob): Likewise. * ra-build.c (live_out_1, livethrough_conflicts_bb, detect_webs_set_in_cond_jump): Likewise. * ra-debug.c (ra_print_rtx_object, ra_debug_insns, ra_print_rtl_with_bb): Likewise. * ra-rewrite.c (insert_stores, rewrite_program2): Likewise. * recog.c (next_insn_tests_no_inequality, find_single_use, split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise. * reg-stack.c (next_flags_user, record_label_references, emit_swap_insn, swap_rtx_condition, subst_stack_regs, compensate_edge, convert_regs_1): Likewise. * regclass.c (scan_one_insn): Likewise. * regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2, regmove_optimize, fixup_match_1, single_set_for_csa, combine_stack_adjustments_for_block): Likewise. * regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise. * reload.c (find_reloads, find_reloads_address_1, subst_reloads, find_equiv_reg): Likewise. * reload1.c (reload, calculate_needs_all_insns, set_label_offsets, reload_as_needed, emit_input_reload_insns, do_output_reload, delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges): Likewise. * reorg.c (find_end_label, emit_delay_sequence, delete_from_delay_slot, delete_scheduled_jump, optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, try_merge_delay_insns, redundant_insn, own_thread_p, fill_simple_delay_slots, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Likewise. * resource.c (find_basic_block, next_insn_no_annul, find_dead_or_set_registers, mark_target_live_regs): Likewise. * rtl.h (RTX_PREV): Likewise. * rtlanal.c (global_reg_mentioned_p, no_labels_between_p, no_jumps_between_p, reg_used_between_p, reg_referenced_between_p, reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage, find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1, tablejump_p, computed_jump_p, insns_safe_to_move_p, find_first_parameter_load, can_hoist_insn_p): Likewise. * sched-deps.c (get_condition, add_dependence, sched_analyze_2, sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise. * sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns, schedule_ebbs): Likewise. * sched-rgn.c (is_cfg_nonregular, find_conditional_protection, is_conditionally_protected, can_schedule_ready_p, add_branch_dependences, debug_dependencies): Likewise. * stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable): Likewise. * unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p, reg_dead_after_loop, loop_find_equiv_value, loop_iterations, set_dominates_use, ujump_to_loop_cont): Likewise. * var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise. * varasm.c (output_constant_pool_1): Likewise. From-SVN: r84341
2004-07-09 05:29:35 +02:00
else if (BARRIER_P (insn))
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-with-barrier\n");
else
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-with-not-single-set\n");
print_rtl_single (dump_file, insn);
}
continue;
}
if (! (g = create_ddg (bb, df, 0)))
{
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
2006-02-06 19:20:47 +01:00
if (dump_file)
fprintf (dump_file, "SMS doloop\n");
continue;
}
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
g_arr[loop->num] = g;
}
/* Release Data Flow analysis data structures. */
df_finish (df);
df.h (DF_SCAN, [...]): New macros. 2005-01-11 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN, DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN, DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS, DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO, DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT, DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN, DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO, DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO, DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN, DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG, DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P, DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P, DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET, DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET, DF_REG_USE_GET, DF_REG_USE_SET, DF_REGNO_FIRST_DEF, DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET, DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES, DF_INSN_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS, DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC): New macros. (df_flow_dir, df_ref_type, df_ref_flags, df_alloc_function, df_free_bb_function, df_local_compute_function, df_init_function, df_dataflow_function, df_confluence_function_0, df_confluence_function_n, df_transfer_function, df_finalizer_function, df_free_function, df_dump_problem_function, df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link, df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info, df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info, df_urec_bb_info, ) New types. (df_invalidated_by_call, df_all_hard_regs, df_state) New public variables. (df_init, df_add_problem, df_set_blocks, df_finish, df_analyze, df_analyze_simple_change_some_blocks, df_analyze_simple_change_one_block, df_compact_blocks, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_find_use, df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno, debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref, debug_df_chain, df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem, df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info, df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem, df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem, df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink, df_ref_remove, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_hard_reg_init, df_read_modify_subreg_p) New public functions. * df-core.c: The core dataflow solver and glue routines for rtl dataflow. (df_init, df_add_problem, df_set_blocks, df_finish, df_hybrid_search_forward, df_hybrid_search_backward, df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem, df_analyze, df_get_bb_info, df_set_bb_info, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_reg_defined, df_find_use, df_reg_used, df_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno, debug_df_useno, reset_df_after_reload): New functions. * df-scan.c: The scanning fuctions, once in df.c, completely rewritten so that they now fully model the functionality of register usage at the backend. (df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info, df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump, df_scan_add_problem, df_grow_reg_info, df_grow_ref_info, df_grow_insn_info, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink, df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_ref_create_structure, df_ref_record, df_read_modify_subreg_p, df_def_record_1, df_defs_record, df_uses_record, df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record, df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg, df_record_exit_block_uses, df_hard_reg_init): New functions. * df-problems.c: Seven concrete dataflow problems that use the scanning in df-scan.c and are solved by the engine in df-core.c. (df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen, df_unset_seen, df_ru_get_bb_info, df_ru_set_bb_info, df_ru_free_bb_info, df_ru_alloc, df_ru_bb_local_compute_process_def, df_ru_bb_local_compute_process_use, df_ru_bb_local_compute, df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n, df_ru_transfer_function, df_ru_free, df_ru_dump, df_ru_add_problem, df_rd_get_bb_info, df_rd_set_bb_info, df_rd_free_bb_info, df_rd_alloc, df_rd_bb_local_compute_process_def, df_rd_bb_local_compute, df_rd_local_compute, df_rd_init_solution, df_rd_confluence_n, df_rd_transfer_function, df_rd_free, df_rd_dump, df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info, df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute, df_lr_local_compute, df_lr_init, df_lr_confluence_0, df_lr_confluence_n, df_lr_transfer_function, df_lr_free, df_lr_dump, df_lr_add_problem, df_ur_get_bb_info, df_ur_set_bb_info, df_ur_free_bb_info, df_ur_alloc, df_ur_bb_local_compute, df_ur_local_compute, df_ur_init, df_ur_local_finalize, df_ur_confluence_n, df_ur_transfer_function, df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info, df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc, df_urec_mark_reg_change, df_urec_check_earlyclobber, df_urec_mark_reg_use_for_earlyclobber, df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute, df_urec_local_compute, df_urec_init, df_urec_local_finalize, df_urec_confluence_n, df_urec_transfer_function, df_urec_free, df_urec_dump, df_urec_add_problem, df_chain_alloc, df_chain_create_bb_process_use, df_chain_create_bb, df_chain_finalize, df_chain_free, df_chains_dump, df_chain_add_problem, df_ri_alloc, df_ri_bb_compute, df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem, df_reg_lifetime): New functions. * df.c: Deleted file. * ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code consistent with new df api. * modulo-sched.c (sms_schedule, rest_of_handle_sms, rest_of_handle_sms): Ditto. * web.c (unionfind_union, union_defs, entry_register, web_main): Ditto. * loop_invariant.c (invariant_for_use, hash_invariant_expr_1, invariant_expr_equal_p, find_defs, check_dependencies, find_invariant_insn, find_invariants_to_move, move_invariant_reg, free_inv_motion_data, move_loop_invariants): Ditto. * sched-deps.c (sched_analyze_1): Ditto. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r109577
2006-01-11 13:57:18 +01:00
df = NULL;
/* We don't want to perform SMS on new loops - created by versioning. */
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
FOR_EACH_LOOP (li, loop, LI_ONLY_OLD)
{
rtx head, tail;
rtx count_reg, count_init;
int mii, rec_mii;
unsigned stage_count = 0;
HOST_WIDEST_INT loop_count = 0;
tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop. * loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP. * tree-loop-linear.c (linear_transform_loops): Ditto. * tree-ssa-loop-im.c (determine_lsm): Ditto. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations, free_numbers_of_iterations_estimates): Ditto. * tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto. * tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto. * modulo-sched.c (sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables, tree_unroll_loops_completely): Ditto. * predict.c (predict_loops): Ditto. * tree-if-conv.c (main_tree_if_conversion): Ditto. * loop-unroll.c (unroll_and_peel_loops, peel_loops_completely, decide_unrolling_and_peeling): Ditto. * cfgloopmanip.c (unloop): Use delete_loop. (place_new_loop): Access larray vector instead of parray. (create_preheaders, force_single_succ_latches, fix_loop_structure): Use FOR_EACH_LOOP and delete_loop.. * loop-doloop.c (doloop_optimize_loops): Ditto. * loop-invariant.c (move_loop_invariants): Ditto. * tree-cfg.c (replace_uses_by): Ditto. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto. * tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Moved to ... * tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): ... here. * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop, compute_overall_effect_of_inner_loop, chrec_is_positive): Use get_loop and get_chrec_loop. (number_of_iterations_for_all_loops): Use number_of_loops. (scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP. * tree-scalar-evolution.h (get_chrec_loop): New inline function. * cfgloopanal.c (mark_irreducible_loops): Use number_of_loops, and FOR_EACH_LOOP. * tree-chrec.c (evolution_function_is_invariant_rec_p, chrec_convert_1): Use get_loop and get_chrec_loop. * loop-init.c (loop_optimizer_init): Use number_of_loops. (loop_optimizer_init): Use FOR_EACH_LOOP. * tree-vectorizer.c (vect_loops_num): Removed. (vectorize_loops): Store number of loops locally. Use FOR_EACH_LOOP and get_loop. * tree-vectorizer.h (vect_loops_num): Removed. * tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop. (find_data_references_in_loop): Do not set parallel_p. * tree-data-ref.h: Do not declare VEC(loop_p). * cfgloop.c (flow_loops_dump, mark_single_exit_loops, verify_loop_structure): Use FOR_EACH_LOOP. (flow_loops_free): Use FOR_EACH_LOOP, free larray vector. (initialize_loops_parallel_p): Removed. (flow_loops_find): Push the loops into a vector. (delete_loop): New function. (cancel_loop): Use delete_loop. * cfgloop.h: Declare VEC(loop_p). (struct loop): Remove parallel_p field. (struct loops): Replace num and parray field by larray vector. Remove shared_headers field. (delete_loop): Declare. (get_loop, get_loops, number_of_loops, fel_next, fel_init, FOR_EACH_LOOP): New. * doc/loop.tex: Document new accessor functions. From-SVN: r119713
2006-12-10 23:17:15 +01:00
if (! (g = g_arr[loop->num]))
continue;
if (dump_file)
print_ddg (dump_file, g);
target.h (struct spec_info_def): New opaque declaration. 2006-03-16 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * target.h (struct spec_info_def): New opaque declaration. (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended, speculate_insn, needs_block_p, gen_check, first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags. * target-def.h (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in gcc_target.sched. (TARGET_SCHED): Use new macros. * rtl.h (copy_DEPS_LIST_list): New prototype. * sched-int.h (struct sched_info): Change signature of new_ready field, adjust all initializations. New fields: add_remove_insn, begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg, region_head_or_leaf_p. (struct spec_info_def): New structure declaration. (spec_info_t): New typedef. (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec, recovery_block, orig_pat. (glat_start, glat_end): New variables declaraions. (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT): New access macros. (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB, DETACH_LIFE_INFO, USE_GLAT. (enum SPEC_SCHED_FLAGS): New enumeration. (NOTE_NOTE_BB_P): New macro. (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block, attach_life_info, debug_spec_status, check_reg_live): New functions. (get_block_head_tail): Change signature to get_ebb_head_tail, adjust all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c, sched-ebb.c (get_dep_weak, ds_merge): Prototype functions from sched-deps.c . * ddg.c (get_block_head_tail): Adjust all uses. * modulo-sched.c (get_block_head_tail): Adjust all uses. (sms_sched_info): Initialize new fields. (contributes_to_priority): Removed. * haifa-sched.c (params.h): New include. (get_block_head_tail): Adjust all uses. (ISSUE_POINTS): New macro. (glat_start, glat_end): New global variables. (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data, nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header, old_last_basic_block, before_recovery, current_sched_info_var, rgn_n_insns, luid): New static variables. (insn_cost1): New function. Move logic from insn_cost to here. (find_insn_reg_weight1): New function. Move logic from find_insn_reg_weight to here. (reemit_notes, move_insn, max_issue): Change signature. (move_insn1): Removed. (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d, extend_bb): New static functions to support extension of scheduler's data structures. (generate_recovery_code, process_insn_depend_be_in_spec, begin_speculative_block, add_to_speculative_block, init_before_recovery, create_recovery_block, create_check_block_twin, fix_recovery_deps): New static functions to support generation of recovery code. (fix_jump_move, find_fallthru_edge, dump_new_block_header, restore_bb_notes, move_block_after_check, move_succs): New static functions to support ebb scheduling. (init_glat, init_glat1, attach_life_info1, free_glat): New static functions to support handling of register live information. (associate_line_notes_with_blocks, change_pattern, speculate_insn, sched_remove_insn, clear_priorities, calc_priorities, bb_note, add_jump_dependencies): New static functions. (check_cfg, has_edge_p, check_sched_flags): New static functions for consistancy checking. (debug_spec_status): New function to call from debugger. (priority): Added code to handle speculation checks. (rank_for_schedule): Added code to distinguish speculative instructions. (schedule_insn): Added code to handle speculation checks. (unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes): Fixed to handle ebbs. (move_insn): Added code to handle ebb scheduling. (max_issue): Added code to use ISSUE_POINTS of instructions. (choose_ready): Added code to choose between speculative and non-speculative instructions. (schedule_block): Added code to handle ebb scheduling and scheduling of speculative instructions. (sched_init): Initialize new variables. (sched_finish): Free new variables. Print statistics. (try_ready): Added code to handle speculative instructions. * lists.c (copy_DEPS_LIST_list): New function. * sched-deps.c (extend_dependency_caches): New function. Move logic from create_dependency_caches to here. (get_dep_weak, ds_merge): Make global. * genattr.c (main): Code to output prototype for dfa_clear_single_insn_cache. * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros. (output_dfa_clean_insn_cache_func): Code to output dfa_clear_single_insn_cache function. * sched-ebb.c (target_n_insns): Remove. Adjust all users to use n_insns. (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs): Removed. (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb): New static variables. (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb, fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from struct sched_info. (ebb_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (compute_jump_reg_dependencies): Fixed to use glat_start. (schedule_ebb): Code to remove unreachable last block. (schedule_ebbs): Added code to update register live information. * sched-rgn.c (region_sched_info): Initialize new fields. (get_block_head_tail): Adjust all uses. (last_was_jump): Removed. Adjust users. (begin_schedule_ready, add_remove_insn, insn_points, extend_regions, add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p): Implement new hooks. (check_dead_notes1): New static function. (struct region): New fields: dont_calc_deps, has_real_ebb. (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros. (BB_TO_BLOCK): Fixed to handle EBBs. (EBB_FIRST_BB, EBB_LAST_BB): New macros. (ebb_head): New static variable. (debug_regions, contributes_to_priority): Fixed to handle EBBs. (find_single_block_regions, find_rgns, find_more_rgns): Initialize new fields. (compute_dom_prob_ps): New assertion. (check_live_1, update_live_1): Fixed to work with glat_start instead of global_live_at_start. (init_ready_list): New assertions. (can_schedule_ready_p): Split update code to begin_schedule_ready. (new_ready): Add support for BEGIN_CONTROL speculation. (schedule_insns): Fixed code that updates register live information to handle EBBs. (schedule_region): Fixed to handle EBBs. (init_regions): Use extend_regions and check_dead_notes1. * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY, PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters. * doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK, TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC, TARGET_SCHED_SET_SCHED_FLAGS): Document. * doc/invoke.texi (max-sched-insn-conflict-delay, sched-spec-prob-cutoff): Document. From-SVN: r112128
2006-03-16 06:27:03 +01:00
get_ebb_head_tail (loop->header, loop->header, &head, &tail);
latch_edge = loop_latch_edge (loop);
tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-loop-linear.c (linear_transform_loops): Use single_exit accessor functions. * tree-ssa-loop-niter.c (loop_only_exit_p): Ditto. * cfgloopmanip.c (update_single_exits_after_duplication, update_single_exit_for_duplicated_loop, loop_version): Ditto. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, loop_closed_phi_def, number_of_iterations_in_loop, scev_const_prop): Ditto. * tree-ssa-loop-ivopts.c (single_dom_exit): Ditto. * modulo-sched.c (generate_prolog_epilog, loop_canon_p, sms_schedule): Ditto. * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Ditto. * tree-vectorizer.c (slpeel_update_phis_for_duplicate_loop, slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_make_loop_iterate_ntimes, slpeel_tree_duplicate_loop_to_edge_cfg, slpeel_can_duplicate_loop_p, slpeel_verify_cfg_after_peeling, slpeel_tree_peel_loop_to_edge): Ditto. * tree-if-conv.c (if_convertible_loop_p): Ditto. * tree-vect-analyze.c (vect_analyze_operations, vect_stmt_relevant_p, vect_analyze_loop_form): Ditto. * lambda-code.c (lambda_loopnest_to_gcc_loopnest, exit_phi_for_loop_p, can_convert_to_perfect_nest, perfect_nestify): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction, vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, vect_transform_loop): Ditto. * cfgloop.c (mark_single_exit_loops, verify_loop_structure): Ditto. (single_exit, set_single_exit): New functions. * cfgloop.h (struct loop): Rename single_exit field to single_exit_. (single_exit, set_single_exit): Declare. * doc/loop.texi: Undocument single_exit field. Document single_exit accessor function. From-SVN: r119075
2006-11-22 00:54:16 +01:00
gcc_assert (single_exit (loop));
if (single_exit (loop)->count)
trip_count = latch_edge->count / single_exit (loop)->count;
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
2006-02-06 19:20:47 +01:00
if (dump_file)
{
fprintf (dump_file, " %s %d (file, line)\n",
insn_file (tail), insn_line (tail));
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS single-bb-loop\n");
if (profile_info && flag_branch_probabilities)
{
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS loop-count ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT) bb->count);
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
2006-02-06 19:20:47 +01:00
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);
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
}
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
2006-02-06 19:20:47 +01:00
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);
}
/* In case of th loop have doloop register it gets special
handling. */
count_init = NULL_RTX;
if ((count_reg = doloop_register_get (tail)))
{
basic_block pre_header;
pre_header = loop_preheader_edge (loop)->src;
count_init = const_iteration_count (count_reg, pre_header,
&loop_count);
}
gcc_assert (count_reg);
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
2006-02-06 19:20:47 +01:00
if (dump_file && count_init)
{
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "SMS const-doloop ");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
loop_count);
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file, "\n");
}
tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-31 20:56:55 +01:00
node_order = XNEWVEC (int, g->num_nodes);
mii = 1; /* Need to pass some estimate of mii. */
rec_mii = sms_order_nodes (g, mii, node_order);
mii = MAX (res_MII (g), rec_mii);
maxii = (calculate_maxii (g) * SMS_MAX_II_FACTOR) / 100;
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
2006-02-06 19:20:47 +01:00
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);
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
2006-02-06 19:20:47 +01:00
ps = sms_schedule_by_order (g, mii, maxii, node_order);
if (ps)
stage_count = PS_STAGE_COUNT (ps);
/* Stage count of 1 means that there is no interleaving between
iterations, let the scheduling passes do the job. */
if (stage_count < 1
|| (count_init && (loop_count <= stage_count))
|| (flag_branch_probabilities && (trip_count <= stage_count)))
{
if (dump_file)
{
fprintf (dump_file, "SMS failed... \n");
fprintf (dump_file, "SMS sched-failed (stage-count=%d, loop-count=", stage_count);
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, loop_count);
fprintf (dump_file, ", trip-count=");
fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC, trip_count);
fprintf (dump_file, ")\n");
}
continue;
}
else
{
int orig_cycles = kernel_number_of_cycles (BB_HEAD (g->bb), BB_END (g->bb));
int new_cycles;
struct undo_replace_buff_elem *reg_move_replaces;
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
2006-02-06 19:20:47 +01:00
if (dump_file)
{
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
2006-02-06 19:20:47 +01:00
fprintf (dump_file,
"SMS succeeded %d %d (with ii, sc)\n", ps->ii,
stage_count);
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
2006-02-06 19:20:47 +01:00
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);
}
/* Set the stage boundaries. If the DDG is built with closing_branch_deps,
the closing_branch was scheduled and should appear in the last (ii-1)
row. Otherwise, we are free to schedule the branch, and we let nodes
that were scheduled at the first PS_MIN_CYCLE cycle appear in the first
row; this should reduce stage_count to minimum. */
normalize_sched_times (ps);
rotate_partial_schedule (ps, PS_MIN_CYCLE (ps));
set_columns_for_ps (ps);
/* Generate the kernel just to be able to measure its cycles. */
permute_partial_schedule (ps, g->closing_branch->first_note);
reg_move_replaces = generate_reg_moves (ps);
/* Get the number of cycles the new kernel expect to execute in. */
new_cycles = kernel_number_of_cycles (BB_HEAD (g->bb), BB_END (g->bb));
/* Get back to the original loop so we can do loop versioning. */
undo_permute_partial_schedule (ps, g->closing_branch->first_note);
if (reg_move_replaces)
undo_generate_reg_moves (ps, reg_move_replaces);
if ( new_cycles >= orig_cycles)
{
/* SMS is not profitable so undo the permutation and reg move generation
and return the kernel to its original state. */
if (dump_file)
fprintf (dump_file, "Undoing SMS because it is not profitable.\n");
}
else
{
canon_loop (loop);
/* case the BCT count is not known , Do loop-versioning */
if (count_reg && ! count_init)
{
rtx comp_rtx = gen_rtx_fmt_ee (GT, VOIDmode, count_reg,
GEN_INT(stage_count));
unsigned prob = (PROB_SMS_ENOUGH_ITERATIONS
* REG_BR_PROB_BASE) / 100;
loop_version (loop, comp_rtx, &condition_bb,
prob, prob, REG_BR_PROB_BASE - prob,
true);
}
/* Set new iteration count of loop kernel. */
if (count_reg && count_init)
SET_SRC (single_set (count_init)) = GEN_INT (loop_count
- stage_count + 1);
/* Now apply the scheduled kernel to the RTL of the loop. */
permute_partial_schedule (ps, g->closing_branch->first_note);
/* Mark this loop as software pipelined so the later
scheduling passes doesn't touch it. */
if (! flag_resched_modulo_sched)
g->bb->flags |= BB_DISABLE_SCHEDULE;
/* The life-info is not valid any more. */
g->bb->flags |= BB_DIRTY;
reg_move_replaces = generate_reg_moves (ps);
if (dump_file)
print_node_sched_params (dump_file, g->num_nodes);
/* Generate prolog and epilog. */
if (count_reg && !count_init)
generate_prolog_epilog (ps, loop, count_reg);
else
generate_prolog_epilog (ps, loop, NULL_RTX);
}
free_undo_replace_buff (reg_move_replaces);
}
free_partial_schedule (ps);
free (node_sched_params);
free (node_order);
free_ddg (g);
}
free (g_arr);
/* Release scheduler data, needed until now because of DFA. */
sched_finish ();
tree-vrp.c (execute_vrp): Do not update current_loops. * tree-vrp.c (execute_vrp): Do not update current_loops. * loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with. * doc/loop.texi: Remove documentation for cancelled functions. * tree-ssa-loop-im.c (loop_commit_inserts): Removed. (move_computations, determine_lsm): Use bsi_commit_edge_inserts instead. * cfgloopmanip.c (remove_bbs): Do not update loops explicitly. (remove_path): Ensure that in delete_basic_blocks, the loops are still allocated. (add_loop): Work on valid loop structures. (loopify): Modify call of add_loop. (mfb_update_loops): Removed. (create_preheader): Do not update loops explicitly. (force_single_succ_latches, loop_version): Do not use loop_split_edge_with. (loop_split_edge_with): Removed. * tree-ssa-loop-manip.c (create_iv, determine_exit_conditions): Do not use bsi_insert_on_edge_immediate_loop. (split_loop_exit_edge, tree_unroll_loop): Do not use loop_split_edge_with. (bsi_insert_on_edge_immediate_loop): Removed. * tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops. Do not use loop_split_edge_with. * cfghooks.c: Include cfgloop.h. (verify_flow_info): Verify that loop_father is filled iff current_loops are available. (redirect_edge_and_branch_force, split_block, delete_basic_block, split_edge, merge_blocks, make_forwarder_block, duplicate_block): Update cfg. * cfgloopanal.c (mark_irreducible_loops): Work if the function contains no loops. * modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use loop_split_edge_with. (sms_schedule): Use current_loops. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops. * loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set current_loops. (rtl_loop_init, rtl_loop_done): Do not set current_loops. * tree-ssa-sink.c (execute_sink_code): Use current_loops. * ifcvt.c (if_convert): Ditto. * predict.c (predict_loops): Do not clear current_loops. (tree_estimate_probability): Use current_loops. (propagate_freq): Receive head of the region to propagate instead of loop. (estimate_loops_at_level): Do not use shared to_visit bitmap. (estimate_loops): New function. Handle case current_loops == NULL. (estimate_bb_frequencies): Do not allocate tovisit. Use estimate_loops. * tree-ssa-loop.c (current_loops): Removed. (tree_loop_optimizer_init): Do not return loops. (tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops. * tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1, slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge): Do not update loops explicitly. * function.h (struct function): Add x_current_loops field. (current_loops): New macro. * tree-if-conv.c (combine_blocks): Do not update loops explicitly. * loop-unroll.c (split_edge_and_insert): New function. (unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not use loop_split_edge_with. * loop-doloop.c (add_test, doloop_modify): Ditto. * tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops. * cfglayout.c (copy_bbs): Do not update loops explicitly. * lambda-code.c (perfect_nestify): Do not use loop_split_edge_with. * tree-vect-transform.c (vect_transform_loop): Do not update loops explicitly. * cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order. (flow_loops_free): Do not free dfs_order and rc_order. (flow_loops_find): Do not set dfs_order and rc_order in loops structure. Do not call loops and flow info verification. (add_bb_to_loop, remove_bb_from_loops): Check whether the block already belongs to some loop. * cfgloop.h (struct loops): Remove struct cfg. (current_loops, loop_split_edge_with): Declaration removed. (loop_optimizer_init, loop_optimizer_finalize): Declaration changed. * tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop): Declaration removed. * Makefile.in (cfghooks.o): Add CFGLOOP_H dependency. * basic-block.h (split_edge_and_insert): Declare. * tree-cfg.c (remove_bb): Do not update loops explicitly. From-SVN: r118931
2006-11-17 12:29:17 +01:00
loop_optimizer_finalize ();
}
/* The SMS scheduling algorithm itself
-----------------------------------
Input: 'O' an ordered list of insns of a loop.
Output: A scheduling of the loop - kernel, prolog, and epilogue.
'Q' is the empty Set
'PS' is the partial schedule; it holds the currently scheduled nodes with
their cycle/slot.
'PSP' previously scheduled predecessors.
'PSS' previously scheduled successors.
't(u)' the cycle where u is scheduled.
'l(u)' is the latency of u.
'd(v,u)' is the dependence distance from v to u.
'ASAP(u)' the earliest time at which u could be scheduled as computed in
the node ordering phase.
'check_hardware_resources_conflicts(u, PS, c)'
run a trace around cycle/slot through DFA model
to check resource conflicts involving instruction u
at cycle c given the partial schedule PS.
'add_to_partial_schedule_at_time(u, PS, c)'
Add the node/instruction u to the partial schedule
PS at time c.
'calculate_register_pressure(PS)'
Given a schedule of instructions, calculate the register
pressure it implies. One implementation could be the
maximum number of overlapping live ranges.
'maxRP' The maximum allowed register pressure, it is usually derived from the number
registers available in the hardware.
1. II = MII.
2. PS = empty list
3. for each node u in O in pre-computed order
4. if (PSP(u) != Q && PSS(u) == Q) then
5. Early_start(u) = max ( t(v) + l(v) - d(v,u)*II ) over all every v in PSP(u).
6. start = Early_start; end = Early_start + II - 1; step = 1
11. else if (PSP(u) == Q && PSS(u) != Q) then
12. Late_start(u) = min ( t(v) - l(v) + d(v,u)*II ) over all every v in PSS(u).
13. start = Late_start; end = Late_start - II + 1; step = -1
14. else if (PSP(u) != Q && PSS(u) != Q) then
15. Early_start(u) = max ( t(v) + l(v) - d(v,u)*II ) over all every v in PSP(u).
16. Late_start(u) = min ( t(v) - l(v) + d(v,u)*II ) over all every v in PSS(u).
17. start = Early_start;
18. end = min(Early_start + II - 1 , Late_start);
19. step = 1
20. else "if (PSP(u) == Q && PSS(u) == Q)"
21. start = ASAP(u); end = start + II - 1; step = 1
22. endif
23. success = false
24. for (c = start ; c != end ; c += step)
25. if check_hardware_resources_conflicts(u, PS, c) then
26. add_to_partial_schedule_at_time(u, PS, c)
27. success = true
28. break
29. endif
30. endfor
31. if (success == false) then
32. II = II + 1
33. if (II > maxII) then
34. finish - failed to schedule
35. endif
36. goto 2.
37. endif
38. endfor
39. if (calculate_register_pressure(PS) > maxRP) then
40. goto 32.
41. endif
42. compute epilogue & prologue
43. finish - succeeded to schedule
*/
/* A limit on the number of cycles that resource conflicts can span. ??? Should
be provided by DFA, and be dependent on the type of insn scheduled. Currently
set to 0 to save compile time. */
#define DFA_HISTORY SMS_DFA_HISTORY
/* Given the partial schedule PS, this function calculates and returns the
cycles in which we can schedule the node with the given index I.
NOTE: Here we do the backtracking in SMS, in some special cases. We have
noticed that there are several cases in which we fail to SMS the loop
because the sched window of a node is empty due to tight data-deps. In
such cases we want to unschedule some of the predecessors/successors
until we get non-empty scheduling window. It returns -1 if the
scheduling window is empty and zero otherwise. */
static int
get_sched_window (partial_schedule_ptr ps, int *nodes_order, int i,
sbitmap sched_nodes, int ii, int *start_p, int *step_p, int *end_p)
{
int start, step, end;
ddg_edge_ptr e;
int u = nodes_order [i];
ddg_node_ptr u_node = &ps->g->nodes[u];
sbitmap psp = sbitmap_alloc (ps->g->num_nodes);
sbitmap pss = sbitmap_alloc (ps->g->num_nodes);
sbitmap u_node_preds = NODE_PREDECESSORS (u_node);
sbitmap u_node_succs = NODE_SUCCESSORS (u_node);
int psp_not_empty;
int pss_not_empty;
/* 1. compute sched window for u (start, end, step). */
sbitmap_zero (psp);
sbitmap_zero (pss);
psp_not_empty = sbitmap_a_and_b_cg (psp, u_node_preds, sched_nodes);
pss_not_empty = sbitmap_a_and_b_cg (pss, u_node_succs, sched_nodes);
if (psp_not_empty && !pss_not_empty)
{
int early_start = INT_MIN;
end = INT_MAX;
for (e = u_node->in; e != 0; e = e->next_in)
{
ddg_node_ptr v_node = e->src;
if (TEST_BIT (sched_nodes, v_node->cuid))
{
int node_st = SCHED_TIME (v_node)
+ e->latency - (e->distance * ii);
early_start = MAX (early_start, node_st);
if (e->data_type == MEM_DEP)
end = MIN (end, SCHED_TIME (v_node) + ii - 1);
}
}
start = early_start;
end = MIN (end, early_start + ii);
step = 1;
}
else if (!psp_not_empty && pss_not_empty)
{
int late_start = INT_MAX;
end = INT_MIN;
for (e = u_node->out; e != 0; e = e->next_out)
{
ddg_node_ptr v_node = e->dest;
if (TEST_BIT (sched_nodes, v_node->cuid))
{
late_start = MIN (late_start,
SCHED_TIME (v_node) - e->latency
+ (e->distance * ii));
if (e->data_type == MEM_DEP)
end = MAX (end, SCHED_TIME (v_node) - ii + 1);
}
}
start = late_start;
end = MAX (end, late_start - ii);
step = -1;
}
else if (psp_not_empty && pss_not_empty)
{
int early_start = INT_MIN;
int late_start = INT_MAX;
start = INT_MIN;
end = INT_MAX;
for (e = u_node->in; e != 0; e = e->next_in)
{
ddg_node_ptr v_node = e->src;
if (TEST_BIT (sched_nodes, v_node->cuid))
{
early_start = MAX (early_start,
SCHED_TIME (v_node) + e->latency
- (e->distance * ii));
if (e->data_type == MEM_DEP)
end = MIN (end, SCHED_TIME (v_node) + ii - 1);
}
}
for (e = u_node->out; e != 0; e = e->next_out)
{
ddg_node_ptr v_node = e->dest;
if (TEST_BIT (sched_nodes, v_node->cuid))
{
late_start = MIN (late_start,
SCHED_TIME (v_node) - e->latency
+ (e->distance * ii));
if (e->data_type == MEM_DEP)
start = MAX (start, SCHED_TIME (v_node) - ii + 1);
}
}
start = MAX (start, early_start);
end = MIN (end, MIN (early_start + ii, late_start + 1));
step = 1;
}
else /* psp is empty && pss is empty. */
{
start = SCHED_ASAP (u_node);
end = start + ii;
step = 1;
}
*start_p = start;
*step_p = step;
*end_p = end;
sbitmap_free (psp);
sbitmap_free (pss);
if ((start >= end && step == 1) || (start <= end && step == -1))
return -1;
else
return 0;
}
/* This function implements the scheduling algorithm for SMS according to the
above algorithm. */
static partial_schedule_ptr
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
2006-02-06 19:20:47 +01:00
sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order)
{
int ii = mii;
int i, c, success;
int try_again_with_larger_ii = true;
int num_nodes = g->num_nodes;
ddg_edge_ptr e;
int start, end, step; /* Place together into one struct? */
sbitmap sched_nodes = sbitmap_alloc (num_nodes);
sbitmap must_precede = sbitmap_alloc (num_nodes);
sbitmap must_follow = sbitmap_alloc (num_nodes);
sbitmap tobe_scheduled = sbitmap_alloc (num_nodes);
partial_schedule_ptr ps = create_partial_schedule (ii, g, DFA_HISTORY);
sbitmap_ones (tobe_scheduled);
sbitmap_zero (sched_nodes);
while ((! sbitmap_equal (tobe_scheduled, sched_nodes)
|| try_again_with_larger_ii ) && ii < maxii)
{
int j;
bool unscheduled_nodes = false;
if (dump_file)
fprintf(dump_file, "Starting with ii=%d\n", ii);
if (try_again_with_larger_ii)
{
try_again_with_larger_ii = false;
sbitmap_zero (sched_nodes);
}
for (i = 0; i < num_nodes; i++)
{
int u = nodes_order[i];
ddg_node_ptr u_node = &ps->g->nodes[u];
rtx insn = u_node->insn;
if (!INSN_P (insn))
{
RESET_BIT (tobe_scheduled, u);
continue;
}
if (JUMP_P (insn)) /* Closing branch handled later. */
{
RESET_BIT (tobe_scheduled, u);
continue;
}
if (TEST_BIT (sched_nodes, u))
continue;
/* Try to get non-empty scheduling window. */
j = i;
while (get_sched_window (ps, nodes_order, i, sched_nodes, ii, &start, &step, &end) < 0
&& j > 0)
{
unscheduled_nodes = true;
if (TEST_BIT (NODE_PREDECESSORS (u_node), nodes_order[j - 1])
|| TEST_BIT (NODE_SUCCESSORS (u_node), nodes_order[j - 1]))
{
ps_unschedule_node (ps, &ps->g->nodes[nodes_order[j - 1]]);
RESET_BIT (sched_nodes, nodes_order [j - 1]);
}
j--;
}
if (j < 0)
{
/* ??? Try backtracking instead of immediately ii++? */
ii++;
try_again_with_larger_ii = true;
reset_partial_schedule (ps, ii);
break;
}
/* 2. Try scheduling u in window. */
if (dump_file)
fprintf(dump_file, "Trying to schedule node %d in (%d .. %d) step %d\n",
u, start, end, step);
/* use must_follow & must_precede bitmaps to determine order
of nodes within the cycle. */
sbitmap_zero (must_precede);
sbitmap_zero (must_follow);
for (e = u_node->in; e != 0; e = e->next_in)
if (TEST_BIT (sched_nodes, e->src->cuid)
&& e->latency == (ii * e->distance)
&& start == SCHED_TIME (e->src))
SET_BIT (must_precede, e->src->cuid);
for (e = u_node->out; e != 0; e = e->next_out)
if (TEST_BIT (sched_nodes, e->dest->cuid)
&& e->latency == (ii * e->distance)
&& end == SCHED_TIME (e->dest))
SET_BIT (must_follow, e->dest->cuid);
success = 0;
if ((step > 0 && start < end) || (step < 0 && start > end))
for (c = start; c != end; c += step)
{
ps_insn_ptr psi;
psi = ps_add_node_check_conflicts (ps, u_node, c,
must_precede,
must_follow);
if (psi)
{
SCHED_TIME (u_node) = c;
SET_BIT (sched_nodes, u);
success = 1;
if (dump_file)
fprintf(dump_file, "Schedule in %d\n", c);
break;
}
}
if (!success)
{
/* ??? Try backtracking instead of immediately ii++? */
ii++;
try_again_with_larger_ii = true;
reset_partial_schedule (ps, ii);
break;
}
if (unscheduled_nodes)
break;
/* ??? If (success), check register pressure estimates. */
} /* Continue with next node. */
} /* While try_again_with_larger_ii. */
sbitmap_free (sched_nodes);
sbitmap_free (must_precede);
sbitmap_free (must_follow);
sbitmap_free (tobe_scheduled);
if (ii >= maxii)
{
free_partial_schedule (ps);
ps = NULL;
}
return ps;
}
/* This page implements the algorithm for ordering the nodes of a DDG
for modulo scheduling, activated through the
"int sms_order_nodes (ddg_ptr, int mii, int * result)" API. */
#define ORDER_PARAMS(x) ((struct node_order_params *) (x)->aux.info)
#define ASAP(x) (ORDER_PARAMS ((x))->asap)
#define ALAP(x) (ORDER_PARAMS ((x))->alap)
#define HEIGHT(x) (ORDER_PARAMS ((x))->height)
#define MOB(x) (ALAP ((x)) - ASAP ((x)))
#define DEPTH(x) (ASAP ((x)))
typedef struct node_order_params * nopa;
static void order_nodes_of_sccs (ddg_all_sccs_ptr, int * result);
static int order_nodes_in_scc (ddg_ptr, sbitmap, sbitmap, int*, int);
static nopa calculate_order_params (ddg_ptr, int mii);
static int find_max_asap (ddg_ptr, sbitmap);
static int find_max_hv_min_mob (ddg_ptr, sbitmap);
static int find_max_dv_min_mob (ddg_ptr, sbitmap);
enum sms_direction {BOTTOMUP, TOPDOWN};
struct node_order_params
{
int asap;
int alap;
int height;
};
/* Check if NODE_ORDER contains a permutation of 0 .. NUM_NODES-1. */
static void
check_nodes_order (int *node_order, int num_nodes)
{
int i;
sbitmap tmp = sbitmap_alloc (num_nodes);
sbitmap_zero (tmp);
for (i = 0; i < num_nodes; i++)
{
int u = node_order[i];
alias.c (true_dependence): Remove 'abort' from comments. * alias.c (true_dependence): Remove 'abort' from comments. Use gcc_assert and gcc_unreachable as appropriate. (canon_true_dependence): Likewise. * bb-reorder.c (connect_traces): Likewise. * c-common.c (c_add_case_label): Likewise. * c-decl.c (finish_function): Likewise. * caller-save.c (insert_restore, insert_save): Likewise. * cfg.c (update_bb_profile_for_threading): Likewise. * cfganal.c (flow_active_insn_p): Likewise. * cfgexpand.c (add_reg_br_prob_note): Likewise. * cfgrtl.c (rtl_redirect_edge_and_branch_force, rtl_split_edge, cfg_layout_merge_blocks): Likewise. * ifcvt.c (cond_exec_process_insns, merge_if_block, find_if_block): Likewise. * integrate.c (allocate_initial_values): Likewise. * jump.c (reverse_condition, reverse_condition_maybe_unordered, swap_condition, unsigned_condition, signed_condition, mark_jump_label, invert_jump_1, rtx_renumbered_equal_p, reg_or_subregno): Likewise. * lambda-code.c (lambda_compute_auxillary_space, lambda_transform_legal_p): Likewise. * lambda-mat.c (lambda_matrix_inverse_hard): Likewise. * langhooks.c (lhd_set_decl_assembler_name, lhd_type_promotes_to, lhd_incomplete_type_error, lhd_expand_expr, lhd_types_compatible_p, lhd_tree_size): Likewise. * lcm.c (create_pre_exit, optimize_mode_switching): Likewise. * local-alloc.c (update_equiv_regs): Likewise. * loop-unroll.c (peel_loop_completely unroll_loop_constant_iterations, unroll_loop_runtime_iterations, peel_loop_simple, unroll_loop_stupid, analyze_iv_to_split_insn): Likewise. * loop.c (gen_prefetch, find_and_verify_loops, basic_induction_var): Likewise. * modulo-sched.c (normalize_sched_times, check_nodes_order): Likewise. * value-prof.c (tree_find_values_to_profile): Likewise. * varasm.c (named_section, default_assemble_integer, decode_addr_const): Likewise. From-SVN: r98508
2005-04-21 17:47:33 +02:00
gcc_assert (u < num_nodes && u >= 0 && !TEST_BIT (tmp, u));
SET_BIT (tmp, u);
}
sbitmap_free (tmp);
}
/* Order the nodes of G for scheduling and pass the result in
NODE_ORDER. Also set aux.count of each node to ASAP.
Return the recMII for the given DDG. */
static int
sms_order_nodes (ddg_ptr g, int mii, int * node_order)
{
int i;
int rec_mii = 0;
ddg_all_sccs_ptr sccs = create_ddg_all_sccs (g);
nopa nops = calculate_order_params (g, mii);
order_nodes_of_sccs (sccs, node_order);
if (sccs->num_sccs > 0)
/* First SCC has the largest recurrence_length. */
rec_mii = sccs->sccs[0]->recurrence_length;
/* Save ASAP before destroying node_order_params. */
for (i = 0; i < g->num_nodes; i++)
{
ddg_node_ptr v = &g->nodes[i];
v->aux.count = ASAP (v);
}
free (nops);
free_ddg_all_sccs (sccs);
check_nodes_order (node_order, g->num_nodes);
return rec_mii;
}
static void
order_nodes_of_sccs (ddg_all_sccs_ptr all_sccs, int * node_order)
{
int i, pos = 0;
ddg_ptr g = all_sccs->ddg;
int num_nodes = g->num_nodes;
sbitmap prev_sccs = sbitmap_alloc (num_nodes);
sbitmap on_path = sbitmap_alloc (num_nodes);
sbitmap tmp = sbitmap_alloc (num_nodes);
sbitmap ones = sbitmap_alloc (num_nodes);
sbitmap_zero (prev_sccs);
sbitmap_ones (ones);
/* Perfrom the node ordering starting from the SCC with the highest recMII.
For each SCC order the nodes according to their ASAP/ALAP/HEIGHT etc. */
for (i = 0; i < all_sccs->num_sccs; i++)
{
ddg_scc_ptr scc = all_sccs->sccs[i];
/* Add nodes on paths from previous SCCs to the current SCC. */
find_nodes_on_paths (on_path, g, prev_sccs, scc->nodes);
sbitmap_a_or_b (tmp, scc->nodes, on_path);
/* Add nodes on paths from the current SCC to previous SCCs. */
find_nodes_on_paths (on_path, g, scc->nodes, prev_sccs);
sbitmap_a_or_b (tmp, tmp, on_path);
/* Remove nodes of previous SCCs from current extended SCC. */
sbitmap_difference (tmp, tmp, prev_sccs);
pos = order_nodes_in_scc (g, prev_sccs, tmp, node_order, pos);
/* Above call to order_nodes_in_scc updated prev_sccs |= tmp. */
}
/* Handle the remaining nodes that do not belong to any scc. Each call
to order_nodes_in_scc handles a single connected component. */
while (pos < g->num_nodes)
{
sbitmap_difference (tmp, ones, prev_sccs);
pos = order_nodes_in_scc (g, prev_sccs, tmp, node_order, pos);
}
sbitmap_free (prev_sccs);
sbitmap_free (on_path);
sbitmap_free (tmp);
sbitmap_free (ones);
}
/* MII is needed if we consider backarcs (that do not close recursive cycles). */
static struct node_order_params *
calculate_order_params (ddg_ptr g, int mii ATTRIBUTE_UNUSED)
{
int u;
int max_asap;
int num_nodes = g->num_nodes;
ddg_edge_ptr e;
/* Allocate a place to hold ordering params for each node in the DDG. */
nopa node_order_params_arr;
/* Initialize of ASAP/ALAP/HEIGHT to zero. */
node_order_params_arr = (nopa) xcalloc (num_nodes,
sizeof (struct node_order_params));
/* Set the aux pointer of each node to point to its order_params structure. */
for (u = 0; u < num_nodes; u++)
g->nodes[u].aux.info = &node_order_params_arr[u];
/* Disregarding a backarc from each recursive cycle to obtain a DAG,
calculate ASAP, ALAP, mobility, distance, and height for each node
in the dependence (direct acyclic) graph. */
/* We assume that the nodes in the array are in topological order. */
max_asap = 0;
for (u = 0; u < num_nodes; u++)
{
ddg_node_ptr u_node = &g->nodes[u];
ASAP (u_node) = 0;
for (e = u_node->in; e; e = e->next_in)
if (e->distance == 0)
ASAP (u_node) = MAX (ASAP (u_node),
ASAP (e->src) + e->latency);
max_asap = MAX (max_asap, ASAP (u_node));
}
for (u = num_nodes - 1; u > -1; u--)
{
ddg_node_ptr u_node = &g->nodes[u];
ALAP (u_node) = max_asap;
HEIGHT (u_node) = 0;
for (e = u_node->out; e; e = e->next_out)
if (e->distance == 0)
{
ALAP (u_node) = MIN (ALAP (u_node),
ALAP (e->dest) - e->latency);
HEIGHT (u_node) = MAX (HEIGHT (u_node),
HEIGHT (e->dest) + e->latency);
}
}
return node_order_params_arr;
}
static int
find_max_asap (ddg_ptr g, sbitmap nodes)
{
unsigned int u = 0;
int max_asap = -1;
int result = -1;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
if (max_asap < ASAP (u_node))
{
max_asap = ASAP (u_node);
result = u;
}
}
return result;
}
static int
find_max_hv_min_mob (ddg_ptr g, sbitmap nodes)
{
unsigned int u = 0;
int max_hv = -1;
int min_mob = INT_MAX;
int result = -1;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
if (max_hv < HEIGHT (u_node))
{
max_hv = HEIGHT (u_node);
min_mob = MOB (u_node);
result = u;
}
else if ((max_hv == HEIGHT (u_node))
&& (min_mob > MOB (u_node)))
{
min_mob = MOB (u_node);
result = u;
}
}
return result;
}
static int
find_max_dv_min_mob (ddg_ptr g, sbitmap nodes)
{
unsigned int u = 0;
int max_dv = -1;
int min_mob = INT_MAX;
int result = -1;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
if (max_dv < DEPTH (u_node))
{
max_dv = DEPTH (u_node);
min_mob = MOB (u_node);
result = u;
}
else if ((max_dv == DEPTH (u_node))
&& (min_mob > MOB (u_node)))
{
min_mob = MOB (u_node);
result = u;
}
}
return result;
}
/* Places the nodes of SCC into the NODE_ORDER array starting
at position POS, according to the SMS ordering algorithm.
NODES_ORDERED (in&out parameter) holds the bitset of all nodes in
the NODE_ORDER array, starting from position zero. */
static int
order_nodes_in_scc (ddg_ptr g, sbitmap nodes_ordered, sbitmap scc,
int * node_order, int pos)
{
enum sms_direction dir;
int num_nodes = g->num_nodes;
sbitmap workset = sbitmap_alloc (num_nodes);
sbitmap tmp = sbitmap_alloc (num_nodes);
sbitmap zero_bitmap = sbitmap_alloc (num_nodes);
sbitmap predecessors = sbitmap_alloc (num_nodes);
sbitmap successors = sbitmap_alloc (num_nodes);
sbitmap_zero (predecessors);
find_predecessors (predecessors, g, nodes_ordered);
sbitmap_zero (successors);
find_successors (successors, g, nodes_ordered);
sbitmap_zero (tmp);
if (sbitmap_a_and_b_cg (tmp, predecessors, scc))
{
sbitmap_copy (workset, tmp);
dir = BOTTOMUP;
}
else if (sbitmap_a_and_b_cg (tmp, successors, scc))
{
sbitmap_copy (workset, tmp);
dir = TOPDOWN;
}
else
{
int u;
sbitmap_zero (workset);
if ((u = find_max_asap (g, scc)) >= 0)
SET_BIT (workset, u);
dir = BOTTOMUP;
}
sbitmap_zero (zero_bitmap);
while (!sbitmap_equal (workset, zero_bitmap))
{
int v;
ddg_node_ptr v_node;
sbitmap v_node_preds;
sbitmap v_node_succs;
if (dir == TOPDOWN)
{
while (!sbitmap_equal (workset, zero_bitmap))
{
v = find_max_hv_min_mob (g, workset);
v_node = &g->nodes[v];
node_order[pos++] = v;
v_node_succs = NODE_SUCCESSORS (v_node);
sbitmap_a_and_b (tmp, v_node_succs, scc);
/* Don't consider the already ordered successors again. */
sbitmap_difference (tmp, tmp, nodes_ordered);
sbitmap_a_or_b (workset, workset, tmp);
RESET_BIT (workset, v);
SET_BIT (nodes_ordered, v);
}
dir = BOTTOMUP;
sbitmap_zero (predecessors);
find_predecessors (predecessors, g, nodes_ordered);
sbitmap_a_and_b (workset, predecessors, scc);
}
else
{
while (!sbitmap_equal (workset, zero_bitmap))
{
v = find_max_dv_min_mob (g, workset);
v_node = &g->nodes[v];
node_order[pos++] = v;
v_node_preds = NODE_PREDECESSORS (v_node);
sbitmap_a_and_b (tmp, v_node_preds, scc);
/* Don't consider the already ordered predecessors again. */
sbitmap_difference (tmp, tmp, nodes_ordered);
sbitmap_a_or_b (workset, workset, tmp);
RESET_BIT (workset, v);
SET_BIT (nodes_ordered, v);
}
dir = TOPDOWN;
sbitmap_zero (successors);
find_successors (successors, g, nodes_ordered);
sbitmap_a_and_b (workset, successors, scc);
}
}
sbitmap_free (tmp);
sbitmap_free (workset);
sbitmap_free (zero_bitmap);
sbitmap_free (predecessors);
sbitmap_free (successors);
return pos;
}
/* This page contains functions for manipulating partial-schedules during
modulo scheduling. */
/* Create a partial schedule and allocate a memory to hold II rows. */
static partial_schedule_ptr
create_partial_schedule (int ii, ddg_ptr g, int history)
{
tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-31 20:56:55 +01:00
partial_schedule_ptr ps = XNEW (struct partial_schedule);
ps->rows = (ps_insn_ptr *) xcalloc (ii, sizeof (ps_insn_ptr));
ps->ii = ii;
ps->history = history;
ps->min_cycle = INT_MAX;
ps->max_cycle = INT_MIN;
ps->g = g;
return ps;
}
/* Free the PS_INSNs in rows array of the given partial schedule.
??? Consider caching the PS_INSN's. */
static void
free_ps_insns (partial_schedule_ptr ps)
{
int i;
for (i = 0; i < ps->ii; i++)
{
while (ps->rows[i])
{
ps_insn_ptr ps_insn = ps->rows[i]->next_in_row;
free (ps->rows[i]);
ps->rows[i] = ps_insn;
}
ps->rows[i] = NULL;
}
}
/* Free all the memory allocated to the partial schedule. */
static void
free_partial_schedule (partial_schedule_ptr ps)
{
if (!ps)
return;
free_ps_insns (ps);
free (ps->rows);
free (ps);
}
/* Clear the rows array with its PS_INSNs, and create a new one with
NEW_II rows. */
static void
reset_partial_schedule (partial_schedule_ptr ps, int new_ii)
{
if (!ps)
return;
free_ps_insns (ps);
if (new_ii == ps->ii)
return;
ps->rows = (ps_insn_ptr *) xrealloc (ps->rows, new_ii
* sizeof (ps_insn_ptr));
memset (ps->rows, 0, new_ii * sizeof (ps_insn_ptr));
ps->ii = new_ii;
ps->min_cycle = INT_MAX;
ps->max_cycle = INT_MIN;
}
/* Prints the partial schedule as an ii rows array, for each rows
print the ids of the insns in it. */
void
print_partial_schedule (partial_schedule_ptr ps, FILE *dump)
{
int i;
for (i = 0; i < ps->ii; i++)
{
ps_insn_ptr ps_i = ps->rows[i];
fprintf (dump, "\n[CYCLE %d ]: ", i);
while (ps_i)
{
fprintf (dump, "%d, ",
INSN_UID (ps_i->node->insn));
ps_i = ps_i->next_in_row;
}
}
}
/* Creates an object of PS_INSN and initializes it to the given parameters. */
static ps_insn_ptr
create_ps_insn (ddg_node_ptr node, int rest_count, int cycle)
{
tree-vrp.c: Use XNEW/XCNEW allocation wrappers. 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-31 20:56:55 +01:00
ps_insn_ptr ps_i = XNEW (struct ps_insn);
ps_i->node = node;
ps_i->next_in_row = NULL;
ps_i->prev_in_row = NULL;
ps_i->row_rest_count = rest_count;
ps_i->cycle = cycle;
return ps_i;
}
/* Removes the given PS_INSN from the partial schedule. Returns false if the
node is not found in the partial schedule, else returns true. */
static bool
remove_node_from_ps (partial_schedule_ptr ps, ps_insn_ptr ps_i)
{
int row;
if (!ps || !ps_i)
return false;
row = SMODULO (ps_i->cycle, ps->ii);
if (! ps_i->prev_in_row)
{
if (ps_i != ps->rows[row])
return false;
ps->rows[row] = ps_i->next_in_row;
if (ps->rows[row])
ps->rows[row]->prev_in_row = NULL;
}
else
{
ps_i->prev_in_row->next_in_row = ps_i->next_in_row;
if (ps_i->next_in_row)
ps_i->next_in_row->prev_in_row = ps_i->prev_in_row;
}
free (ps_i);
return true;
}
/* Unlike what literature describes for modulo scheduling (which focuses
on VLIW machines) the order of the instructions inside a cycle is
important. Given the bitmaps MUST_FOLLOW and MUST_PRECEDE we know
where the current instruction should go relative to the already
scheduled instructions in the given cycle. Go over these
instructions and find the first possible column to put it in. */
static bool
ps_insn_find_column (partial_schedule_ptr ps, ps_insn_ptr ps_i,
sbitmap must_precede, sbitmap must_follow)
{
ps_insn_ptr next_ps_i;
ps_insn_ptr first_must_follow = NULL;
ps_insn_ptr last_must_precede = NULL;
int row;
if (! ps_i)
return false;
row = SMODULO (ps_i->cycle, ps->ii);
/* Find the first must follow and the last must precede
and insert the node immediately after the must precede
but make sure that it there is no must follow after it. */
for (next_ps_i = ps->rows[row];
next_ps_i;
next_ps_i = next_ps_i->next_in_row)
{
if (TEST_BIT (must_follow, next_ps_i->node->cuid)
&& ! first_must_follow)
first_must_follow = next_ps_i;
if (TEST_BIT (must_precede, next_ps_i->node->cuid))
{
/* If we have already met a node that must follow, then
there is no possible column. */
if (first_must_follow)
return false;
else
last_must_precede = next_ps_i;
}
}
/* Now insert the node after INSERT_AFTER_PSI. */
if (! last_must_precede)
{
ps_i->next_in_row = ps->rows[row];
ps_i->prev_in_row = NULL;
if (ps_i->next_in_row)
ps_i->next_in_row->prev_in_row = ps_i;
ps->rows[row] = ps_i;
}
else
{
ps_i->next_in_row = last_must_precede->next_in_row;
last_must_precede->next_in_row = ps_i;
ps_i->prev_in_row = last_must_precede;
if (ps_i->next_in_row)
ps_i->next_in_row->prev_in_row = ps_i;
}
return true;
}
/* Advances the PS_INSN one column in its current row; returns false
in failure and true in success. Bit N is set in MUST_FOLLOW if
the node with cuid N must be come after the node pointed to by
PS_I when scheduled in the same cycle. */
static int
ps_insn_advance_column (partial_schedule_ptr ps, ps_insn_ptr ps_i,
sbitmap must_follow)
{
ps_insn_ptr prev, next;
int row;
ddg_node_ptr next_node;
if (!ps || !ps_i)
return false;
row = SMODULO (ps_i->cycle, ps->ii);
if (! ps_i->next_in_row)
return false;
next_node = ps_i->next_in_row->node;
/* Check if next_in_row is dependent on ps_i, both having same sched
times (typically ANTI_DEP). If so, ps_i cannot skip over it. */
if (TEST_BIT (must_follow, next_node->cuid))
return false;
/* Advance PS_I over its next_in_row in the doubly linked list. */
prev = ps_i->prev_in_row;
next = ps_i->next_in_row;
if (ps_i == ps->rows[row])
ps->rows[row] = next;
ps_i->next_in_row = next->next_in_row;
if (next->next_in_row)
next->next_in_row->prev_in_row = ps_i;
next->next_in_row = ps_i;
ps_i->prev_in_row = next;
next->prev_in_row = prev;
if (prev)
prev->next_in_row = next;
return true;
}
/* Inserts a DDG_NODE to the given partial schedule at the given cycle.
Returns 0 if this is not possible and a PS_INSN otherwise. Bit N is
set in MUST_PRECEDE/MUST_FOLLOW if the node with cuid N must be come
before/after (respectively) the node pointed to by PS_I when scheduled
in the same cycle. */
static ps_insn_ptr
add_node_to_ps (partial_schedule_ptr ps, ddg_node_ptr node, int cycle,
sbitmap must_precede, sbitmap must_follow)
{
ps_insn_ptr ps_i;
int rest_count = 1;
int row = SMODULO (cycle, ps->ii);
if (ps->rows[row]
&& ps->rows[row]->row_rest_count >= issue_rate)
return NULL;
if (ps->rows[row])
rest_count += ps->rows[row]->row_rest_count;
ps_i = create_ps_insn (node, rest_count, cycle);
/* Finds and inserts PS_I according to MUST_FOLLOW and
MUST_PRECEDE. */
if (! ps_insn_find_column (ps, ps_i, must_precede, must_follow))
{
free (ps_i);
return NULL;
}
return ps_i;
}
/* Advance time one cycle. Assumes DFA is being used. */
static void
advance_one_cycle (void)
{
genattr.c (struct range, [...]): Remove them. 2004-07-19 Paolo Bonzini <bonzini@gnu.org> * genattr.c (struct range, struct function_unit, write_units, extend_range, init_range): Remove them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. Output "#define INSN_SCHEDULING" here. * genattrtab.c (struct range, struct function_unit_op, struct function_unit, struct dimension, enum operator, operate_exp, expand_units, simplify_knowing, encode_units_mask, simplify_by_exploding, find_and_mark_used_attributes, unmark_used_attributes, add_values_to_cover, increment_current_value, test_for_current_value, simplify_with_current_value, simplify_with_current_value_aux, gen_unit, write_unit_name, write_function_unit_info, write_complex_function, write_toplevel_expr, find_single_value, extend_range): Remove. (write_attr_get): Do not handle common_av->value being an FFS. (struct attr_desc): Remove func_units_p and blockage_p. (write_attr_valueq): Do not handle them. (find_attr): Do not clear them. (make_internal_attr): Do not initialize them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. * sched-vis.c (init_target_units, insn_print_units, init_block_visualization, print_block_visualization, visualize_scheduled_insns, visualize_no_unit, visualize_stall_cycles, visualize_alloc, visualize_free, target_units, get_visual_tbl_length, MAX_VISUAL_LINES, INSN_LEN, n_visual_lines, visual_tbl_line_length, visual_tbl, n_vis_no_unit, MAX_VISUAL_NO_UNIT, vis_no_unit): Remove. * haifa-sched.c (blockage_range, clear_units, schedule_unit, actual_hazard, potential_hazard, insn_unit, unit_last_insn, unit_tick, actual_hazard_this_instance, potential_hazard, schedule_unit, max_insn_queue_index_value): Remove. (MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to max_insn_queue_index. * rtl.def (DEFINE_FUNCTION_UNIT): Remove. * doc/md.texi (Processor pipeline description): Remove references to old pipeline descriptions. (Automaton pipeline description): Merge with the above. (Old pipeline description, Comparison of the two descriptions): Remove. * bt-load.c (migrate_btr_def): Remove references to use_pipeline_interface. * haifa-sched.c (insn_cost, schedule_insn, schedule_block, advance_one_cycle, sched_init, queue_to_ready, sched_finish): Likewise. * modulo-sched.c (sms_schedule, advance_one_cycle, ps_has_conflicts): Likewise. * sched-rgn.c (init_ready): Likewise. (debug_dependencies): Likewise, and remove an "if (1)". * target.h (use_dfa_pipeline_interface): Remove. * config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. From-SVN: r84944
2004-07-20 09:27:18 +02:00
if (targetm.sched.dfa_pre_cycle_insn)
state_transition (curr_state,
targetm.sched.dfa_pre_cycle_insn ());
genattr.c (struct range, [...]): Remove them. 2004-07-19 Paolo Bonzini <bonzini@gnu.org> * genattr.c (struct range, struct function_unit, write_units, extend_range, init_range): Remove them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. Output "#define INSN_SCHEDULING" here. * genattrtab.c (struct range, struct function_unit_op, struct function_unit, struct dimension, enum operator, operate_exp, expand_units, simplify_knowing, encode_units_mask, simplify_by_exploding, find_and_mark_used_attributes, unmark_used_attributes, add_values_to_cover, increment_current_value, test_for_current_value, simplify_with_current_value, simplify_with_current_value_aux, gen_unit, write_unit_name, write_function_unit_info, write_complex_function, write_toplevel_expr, find_single_value, extend_range): Remove. (write_attr_get): Do not handle common_av->value being an FFS. (struct attr_desc): Remove func_units_p and blockage_p. (write_attr_valueq): Do not handle them. (find_attr): Do not clear them. (make_internal_attr): Do not initialize them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. * sched-vis.c (init_target_units, insn_print_units, init_block_visualization, print_block_visualization, visualize_scheduled_insns, visualize_no_unit, visualize_stall_cycles, visualize_alloc, visualize_free, target_units, get_visual_tbl_length, MAX_VISUAL_LINES, INSN_LEN, n_visual_lines, visual_tbl_line_length, visual_tbl, n_vis_no_unit, MAX_VISUAL_NO_UNIT, vis_no_unit): Remove. * haifa-sched.c (blockage_range, clear_units, schedule_unit, actual_hazard, potential_hazard, insn_unit, unit_last_insn, unit_tick, actual_hazard_this_instance, potential_hazard, schedule_unit, max_insn_queue_index_value): Remove. (MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to max_insn_queue_index. * rtl.def (DEFINE_FUNCTION_UNIT): Remove. * doc/md.texi (Processor pipeline description): Remove references to old pipeline descriptions. (Automaton pipeline description): Merge with the above. (Old pipeline description, Comparison of the two descriptions): Remove. * bt-load.c (migrate_btr_def): Remove references to use_pipeline_interface. * haifa-sched.c (insn_cost, schedule_insn, schedule_block, advance_one_cycle, sched_init, queue_to_ready, sched_finish): Likewise. * modulo-sched.c (sms_schedule, advance_one_cycle, ps_has_conflicts): Likewise. * sched-rgn.c (init_ready): Likewise. (debug_dependencies): Likewise, and remove an "if (1)". * target.h (use_dfa_pipeline_interface): Remove. * config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. From-SVN: r84944
2004-07-20 09:27:18 +02:00
state_transition (curr_state, NULL);
genattr.c (struct range, [...]): Remove them. 2004-07-19 Paolo Bonzini <bonzini@gnu.org> * genattr.c (struct range, struct function_unit, write_units, extend_range, init_range): Remove them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. Output "#define INSN_SCHEDULING" here. * genattrtab.c (struct range, struct function_unit_op, struct function_unit, struct dimension, enum operator, operate_exp, expand_units, simplify_knowing, encode_units_mask, simplify_by_exploding, find_and_mark_used_attributes, unmark_used_attributes, add_values_to_cover, increment_current_value, test_for_current_value, simplify_with_current_value, simplify_with_current_value_aux, gen_unit, write_unit_name, write_function_unit_info, write_complex_function, write_toplevel_expr, find_single_value, extend_range): Remove. (write_attr_get): Do not handle common_av->value being an FFS. (struct attr_desc): Remove func_units_p and blockage_p. (write_attr_valueq): Do not handle them. (find_attr): Do not clear them. (make_internal_attr): Do not initialize them. (main): Remove code dealing with DEFINE_FUNCTION_UNIT. * sched-vis.c (init_target_units, insn_print_units, init_block_visualization, print_block_visualization, visualize_scheduled_insns, visualize_no_unit, visualize_stall_cycles, visualize_alloc, visualize_free, target_units, get_visual_tbl_length, MAX_VISUAL_LINES, INSN_LEN, n_visual_lines, visual_tbl_line_length, visual_tbl, n_vis_no_unit, MAX_VISUAL_NO_UNIT, vis_no_unit): Remove. * haifa-sched.c (blockage_range, clear_units, schedule_unit, actual_hazard, potential_hazard, insn_unit, unit_last_insn, unit_tick, actual_hazard_this_instance, potential_hazard, schedule_unit, max_insn_queue_index_value): Remove. (MAX_INSN_QUEUE_INDEX): Removed, renamed throughout to max_insn_queue_index. * rtl.def (DEFINE_FUNCTION_UNIT): Remove. * doc/md.texi (Processor pipeline description): Remove references to old pipeline descriptions. (Automaton pipeline description): Merge with the above. (Old pipeline description, Comparison of the two descriptions): Remove. * bt-load.c (migrate_btr_def): Remove references to use_pipeline_interface. * haifa-sched.c (insn_cost, schedule_insn, schedule_block, advance_one_cycle, sched_init, queue_to_ready, sched_finish): Likewise. * modulo-sched.c (sms_schedule, advance_one_cycle, ps_has_conflicts): Likewise. * sched-rgn.c (init_ready): Likewise. (debug_dependencies): Likewise, and remove an "if (1)". * target.h (use_dfa_pipeline_interface): Remove. * config/alpha/alpha.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arc/arc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/arm/arm.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/c4x/c4x.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/frv/frv.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/i386/i386.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/ia64/ia64.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/iq2000/iq2000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/m32r/m32r.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mcore/mcore.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/mips/mips.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/pa/pa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/rs6000/rs6000.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/s390/s390.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sh/sh.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/sparc/sparc.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/v850/v850.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * config/xtensa/xtensa.c (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. * doc/tm.texi (TARGET_USE_DFA_PIPELINE_INTERFACE): Remove. From-SVN: r84944
2004-07-20 09:27:18 +02:00
if (targetm.sched.dfa_post_cycle_insn)
state_transition (curr_state,
targetm.sched.dfa_post_cycle_insn ());
}
/* Given the kernel of a loop (from FIRST_INSN to LAST_INSN), finds
the number of cycles according to DFA that the kernel fits in,
we use this to check if we done well with SMS after we add
register moves. In some cases register moves overhead makes
it even worse than the original loop. We want SMS to be performed
when it gives less cycles after register moves are added. */
static int
kernel_number_of_cycles (rtx first_insn, rtx last_insn)
{
int cycles = 0;
rtx insn;
int can_issue_more = issue_rate;
state_reset (curr_state);
for (insn = first_insn;
insn != NULL_RTX && insn != last_insn;
insn = NEXT_INSN (insn))
{
if (! INSN_P (insn) || GET_CODE (PATTERN (insn)) == USE)
continue;
/* Check if there is room for the current insn. */
if (!can_issue_more || state_dead_lock_p (curr_state))
{
cycles ++;
advance_one_cycle ();
can_issue_more = issue_rate;
}
/* Update the DFA state and return with failure if the DFA found
recource conflicts. */
if (state_transition (curr_state, insn) >= 0)
{
cycles ++;
advance_one_cycle ();
can_issue_more = issue_rate;
}
if (targetm.sched.variable_issue)
can_issue_more =
targetm.sched.variable_issue (sched_dump, sched_verbose,
insn, can_issue_more);
/* A naked CLOBBER or USE generates no instruction, so don't
let them consume issue slots. */
else if (GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER)
can_issue_more--;
}
return cycles;
}
/* Checks if PS has resource conflicts according to DFA, starting from
FROM cycle to TO cycle; returns true if there are conflicts and false
if there are no conflicts. Assumes DFA is being used. */
static int
ps_has_conflicts (partial_schedule_ptr ps, int from, int to)
{
int cycle;
state_reset (curr_state);
for (cycle = from; cycle <= to; cycle++)
{
ps_insn_ptr crr_insn;
/* Holds the remaining issue slots in the current row. */
int can_issue_more = issue_rate;
/* Walk through the DFA for the current row. */
for (crr_insn = ps->rows[SMODULO (cycle, ps->ii)];
crr_insn;
crr_insn = crr_insn->next_in_row)
{
rtx insn = crr_insn->node->insn;
if (!INSN_P (insn))
continue;
/* Check if there is room for the current insn. */
if (!can_issue_more || state_dead_lock_p (curr_state))
return true;
/* Update the DFA state and return with failure if the DFA found
recource conflicts. */
if (state_transition (curr_state, insn) >= 0)
return true;
if (targetm.sched.variable_issue)
can_issue_more =
targetm.sched.variable_issue (sched_dump, sched_verbose,
insn, can_issue_more);
/* A naked CLOBBER or USE generates no instruction, so don't
let them consume issue slots. */
else if (GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER)
can_issue_more--;
}
/* Advance the DFA to the next cycle. */
advance_one_cycle ();
}
return false;
}
/* Checks if the given node causes resource conflicts when added to PS at
cycle C. If not the node is added to PS and returned; otherwise zero
is returned. Bit N is set in MUST_PRECEDE/MUST_FOLLOW if the node with
cuid N must be come before/after (respectively) the node pointed to by
PS_I when scheduled in the same cycle. */
ps_insn_ptr
ps_add_node_check_conflicts (partial_schedule_ptr ps, ddg_node_ptr n,
int c, sbitmap must_precede,
sbitmap must_follow)
{
int has_conflicts = 0;
ps_insn_ptr ps_i;
/* First add the node to the PS, if this succeeds check for
conflicts, trying different issue slots in the same row. */
if (! (ps_i = add_node_to_ps (ps, n, c, must_precede, must_follow)))
return NULL; /* Failed to insert the node at the given cycle. */
has_conflicts = ps_has_conflicts (ps, c, c)
|| (ps->history > 0
&& ps_has_conflicts (ps,
c - ps->history,
c + ps->history));
/* Try different issue slots to find one that the given node can be
scheduled in without conflicts. */
while (has_conflicts)
{
if (! ps_insn_advance_column (ps, ps_i, must_follow))
break;
has_conflicts = ps_has_conflicts (ps, c, c)
|| (ps->history > 0
&& ps_has_conflicts (ps,
c - ps->history,
c + ps->history));
}
if (has_conflicts)
{
remove_node_from_ps (ps, ps_i);
return NULL;
}
ps->min_cycle = MIN (ps->min_cycle, c);
ps->max_cycle = MAX (ps->max_cycle, c);
return ps_i;
}
/* Rotate the rows of PS such that insns scheduled at time
START_CYCLE will appear in row 0. Updates max/min_cycles. */
void
rotate_partial_schedule (partial_schedule_ptr ps, int start_cycle)
{
int i, row, backward_rotates;
int last_row = ps->ii - 1;
if (start_cycle == 0)
return;
backward_rotates = SMODULO (start_cycle, ps->ii);
/* Revisit later and optimize this into a single loop. */
for (i = 0; i < backward_rotates; i++)
{
ps_insn_ptr first_row = ps->rows[0];
for (row = 0; row < last_row; row++)
ps->rows[row] = ps->rows[row+1];
ps->rows[last_row] = first_row;
}
ps->max_cycle -= start_cycle;
ps->min_cycle -= start_cycle;
}
/* Remove the node N from the partial schedule PS; because we restart the DFA
each time we want to check for resource conflicts; this is equivalent to
unscheduling the node N. */
static bool
ps_unschedule_node (partial_schedule_ptr ps, ddg_node_ptr n)
{
ps_insn_ptr ps_i;
int row = SMODULO (SCHED_TIME (n), ps->ii);
if (row < 0 || row > ps->ii)
return false;
for (ps_i = ps->rows[row];
ps_i && ps_i->node != n;
ps_i = ps_i->next_in_row);
if (!ps_i)
return false;
return remove_node_from_ps (ps, ps_i);
}
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
#endif /* INSN_SCHEDULING */
static bool
gate_handle_sms (void)
{
return (optimize > 0 && flag_modulo_sched);
}
/* Run instruction scheduler. */
/* Perform SMS module scheduling. */
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
static unsigned int
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
rest_of_handle_sms (void)
{
#ifdef INSN_SCHEDULING
basic_block bb;
/* We want to be able to create new pseudos. */
no_new_pseudos = 0;
/* Collect loop information to be used in SMS. */
cfg_layout_initialize (CLEANUP_UPDATE_LIFE);
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
2006-02-06 19:20:47 +01:00
sms_schedule ();
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
/* Update the life information, because we add pseudos. */
max_regno = max_reg_num ();
allocate_reg_info (max_regno, FALSE, FALSE);
df.h (DF_SCAN, [...]): New macros. 2005-01-11 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN, DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN, DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS, DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO, DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT, DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN, DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO, DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO, DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN, DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG, DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P, DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P, DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET, DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET, DF_REG_USE_GET, DF_REG_USE_SET, DF_REGNO_FIRST_DEF, DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET, DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES, DF_INSN_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS, DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC): New macros. (df_flow_dir, df_ref_type, df_ref_flags, df_alloc_function, df_free_bb_function, df_local_compute_function, df_init_function, df_dataflow_function, df_confluence_function_0, df_confluence_function_n, df_transfer_function, df_finalizer_function, df_free_function, df_dump_problem_function, df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link, df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info, df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info, df_urec_bb_info, ) New types. (df_invalidated_by_call, df_all_hard_regs, df_state) New public variables. (df_init, df_add_problem, df_set_blocks, df_finish, df_analyze, df_analyze_simple_change_some_blocks, df_analyze_simple_change_one_block, df_compact_blocks, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_find_use, df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno, debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref, debug_df_chain, df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem, df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info, df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem, df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem, df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink, df_ref_remove, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_hard_reg_init, df_read_modify_subreg_p) New public functions. * df-core.c: The core dataflow solver and glue routines for rtl dataflow. (df_init, df_add_problem, df_set_blocks, df_finish, df_hybrid_search_forward, df_hybrid_search_backward, df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem, df_analyze, df_get_bb_info, df_set_bb_info, df_bb_replace, df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_insn_regno_def_p, df_find_def, df_reg_defined, df_find_use, df_reg_used, df_dump, df_refs_chain_dump, df_regs_chain_dump, df_insn_debug, df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno, debug_df_useno, reset_df_after_reload): New functions. * df-scan.c: The scanning fuctions, once in df.c, completely rewritten so that they now fully model the functionality of register usage at the backend. (df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info, df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump, df_scan_add_problem, df_grow_reg_info, df_grow_ref_info, df_grow_insn_info, df_rescan_blocks, df_ref_create, df_get_artificial_defs, df_get_artificial_uses, df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink, df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete, df_refs_delete, df_reorganize_refs, df_set_state, df_ref_create_structure, df_ref_record, df_read_modify_subreg_p, df_def_record_1, df_defs_record, df_uses_record, df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record, df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg, df_record_exit_block_uses, df_hard_reg_init): New functions. * df-problems.c: Seven concrete dataflow problems that use the scanning in df-scan.c and are solved by the engine in df-core.c. (df_get_dependent_problem, df_chain_create, df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info, df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen, df_unset_seen, df_ru_get_bb_info, df_ru_set_bb_info, df_ru_free_bb_info, df_ru_alloc, df_ru_bb_local_compute_process_def, df_ru_bb_local_compute_process_use, df_ru_bb_local_compute, df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n, df_ru_transfer_function, df_ru_free, df_ru_dump, df_ru_add_problem, df_rd_get_bb_info, df_rd_set_bb_info, df_rd_free_bb_info, df_rd_alloc, df_rd_bb_local_compute_process_def, df_rd_bb_local_compute, df_rd_local_compute, df_rd_init_solution, df_rd_confluence_n, df_rd_transfer_function, df_rd_free, df_rd_dump, df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info, df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute, df_lr_local_compute, df_lr_init, df_lr_confluence_0, df_lr_confluence_n, df_lr_transfer_function, df_lr_free, df_lr_dump, df_lr_add_problem, df_ur_get_bb_info, df_ur_set_bb_info, df_ur_free_bb_info, df_ur_alloc, df_ur_bb_local_compute, df_ur_local_compute, df_ur_init, df_ur_local_finalize, df_ur_confluence_n, df_ur_transfer_function, df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info, df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc, df_urec_mark_reg_change, df_urec_check_earlyclobber, df_urec_mark_reg_use_for_earlyclobber, df_urec_mark_reg_use_for_earlyclobber_1, df_urec_bb_local_compute, df_urec_local_compute, df_urec_init, df_urec_local_finalize, df_urec_confluence_n, df_urec_transfer_function, df_urec_free, df_urec_dump, df_urec_add_problem, df_chain_alloc, df_chain_create_bb_process_use, df_chain_create_bb, df_chain_finalize, df_chain_free, df_chains_dump, df_chain_add_problem, df_ri_alloc, df_ri_bb_compute, df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem, df_reg_lifetime): New functions. * df.c: Deleted file. * ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code consistent with new df api. * modulo-sched.c (sms_schedule, rest_of_handle_sms, rest_of_handle_sms): Ditto. * web.c (unionfind_union, union_defs, entry_register, web_main): Ditto. * loop_invariant.c (invariant_for_use, hash_invariant_expr_1, invariant_expr_equal_p, find_defs, check_dependencies, find_invariant_insn, find_invariants_to_move, move_invariant_reg, free_inv_motion_data, move_loop_invariants): Ditto. * sched-deps.c (sched_analyze_1): Ditto. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r109577
2006-01-11 13:57:18 +01:00
update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
(PROP_DEATH_NOTES
| PROP_REG_INFO
| PROP_KILL_DEAD_CODE
| PROP_SCAN_DEAD_CODE));
no_new_pseudos = 1;
/* Finalize layout changes. */
FOR_EACH_BB (bb)
if (bb->next_bb != EXIT_BLOCK_PTR)
bb->aux = bb->next_bb;
cfg_layout_finalize ();
free_dominance_info (CDI_DOMINATORS);
#endif /* INSN_SCHEDULING */
tree-vrp.c (execute_vrp): Return value. 2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-03-02 20:00:11 +01:00
return 0;
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
}
struct tree_opt_pass pass_sms =
{
"sms", /* name */
gate_handle_sms, /* gate */
rest_of_handle_sms, /* execute */
NULL, /* sub */
NULL, /* next */
0, /* static_pass_number */
TV_SMS, /* tv_id */
0, /* properties_required */
0, /* properties_provided */
0, /* properties_destroyed */
TODO_dump_func, /* todo_flags_start */
Makefile.in: Adjust dependencies. 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-05 18:20:53 +02:00
TODO_dump_func |
TODO_ggc_collect, /* todo_flags_finish */
'm' /* letter */
};