gcc/gcc/tree-pass.h

148 lines
5.2 KiB
C
Raw Normal View History

/* Definitions for describing one tree-ssa optimization pass.
Copyright (C) 2004 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.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 Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef GCC_TREE_PASS_H
#define GCC_TREE_PASS_H 1
/* Global variables used to communicate with passes. */
extern FILE *dump_file;
extern int dump_flags;
extern struct bitmap_head_def *vars_to_rename;
/* Describe one pass. */
struct tree_opt_pass
{
/* Terse name of the pass used as a fragment of the dump file name. */
const char *name;
/* If non-null, this pass and all sub-passes are executed only if
the function returns true. */
bool (*gate) (void);
/* This is the code to run. If null, then there should be sub-passes
otherwise this pass does nothing. */
void (*execute) (void);
/* A list of sub-passes to run, dependent on gate predicate. */
struct tree_opt_pass *sub;
/* Next in the list of passes to run, independent of gate predicate. */
struct tree_opt_pass *next;
/* Static pass number, used as a fragment of the dump file name. */
int static_pass_number;
/* The timevar id associated with this pass. */
/* ??? Ideally would be dynamically assigned. */
unsigned int tv_id;
/* Sets of properties input and output from this pass. */
unsigned int properties_required;
unsigned int properties_provided;
unsigned int properties_destroyed;
/* Flags indicating common sets things to do before and after. */
unsigned int todo_flags_start;
unsigned int todo_flags_finish;
};
/* Pass properties. */
#define PROP_gimple_any (1 << 0) /* entire gimple grammar */
#define PROP_gimple_lcf (1 << 1) /* lowered control flow */
#define PROP_gimple_leh (1 << 2) /* lowered eh */
#define PROP_cfg (1 << 3)
#define PROP_referenced_vars (1 << 4)
#define PROP_pta (1 << 5)
#define PROP_ssa (1 << 6)
#define PROP_no_crit_edges (1 << 7)
coverage.c: Remove argument to rest_of_compilation. gcc/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * coverage.c: Remove argument to rest_of_compilation. * expr.c (execute_expand, set_save_expr_context, pass_expand): New. * passes.c (rest_of_compilation): Remove argument. (pass_rest_of_compilation): New. (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_regrename 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_web, rest_of_handle_branch_prob rest_of_handle_value_profile_transformations, rest_of_handle_cfg rest_of_handle_addressof, rest_of_handle_jump_bypass rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2): Check that the two arguments are actually superfluous. * toplev.h (rest_of_compilation): Adjust prototype. * tree-optimize.c (register_dump_files): Add properties argument. Track validity of passes. Only initialize dump files for tree-based passes. Store the full set of provided passes in the pass. (init_tree_optimization_passes): Register pass_expand and pass_rest_of_compilation. (execute_one_pass): Do not track the presence of required properties here. Set in_gimple_form. Do not update current_properties. (current_properties): Remove. (set_save_expr_context): Remove. (tree_rest_of_compilation): Do not set in_gimple_form. Do not expand to RTL here, and do not call rest_of_compilation. Push GGC context even before gimplification. * tree-pass.h (PROP_rtl, PROP_trees): New flags. (pass_expand, pass_rest_of_compilation): Declare. gcc/java/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * java/class.c (emit_register_classes): Remove argument to rest_of_compilation. * java/resource.c (write_resource_constructor): Likewise. From-SVN: r83225
2004-06-16 09:25:53 +02:00
#define PROP_rtl (1 << 8)
#define PROP_alias (1 << 9)
coverage.c: Remove argument to rest_of_compilation. gcc/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * coverage.c: Remove argument to rest_of_compilation. * expr.c (execute_expand, set_save_expr_context, pass_expand): New. * passes.c (rest_of_compilation): Remove argument. (pass_rest_of_compilation): New. (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_regrename 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_web, rest_of_handle_branch_prob rest_of_handle_value_profile_transformations, rest_of_handle_cfg rest_of_handle_addressof, rest_of_handle_jump_bypass rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2): Check that the two arguments are actually superfluous. * toplev.h (rest_of_compilation): Adjust prototype. * tree-optimize.c (register_dump_files): Add properties argument. Track validity of passes. Only initialize dump files for tree-based passes. Store the full set of provided passes in the pass. (init_tree_optimization_passes): Register pass_expand and pass_rest_of_compilation. (execute_one_pass): Do not track the presence of required properties here. Set in_gimple_form. Do not update current_properties. (current_properties): Remove. (set_save_expr_context): Remove. (tree_rest_of_compilation): Do not set in_gimple_form. Do not expand to RTL here, and do not call rest_of_compilation. Push GGC context even before gimplification. * tree-pass.h (PROP_rtl, PROP_trees): New flags. (pass_expand, pass_rest_of_compilation): Declare. gcc/java/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * java/class.c (emit_register_classes): Remove argument to rest_of_compilation. * java/resource.c (write_resource_constructor): Likewise. From-SVN: r83225
2004-06-16 09:25:53 +02:00
#define PROP_trees \
(PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh)
/* To-do flags. */
#define TODO_dump_func (1 << 0) /* pass doesn't dump itself */
#define TODO_rename_vars (1 << 1) /* rewrite new vars to ssa */
#define TODO_ggc_collect (1 << 2) /* run the collector */
#define TODO_verify_ssa (1 << 3)
#define TODO_verify_flow (1 << 4)
#define TODO_verify_stmts (1 << 5)
#define TODO_verify_all \
(TODO_verify_ssa | TODO_verify_flow | TODO_verify_stmts)
extern struct tree_opt_pass pass_mudflap_1;
extern struct tree_opt_pass pass_mudflap_2;
extern struct tree_opt_pass pass_remove_useless_stmts;
extern struct tree_opt_pass pass_lower_cf;
extern struct tree_opt_pass pass_lower_eh;
extern struct tree_opt_pass pass_build_cfg;
extern struct tree_opt_pass pass_tree_profile;
extern struct tree_opt_pass pass_referenced_vars;
extern struct tree_opt_pass pass_build_pta;
extern struct tree_opt_pass pass_del_pta;
extern struct tree_opt_pass pass_sra;
extern struct tree_opt_pass pass_tail_recursion;
extern struct tree_opt_pass pass_tail_calls;
extern struct tree_opt_pass pass_loop;
extern struct tree_opt_pass pass_loop_init;
extern struct tree_opt_pass pass_lim;
tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-manip.c (create_iv): New function. * Makefile.in (tree-ssa-loop-ivcanon.o): Add. (tree-ssa-loop.o, tree-ssa-loop-manip.o): Add SCEV_H dependency. * cfgloop.c (mark_single_exit_loops): New function. (verify_loop_structure): Verify single-exit loops. * cfgloop.h (struct loop): Add single_exit field. (LOOPS_HAVE_MARKED_SINGLE_EXITS): New constant. (mark_single_exit_loops): Declare. (tree_num_loop_insns): Declare. * cfgloopmanip.c (update_single_exits_after_duplication): New function. (duplicate_loop_to_header_edge): Use it. * common.opt (fivcanon): New flag. * timevar.def (TV_TREE_LOOP_IVCANON, TV_COMPLETE_UNROLL): New timevars. * tree-cfg.c (tree_find_edge_insert_loc): Return newly created block. (bsi_commit_edge_inserts_1): Pass null to tree_find_edge_insert_loc. (bsi_insert_on_edge_immediate): New function. * tree-flow.h (bsi_insert_on_edge_immediate, canonicalize_induction_variables, tree_unroll_loops_completely, create_iv): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_iv_canon and pass_complete_unroll. * tree-pass.h (pass_iv_canon, pass_complete_unroll): Declare. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, number_of_iterations_in_loop, scev_initialize): Use single_exit information. * tree-ssa-loop-niter.c (number_of_iterations_cond): Record missing assumptions. (loop_niter_by_eval): Return number of iterations as unsigned int. * tree-ssa-loop.c (tree_ssa_loop_init): Mark single exit loops. (tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_iv_canon, tree_complete_unroll, gate_tree_complete_unroll, pass_complete_unroll): New passes. (tree_ssa_loop_done): Call free_numbers_of_iterations_estimates. * tree-ssanames.c (make_ssa_name): Allow creating ssa name before the defining statement is ready. * tree-vectorizer.c (vect_create_iv_simple): Removed. (vect_create_index_for_array_ref, vect_transform_loop_bound): Use create_iv. (vect_transform_loop_bound): Use single_exit information. (vect_analyze_loop_form): Cleanup bogus tests. (vectorize_loops): Do not call flow_loop_scan. * tree.h (may_negate_without_overflow_p): Declare. * fold-const.c (may_negate_without_overflow_p): Split out from ... (negate_expr_p): ... this function. (tree_expr_nonzero_p): Handle overflowed constants correctly. * doc/invoke.texi (-fivcanon): Document. * doc/passes.texi: Document canonical induction variable creation. * gcc.dg/tree-ssa/loop-1.c: New test. From-SVN: r86516
2004-08-24 22:48:23 +02:00
extern struct tree_opt_pass pass_iv_canon;
extern struct tree_opt_pass pass_if_conversion;
tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees. * tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees. * tree-vectorizer.h: New File: Same. * Makefile.in (tree-vectorizer.c, tree-vectorizer.h): Add new files. * common.opt (ftree-vectorize): New flag to enable vectorization. * timevar.def (TV_TREE_VECTORIZATION): New dump file for vectorization pass. * tree-data-ref.h (init_data_ref): Additional argument. (array_base_name_differ_p): Moved to tree-data-ref.c. * tree-data-ref.c (array_base_name_differ_p): Revised. (initialize_data_dependence_relation): Call array_base_name_differ_p with an extra argument. (analyze_all_data_dependences): Same. (init_data_ref): Additional argument is_read to set DR_IS_READ. * tree-ssa-phiopt.c (empty_block_p): Expose for usage out of this file. * tree-flow.h (vectorize_loops, empty_block_p): Add declaration. * tree-optimize.c (pass_vectorize): Schedule the vectorization pass. * tree-pass.h (tree_opt_pass pass_vectorize): Declare the new vectorization pass. * tree-ssa-loop.c (tree_ssa_loop_init): Call scev_initialize. (tree_ssa_loop_done): Call scev_finalize. (tree_vectorize): Define the new vectorization pass. * defaults.h (UNITS_PER_SIMD_WORD): Allow targets to specify the size of the vector they support (until support for multiple vector sizes is added to the vectorizer). * config/i386/i386.h (UNITS_PER_SIMD_WORD): Define. * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Define. * invoke.texi (fdump-tree-vect, ftree-vectorize): Add documentation. From-SVN: r86131
2004-08-17 18:17:14 +02:00
extern struct tree_opt_pass pass_vectorize;
tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-manip.c (create_iv): New function. * Makefile.in (tree-ssa-loop-ivcanon.o): Add. (tree-ssa-loop.o, tree-ssa-loop-manip.o): Add SCEV_H dependency. * cfgloop.c (mark_single_exit_loops): New function. (verify_loop_structure): Verify single-exit loops. * cfgloop.h (struct loop): Add single_exit field. (LOOPS_HAVE_MARKED_SINGLE_EXITS): New constant. (mark_single_exit_loops): Declare. (tree_num_loop_insns): Declare. * cfgloopmanip.c (update_single_exits_after_duplication): New function. (duplicate_loop_to_header_edge): Use it. * common.opt (fivcanon): New flag. * timevar.def (TV_TREE_LOOP_IVCANON, TV_COMPLETE_UNROLL): New timevars. * tree-cfg.c (tree_find_edge_insert_loc): Return newly created block. (bsi_commit_edge_inserts_1): Pass null to tree_find_edge_insert_loc. (bsi_insert_on_edge_immediate): New function. * tree-flow.h (bsi_insert_on_edge_immediate, canonicalize_induction_variables, tree_unroll_loops_completely, create_iv): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_iv_canon and pass_complete_unroll. * tree-pass.h (pass_iv_canon, pass_complete_unroll): Declare. * tree-scalar-evolution.c (get_loop_exit_condition, get_exit_conditions_rec, number_of_iterations_in_loop, scev_initialize): Use single_exit information. * tree-ssa-loop-niter.c (number_of_iterations_cond): Record missing assumptions. (loop_niter_by_eval): Return number of iterations as unsigned int. * tree-ssa-loop.c (tree_ssa_loop_init): Mark single exit loops. (tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_iv_canon, tree_complete_unroll, gate_tree_complete_unroll, pass_complete_unroll): New passes. (tree_ssa_loop_done): Call free_numbers_of_iterations_estimates. * tree-ssanames.c (make_ssa_name): Allow creating ssa name before the defining statement is ready. * tree-vectorizer.c (vect_create_iv_simple): Removed. (vect_create_index_for_array_ref, vect_transform_loop_bound): Use create_iv. (vect_transform_loop_bound): Use single_exit information. (vect_analyze_loop_form): Cleanup bogus tests. (vectorize_loops): Do not call flow_loop_scan. * tree.h (may_negate_without_overflow_p): Declare. * fold-const.c (may_negate_without_overflow_p): Split out from ... (negate_expr_p): ... this function. (tree_expr_nonzero_p): Handle overflowed constants correctly. * doc/invoke.texi (-fivcanon): Document. * doc/passes.texi: Document canonical induction variable creation. * gcc.dg/tree-ssa/loop-1.c: New test. From-SVN: r86516
2004-08-24 22:48:23 +02:00
extern struct tree_opt_pass pass_complete_unroll;
tree-ssa-loop-ivopts.c: New file. * tree-ssa-loop-ivopts.c: New file. * Makefile.in (tree-ssa-loop-ivopts.c): Add. * cfgloop.h (target_avail_regs, target_res_regs, target_small_cost, target_pres_cost, target_spill_cost): Declare. * cfgloopanal.c (avail_regs, res_regs, small_cost, pres_cost, spill_cost): Renamed to ... (target_avail_regs, target_res_regs, target_small_cost, target_pres_cost, target_spill_cost): ... and exported. (init_set_costs, global_cost_for_size): Work with renamed variables. * common.opt (flag_ivopts): New flag. * expr.c (expand_expr_real_1): Handle SSA_NAME case. Handle REF_ORIGINAL. * gimplify.c (struct gimplify_ctx): Add into_ssa field. (internal_get_tmp_var, gimplify_modify_expr, gimplify_expr): Support generating SSA form. (force_gimple_operand): New function. * timevar.def (TV_TREE_LOOP_IVOPTS): New timevar. * tree-cfg.c (stmt_bsi): New function. * params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND, PARAM_IV_MAX_CONSIDERED_USES): New. * tree-flow.h (stmt_bsi, tree_ssa_iv_optimize, split_loop_exit_edge, bsi_insert_on_edge_immediate_loop. standard_iv_increment_position, ip_end_pos, ip_normal_pos, force_gimple_operand): Declare. * tree-gimple.c (is_gimple_formal_tmp_var): Accept ssa names. * tree-nested.c (build_addr): Export. * tree-optimize.c (init_tree_optimization_passes): Add pass_iv_optimize. * tree-pass.h (pass_iv_optimize): Declare. * tree-ssa-loop-im.c (for_each_index): Handle REALPART_EXPR and IMAGPART_EXPR. * tree-ssa-loop-manip.c (create_iv): Force the base to be acceptable as a phi node argument. (split_loop_exit_edge, bsi_insert_on_edge_immediate_loop, ip_end_pos, ip_normal_pos, standard_iv_increment_position): New functions. * tree-ssa-loop-niter.c (zero_p, unsigned_type_for): Export. * tree-ssa-loop.c (tree_ssa_loop_ivopts, gate_tree_ssa_loop_ivopts, pass_iv_optimize): New pass. * tree-ssa-operands.c (get_indirect_ref_operands): Handle REF_ORIGINAL. * tree-ssanames.c (release_ssa_name): Allow calling with var = NULL. * tree.c (build_int_cst_type, cst_and_fits_in_hwi): New functions. * tree.h (REF_ORIGINAL): New macro. (build_int_cst_type, unsigned_type_for, zero_p, cst_and_fits_in_hwi, build_addr): Declare. * doc/invoke.texi (-fivopts): Document. (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND, PARAM_IV_MAX_CONSIDERED_USES): Document. * doc/passes.texi: Document induction variable optimizations pass. * gcc.dg/tree-ssa/loop-2.c: New test. * gcc.dg/tree-ssa/loop-3.c: New test. * gcc.dg/tree-ssa/loop-4.c: New test. * gcc.dg/tree-ssa/loop-5.c: New test. From-SVN: r87100
2004-09-05 11:25:37 +02:00
extern struct tree_opt_pass pass_iv_optimize;
extern struct tree_opt_pass pass_loop_done;
extern struct tree_opt_pass pass_ch;
extern struct tree_opt_pass pass_ccp;
extern struct tree_opt_pass pass_build_ssa;
extern struct tree_opt_pass pass_del_ssa;
extern struct tree_opt_pass pass_dominator;
extern struct tree_opt_pass pass_dce;
extern struct tree_opt_pass pass_cd_dce;
extern struct tree_opt_pass pass_may_alias;
extern struct tree_opt_pass pass_split_crit_edges;
extern struct tree_opt_pass pass_pre;
extern struct tree_opt_pass pass_profile;
tree-cfg.c (gimplify_val): Move from tree-complex.c. 2004-07-22 Paolo Bonzini <bonzini@gnu.org> * tree-cfg.c (gimplify_val): Move from tree-complex.c. (gimplify_build1): Move from tree-complex.c do_unop. (gimplify_build2): Move from tree-complex.c do_binop. (gimplify_build3): New. * tree-complex.c (gimplify_val, do_unop, do_binop): Remove. Adjust throughout to call the functions above. * tree-flow.h: Declare the functions above. * tree-nested.c (gimplify_val): Rename to... (tsi_gimplify_val): ... this. * Makefile.in (tree_complex.o): Update dependencies. (stor-layout.o): Depend on regs.h. * c-common.c (handle_vector_size_attribute): Update for vector types without corresponding vector modes. * expr.c (expand_expr): Treat VECTOR_CST's like CONSTRUCTORS if a corresponding vector mode is not available. * print-tree.c (print_node): Print nunits for vector types * regclass.c (have_regs_of_mode): New. (init_reg_sets_1): Initialize it and use it instead of allocatable_regs_of_mode. * regs.h (have_regs_of_mode): Declare it. * stor-layout.c (layout_type): Pick a mode for vector types. * tree-complex.c (build_word_mode_vector_type, tree_vec_extract, build_replicated_const, do_unop, do_binop, do_plus_minus, do_negate, expand_vector_piecewise, expand_vector_parallel, expand_vector_addition, expand_vector_operations_1, expand_vector_operations, tree_lower_operations, pass_lower_vector_ssa, pass_pre_expand): New. (expand_complex_operations, pass_lower_complex): Remove. * tree-optimize.c (init_tree_optimization_passes): Adjust pass ordering for changes in tree-complex.c. * tree-pass.h: Declare new passes. * tree.c (finish_vector_type): Remove. (make_vector_type): New. (build_vector_type_for_mode, build_vector_type): Rewritten. * tree.def (VECTOR_TYPE): Document where the number of subparts is stored. * tree.h (TYPE_VECTOR_SUBPARTS): Use TYPE_PRECISION field. (make_vector): Remove declaration. From-SVN: r85039
2004-07-22 10:20:40 +02:00
extern struct tree_opt_pass pass_pre_expand;
extern struct tree_opt_pass pass_lower_vector_ssa;
extern struct tree_opt_pass pass_fold_builtins;
extern struct tree_opt_pass pass_early_warn_uninitialized;
extern struct tree_opt_pass pass_late_warn_uninitialized;
extern struct tree_opt_pass pass_warn_function_return;
extern struct tree_opt_pass pass_phiopt;
extern struct tree_opt_pass pass_forwprop;
extern struct tree_opt_pass pass_redundant_phi;
extern struct tree_opt_pass pass_dse;
extern struct tree_opt_pass pass_nrv;
extern struct tree_opt_pass pass_remove_useless_vars;
extern struct tree_opt_pass pass_rename_ssa_copies;
coverage.c: Remove argument to rest_of_compilation. gcc/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * coverage.c: Remove argument to rest_of_compilation. * expr.c (execute_expand, set_save_expr_context, pass_expand): New. * passes.c (rest_of_compilation): Remove argument. (pass_rest_of_compilation): New. (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_regrename 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_web, rest_of_handle_branch_prob rest_of_handle_value_profile_transformations, rest_of_handle_cfg rest_of_handle_addressof, rest_of_handle_jump_bypass rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2): Check that the two arguments are actually superfluous. * toplev.h (rest_of_compilation): Adjust prototype. * tree-optimize.c (register_dump_files): Add properties argument. Track validity of passes. Only initialize dump files for tree-based passes. Store the full set of provided passes in the pass. (init_tree_optimization_passes): Register pass_expand and pass_rest_of_compilation. (execute_one_pass): Do not track the presence of required properties here. Set in_gimple_form. Do not update current_properties. (current_properties): Remove. (set_save_expr_context): Remove. (tree_rest_of_compilation): Do not set in_gimple_form. Do not expand to RTL here, and do not call rest_of_compilation. Push GGC context even before gimplification. * tree-pass.h (PROP_rtl, PROP_trees): New flags. (pass_expand, pass_rest_of_compilation): Declare. gcc/java/ChangeLog: 2004-06-16 Paolo Bonzini <bonzini@gnu.org> * java/class.c (emit_register_classes): Remove argument to rest_of_compilation. * java/resource.c (write_resource_constructor): Likewise. From-SVN: r83225
2004-06-16 09:25:53 +02:00
extern struct tree_opt_pass pass_expand;
extern struct tree_opt_pass pass_rest_of_compilation;
common.opt (ftree-fre): New flag. * common.opt (ftree-fre): New flag. * flags.h (flag_tree_fre): Declare. * opts.c (decode_options): Set. * timevar.def (TV_TREE_FRE): Define. * tree-flow-inline.h (may_propagate_copy): Re-arrange for readability. Handle destinations that are not SSA_NAMEs. * tree-flow.h (struct ptr_info_def): Move from tree.h (cprop_into_stmt, cprop_into_successor_phis): Remove. (vn_compute, vn_lookup_or_add, vn_add, vn_lookup): Add vuse_optype parameter. * tree-pass.h (pass_fre): Declare. * tree-ssa-copy.c (cprop_operand): Move to tree-ssa-dom.c (cprop_into_stmt): Likewise. (cprop_into_successor_phis): Likewise. * tree-ssa-dom.c (eliminate_redundant_computations): Fix argument ordering in call to may_propagate_copy. * tree-ssa-pre.c (is_undefined_value): Assume hard registers to be always defined. (add_to_sets): New local function. (create_value_expr_from): New local function. (compute_avail): Call them. (eliminate): Don't ignore statements with virtual operands. (init_pre): New local function. (fini_pre): New local function. (execute_pre): Call them. Add argument DO_FRE. Don't do insertion if DO_FRE is true. (do_pre): New function. (do_fre): New function. (gate_fre): New function. (pass_fre): Declare. * tree-ssa.c (init_tree_ssa): Don't call vn_init. (delete_tree_ssa): Don't call vn_delete. * tree-vn.c (val_expr_pair_d): Add documentation. (vn_compute): Add VUSES argument to incorporate in computing hash values. Update all callers. (expressions_equal_p): Call operand_equal_p with OEP_PURE_SAME. (vn_add): Add VUSES argument. Update all callers. (vn_lookup): Likewise. (vn_lookup_or_add): Likewise. * doc/invoke.texi: Document -ftree-fre and -fdump-tree-fre. From-SVN: r83837
2004-06-29 03:53:04 +02:00
extern struct tree_opt_pass pass_fre;
#endif /* GCC_TREE_PASS_H */