aboutsummaryrefslogtreecommitdiff
path: root/gcc/timevar.def
AgeCommit message (Collapse)AuthorFilesLines
2004-09-23cfgloop.h (update_single_exits_after_duplication): Declare.Zdenek Dvorak1-0/+1
* cfgloop.h (update_single_exits_after_duplication): Declare. (loopify, split_loop_bb): Declaration changed. * cfgloopmanip.c (split_loop_bb): Take void * as an argument instead of rtx. (loopify): Added redirect_all_edges argument. (update_single_exits_after_duplication): Export. * loop-unswitch.c (unswitch_loop): Changed due to loopify change. * tree-flow.h (tree_duplicate_loop_to_header_edge, tree_ssa_loop_version): Declare. * tree-ssa-loop-manip.c (copy_phi_node_args, rename_variables, set_phi_def_stmts, tree_duplicate_loop_to_header_edge, lv_adjust_loop_header_phi, lv_adjust_loop_entry_edge, lv_update_pending_stmts, tree_ssa_loop_version): New functions. * tree-ssa-loop-unswitch.c: New file. * Makefile.in (tree-ssa-loop-unswitch.o): Add. * timevar.def (TV_TREE_LOOP_UNSWITCH): New timevar. * tree-flow.h (tree_ssa_unswitch_loops): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_unswitch. * tree-pass.h (pass_unswitch): Declare. * tree-ssa-loop.c (tree_ssa_loop_unswitch, gate_tree_ssa_loop_unswitch, pass_unswitch): New pass. * doc/passes.texi: Documen tree level loop unswitching. * gcc.dg/tree-ssa/loop-6.c: New test. From-SVN: r87943
2004-09-08Makefile.in (tree-loop-linear.o): Added.Daniel Berlin1-0/+1
2004-09-08 Daniel Berlin <dberlin@dberlin.org> * Makefile.in (tree-loop-linear.o): Added. (OBJS-common): Add tree-loop-linear.o * common.opt: New flag, ftree-loop-linear. * timevar.def: New timevar, TV_TREE_LOOP_LINEAR. * tree-flow.h: Add prototype for linear_transform_loops. * tree-optimize.c: Add linear transform after vectorization. * tree-pass.h: Add struct pass_linear_transform. * tree-ssa-loop.c: Add pass_linear_transform. * tree-loop-linear.c: New file. * lambda-code.c: gcc_assertify. (gcc_loop_to_lambda_loop): Handle all exit tests. Handle case where we have (invariant >= induction var). (find_induction_var_from_exit_cond): Ditto. From-SVN: r87190
2004-09-05tree-ssa-loop-ivopts.c: New file.Zdenek Dvorak1-0/+1
* 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-08-24tree-ssa-loop-ivcanon.c: New file.Zdenek Dvorak1-0/+2
* 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-18Makefile.in (OBJS-common): Add postreload-gcse.c.Steven Bosscher1-0/+1
* Makefile.in (OBJS-common): Add postreload-gcse.c. Add new postreload-gcse.o. * cse.c (SAFE_HASH): Define as wrapper around safe_hash. (lookup_as_function, insert, rehash_using_reg, use_related_value, equiv_constant): Use SAFE_HASH instead of safe_hash. (exp_equiv_p): Export. Add for_gcse argument when comparing for GCSE. (lookup, lookup_for_remove, merge_equiv_classes, find_best_addr, find_comparison_args, fold_rtx, cse_insn): Update callers. (hash_rtx): New function derived from old canon_hash and bits from gcse.c hash_expr_1. (canon_hash_string): Rename to hash_rtx_string. (canon_hash, safe_hash): Make static inline. Call hash_rtx. * cselib.c (hash_rtx): Rename to cselib_hash_rtx. (cselib_lookup): Update this caller. * gcse.c (modify_mem_list_set, canon_modify_mem_list_set): Make static. (hash_expr): Call hash_rtx. (ldst_entry): Likewise. (expr_equiv_p): Call exp_equiv_p. (struct unoccr, hash_expr_1, hash_string_1, lookup_expr, reg_used_on_edge, reg_set_between_after_reload_p, reg_used_between_after_reload_p, get_avail_load_store_reg, is_jump_table_basic_block, bb_has_well_behaved_predecessors, get_bb_avail_insn, hash_scan_set_after_reload, compute_hash_table_after_reload, eliminate_partially_redundant_loads, gcse_after_reload, get_bb_avail_insn, gcse_after_reload_main): Remove. * postreload-gcse.c: New file, reincarnating most of the above. * rtl.h (exp_equiv_p, hash_rtx): New prototypes. (gcse_after_reload_main): Update prototype. * timevar.def (TV_GCSE_AFTER_RELOAD): New timevar. * passes.c (rest_of_handle_gcse2): Use it. From-SVN: r86206
2004-08-17tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees.Dorit Naishlos1-0/+1
* 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-09timevar.def (TV_CPROP1, [...]): New timers.Steven Bosscher1-1/+6
* timevar.def (TV_CPROP1, TV_CPROP2, TV_PRE, TV_HOIST, TV_LSM): New timers. * gcse.c: Include timevar.h. (const_prop_count, copy_prop_count): Rename to global_const_prop_count and global_copy_prop_count. (local_const_prop_count, local_copy_prop_count): New static globals. (gcse_main): Set the right timevar for each pass. (cprop_jump): Increment global_const_prop_count when a constant is propagated. Add "GLOBAL" to dump output. (cprop_insn): Increment global_const_prop_count when a constant is propagated, or global_copy_prop_count when a copy is propagated. (do_local_cprop): Likewise for local_const_prop_count and local_copy_prop_count. (one_cprop_pass): Initialize const/cprop counters to zero. Print out results of local and global const/cprop separately. (bypass_block): Break over-length line. From-SVN: r85718
2004-07-10tree-ssa-loop-im.c: New file.Zdenek Dvorak1-0/+1
* tree-ssa-loop-im.c: New file. * Makefile.in (tree-ssa-loop-im.o): Add. * cfgloop.c (superloop_at_depth): New function. * cfgloop.h (superloop_at_depth): Declare. * common.opt (ftree-lim): New flag. * expr.c (array_ref_up_bound): New function. * params.def (PARAM_LIM_EXPENSIVE): New parameter. * timevar.def (TV_LIM): New timevar. * tree-dfa.c (compute_immediate_uses): Respect TDFA_USE flags when computing immediate uses of a phi node. * tree-flow.h (struct tree_ann_common_d): Add aux field. (loop_commit_inserts, for_each_index, tree_ssa_lim): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_lim. * tree-pass.h (pass_lim): Declare. * tree-ssa-loop.c (tree_ssa_loop_im, gate_tree_ssa_loop_im): New functions. (pass_lim): New pass structure. * tree-eh.c (tree_could_trap_p): Handle ARRAY_REFs correctly. * tree.c (in_array_bounds_p): New function. * tree.h (TREE_THIS_NOTRAP): Define also for ARRAY_REFs. (in_array_bounds_p, array_ref_up_bound): Declare. * doc/invoke.texi (-ftree-lim, --param lim-expensive): Document. * doc/passes.texi (tree-ssa-loop-im.c): Document. From-SVN: r84441
2004-06-28common.opt (ftree-fre): New flag.Diego Novillo1-0/+1
* 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-05-25ddg.h, [...]: New files.Ayal Zaks1-0/+1
* ddg.h, ddg.c, modulo-sched.c: New files. * cfglayout.c (duplicate_insn_chain): Remove "static" and push internals to "dupicate_insn". (duplicate_insn): New function. * cfglayout.h (duplicate_insn_chain, duplicate_insn): New declarations. * common.opt (fmodulo-sched): New flag. * df.c (df_bb_regno_last_use_find, df_bb_regno_first_def_find): Remove static and forward declaration. (df_find_def, df_reg_used, df_bb_regno_last_def_find): New functions. * df.h (df_bb_regno_last_use_find, df_bb_regno_first_def_find, df_bb_regno_last_def_find, df_find_def, df_reg_used): New declarations. * flags.h (flag_modulo_sched): New flag. * opts.c (common_handle_option): Handle modulo-sched flag. * params.def (max-sms-loop-number, sms-max-ii-factor, sms-dfa-history, sms-loop-average-count-threshold): New parameters. * params.h (MAX_SMS_LOOP_NUMBER, SMS_MAX_II_FACTOR, SMS_DFA_HISTORY, SMS_LOOP_AVERAGE_COUNT_THRESHOLD): New parameters. * passes.c ("sms", "sms-vcg"): New dumps. (rest_of_handle_sched): Call sms_schedule. * rtl.h (sms_schedule): New declaration. * timevar.def (TV_SMS): New. * toplev.c (flag_modulo_sched): Initialize. (f_options): Handle -fmodulo-sched option. * docs/invoke.texi: Document -fmodulo-sched & -dm options. * docs/passes.texi: Document new SMS pass.f toplev.c doc/invoke.texi doc/passes.texi Co-Authored-By: Mostafa Hagog <mustafa@il.ibm.com> From-SVN: r82235
2004-05-13Merge tree-ssa-20020619-branch into mainline.Diego Novillo1-2/+31
From-SVN: r81764
2004-04-01cgraph.c: Add overall comment.Jan Hubicka1-0/+1
* cgraph.c: Add overall comment. (cgraph_inline_hash): New global variable. (cgraph_create_node): Break out from ... (cgraph_node): ... here. (cgraph_edge): New function. (cgraph_create_edge): New CALL_EXPR argument; some sanity checking. (cgraph_remove_edge): Accept edge, intead of source and destination. (cgraph_redirect_edge_callee): New. (cgraph_remove_node): Update all new datastructures. (cgraph_record_call, cgraph_remove_call): Kill. (dump_cgraph_node): Break out from ... ; dump new datastructures. (dump_cgraph): ... here. (cgraph_function_possibly_inlined_p): Use new hashtable. (cgraph_clone_edge, cgraph_clone_node): New. * cgraph.h: Include hashtab.h (struct cgraph_global_info): Kill cloned_times, inline_once, will_be_output fields, add inlined_to pointer. (cgraph_node): Add pointer to next_clone. (cgraph_remove_edge, cgraph_create_edge): Update prototype. (cgraph_remove_call, cgraph_record_call): Kill. (cgraph_inline_hash): Declare. (dump_cgraph_node, cgraph_edge, cg4raph_clone_edge, cgraph_clone_node, cgraph_redirect_edge_callee): Declare. (cgraph_create_edges, cgraph_inline_p): Update prorotype. (cgraph_preserve_function_body_p, verify_cgraph, verify_cgraph_node, cgraph_mark_inline_edge, cgraph_clone_inlined_nodes): Declare. * cgraphunit.c: Add overall comment. (cgraph_optimize_function): Kill. (cgraph_assemble_pending_functions): Do not assemble inline clones. (cgraph_finalize_function): Update call of cgraph_remove_node (record_call_1): Record call sites. (cgraph_create_edges): Accept node instead of decl argument. (error_found): New static variable. (verify_cgraph_node_1, verify_cgraph_node, verify_cgraph): New functions. (cgraph_analyze_function): Update for new datastructures. (cgraph_finalize_compilation_unit): Plug memory leak. (cgraph_optimize_function): Kill. (cgraph_expand_function): Do not use cgraph_optimize_function. (INLINED_TIMES, SET_INLINED_TIMES, cgraph_inlined_into, cgraph_inlined_callees): Kill. (cgraph_remove_unreachable_nodes): Verify cgraph; update handling of clones. (estimate_growth): Simplify. (cgraph_clone_inlined_nodes): New function. (cgraph_mark_inline_edge): Re-implement. (cgraph_mark_inline): Likewise. (cgraph_check_inline_limits): Simplify. (cgraph_recursive_inlining_p): New. (update_callee_keys): Break out from ... (cgraph_decide_inlining_of_small_functions): ... here; simplify. (cgraph_decide_inlining, cgraph_decide_inlining_incrementally): Likewise. (cgraph_expand_all_functions): Remove inline clones from the ordered list. (cgraph_preserve_function_body_p): New predicate. (cgraph_optimize): Verify cgraph. * function.h (struct function): Add fields saved_tree/saved_args. * timevar.def (TV_CGRAPH_VERIFY): Use verifier. * toplev.c (rest_of_compilation): Do not free cfun. * tree-inline.c: Include function.h (struct inline_data): Add saving_p field; replace decl/current_decl by node/current_node. (insert_decl_map): New function. (copy_body_r): Handle saving; update cgraph datastructure. (copy_body): Handle recursive inlining. (initialize_inlined_parameters): Likewise. (expand_call_inline): Propagate node attributes; update cgraph. (optimize_inline_calls): Verify that datastructure still match. (save_body): New function. * tree-inline.h (save_body): New. * tree-optimize.c (tree_rest_of_compilation): preserve function body; do inlining. * langhooks-def.c (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): New. * langhooks.c (lang_hooks): Add update_decl_after_saving. * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define. * cp-tree.h (cp_update_decl_after_saving): Declare. * tree.c (cp_update_decl_after_saving): Define. * Make-lang.in (com.o): Add dependnecy on function.h * com.c: Include function.h (finish_function): Clear DECL_STRUCT_FUNCTION. * utils.c: Include function.h (end_subprog_body): Clear DECL_STRUCT_FUNCTION. From-SVN: r80334
2004-02-06Josef Zlomek <zlomekj@suse.cz>Josef Zlomek1-0/+1
Josef Zlomek <zlomekj@suse.cz> * Makefile.in (var-tracking.o): New. * common.opt (fvar-tracking): New. * flags.h (flag_var_tracking): New. * gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added. * opts.c (common_handle_option): Add OPT_fvar_tracking. * print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added. * rtl.c (note_insn_name): Likewise. * rtl.def (VAR_LOCATION): New. * rtl.h (NOTE_VAR_LOCATION): New. (NOTE_VAR_LOCATION_DECL): New. (NOTE_VAR_LOCATION_LOC): New. (enum insn_note): NOTE_INSN_VAR_LOCATION was added. (variable_tracking_main): New exported function. * timevar.def (TV_VAR_TRACKING): New. * toplev.c (enum dump_file_index): Added DFI_vartrack. (dump_file): "vartrack" was added (-dV). (flag_var_tracking): New. (f_options): "var-tracking" was added. (rest_of_handle_variable_tracking): New function. (rest_of_compilation): Run variable tracking. (process_options): If user has not specified flag_var_tracking set it according to optimize, debug_info_level and debug_hooks. * tree.h (frame_base_decl): New. * var-tracking.c: New file. * config/ia64/ia64.c (ia64_flag_var_tracking): New variable. (ia64_override_options): Set flags to run variable tracking in machine dependent reorg instead of toplev.c. (ia64_reorg): Run variable tracking if wanted. * doc/invoke.texi: Mention variable tracking in -dV, add and -fvar-tracking. * doc/passes.texi: Added variable tracking pass. Daniel Berlin <dberlin@dberlin.org> * debug.h (struct gcc_debug_hooks): Added var_location debug hook. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug): Likewise. * debug.c (do_nothing_debug_hooks): Likewise. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dwarfout.c (dwarf_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * final.c (final_scan_insn): Call var_location debug hook for each NOTE_INSN_VAR_LOCATION. Co-Authored-By: Daniel Berlin <dberlin@dberlin.org> From-SVN: r77418
2004-01-31alloc-pool.c, c-lex.c, c-pragma.h, c-semantics.c, cfghooks.c,Kazu Hirata1-1/+1
cfghooks.h, cfglayout.c, cfgloopmanip.c, debug.c, debug.h, flow.c, genextract.c, ggc-common.c, ggc-page.c, ggc.h, ifcvt.c, jump.c, loop-unswitch.c, timevar.c, timevar.def, tree-optimize.c, vmsdbgout.c, config/fp-bit.c, config/alpha/alpha.c, config/alpha/alpha.h, config/alpha/alpha.md, config/alpha/unicosmk.h, config/alpha/vms.h, config/arm/linux-elf.h, config/avr/avr.c, config/c4x/c4x-protos.h, config/c4x/c4x.md, config/d30v/d30v.h, config/frv/frv.md, config/frv/frvbegin.c, config/frv/frvend.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/emmintrin.h, config/i386/gthr-win32.c, config/i386/i386-interix.h, config/i386/i386-protos.h, config/i386/openbsd.h, config/i386/winnt.c, config/i386/xm-mingw32.h, config/i386/xmmintrin.h, config/ia64/ia64.md, config/iq2000/iq2000.md, config/m32r/m32r.md, config/m68k/m68k.md, config/mcore/mcore-elf.h, config/mcore/mcore.md, config/mips/elf.h, config/mips/elf64.h, config/mips/iris5gas.h, config/mips/iris6.h, config/mips/iris6gas.h, config/mips/linux.h, config/mips/mips.md, config/mips/netbsd.h, config/mips/openbsd.h, config/mips/windiss.h, config/pa/fptr.c, config/rs6000/aix.h, config/rs6000/altivec.h, config/rs6000/darwin.h, config/rs6000/xcoff.h, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/s390/s390.md, config/sh/netbsd-elf.h, config/sh/sh.h, config/sh/vxworks.h, config/sparc/sol2.h: Update copyright. From-SVN: r77018
2004-01-29Makefile.in (cfghooks.o): Add TIMEVAR_H and toplev.h dependency.Zdenek Dvorak1-0/+1
* Makefile.in (cfghooks.o): Add TIMEVAR_H and toplev.h dependency. * basic-block.h (tidy_fallthru_edge, tidy_fallthru_edges, dump_bb, verify_flow_info): Declaration removed. * cfg.c (verify_flow_info, dump_bb): Moved to cfghooks.c. (debug_bb, debug_bb_n): Add argument to dump_bb call. * cfgcleanup.c (try_simplify_condjump, try_crossjump_to_edge, try_optimize_cfg, delete_unreachable_blocks): Use delete_basic_block instead of delete_block. * cfghooks.c: Include timevar.h and toplev.h. (cfg_hooks): Define here. (verify_flow_info, dump_bb): Moved from cfg.c. (redirect_edge_and_branch, redirect_edge_and_branch_force, split_block, split_block_after_labels, move_block_after, delete_basic_block, split_edge, create_basic_block, create_empty_bb, can_merge_blocks_p, merge_blocks, make_forwarder_block, tidy_fallthru_edge, tidy_fallthru_edges): New functions. * cfghooks.h (struct cfg_hooks): Added fields name, make_forwarder_block, tidy_fallthru_edge and move_block_after. Changed type of verify_flow_info, dump_bb, split_block fields. Renamed cfgh_split_edge and delete_block fields. (redirect_edge_and_branch, redirect_edge_and_branch_force, split_block, delete_block, split_edge, create_basic_block, can_merge_blocks_p, merge_blocks): Macros removed. (cfg_hooks): Do not export. (verify_flow_info, dump_bb, redirect_edge_and_branch, redirect_edge_and_branch_force, split_block, split_block_after_labels, move_block_after, delete_basic_block, split_edge, create_basic_block, create_empty_bb, can_merge_blocks_p, merge_blocks, make_forwarder_block, tidy_fallthru_edge, tidy_fallthru_edges): Declare. (cfg_layout_rtl_cfg_hooks): Declare. * cfgloop.c (update_latch_info, mfb_keep_just, mfb_keep_nonlatch): New functions. (canonicalize_loop_headers): Use new semantics of make_forwarder_block. (redirect_edge_with_latch_update): Removed. (make_forwarder_block): Moved to cfghooks.c, semantics changed. * cfgloopmanip.c (remove_bbs): Do not update dominators here. * cfgrtl.c (cfg_layout_split_block, rtl_split_block, rtl_dump_bb, rtl_delete_block, rtl_split_block, rtl_merge_blocks, tidy_fallthru_edge, rtl_split_edge, cfg_layout_delete_block, cfg_layout_merge_blocks, cfg_layout_split_edge): Partly moved to cfghooks.c. (rtl_create_basic_block): Coding style fix. (rtl_tidy_fallthru_edge, rtl_move_block_after, rtl_make_forwarder_block): New functions. (update_cfg_after_block_merging): Removed. (rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Fill in new entries. * flow.c (verify_wide_reg, verify_local_live_at_start): Add argument to dump_bb. * ifcvt.c (merge_if_block, find_cond_trap, find_if_case_1, find_if_case_2): Don't update dominators. * timevar.def (TV_CFG_VERIFY): New. * loop-unswitch.c (unswitch_loop): Don't call add_to_dominance_info. * cfglayout.c (copy_bbs): Don't call add_to_dominance_info. * cfgloopmanip.c (split_loop_bb): Don't update dominators. (remove_bbs): Don't call remove_bbs. (create_preheader): Use make_forwarder_block. (mfb_keep_just, mfb_update_loops): New static functions. From-SVN: r76851
2003-11-20ssa.c, [...]: Remove files.Richard Henderson1-4/+0
* ssa.c, ssa-dce.c, ssa-ccp.c: Remove files. * Makefile.in (OBJS-common, GTFILES): Don't reference them. (gtype-desc.o, toplev.o, flow.o): Remove ssa.h. (ssa.o, ssa-dce.o, ssa-ccp.o): Remove. * flow.c: Don't include ssa.h. (set_phi_alternative_reg): Remove. (calculate_global_regs_live): Don't call it. (mark_used_regs): Don't handle PHI. * gengtype.c (open_base_files): Don't reference ssa.h. * rtl.def (PHI): Remove. * timevar.def (TV_TO_SSA, TV_SSA_CCP, TV_SSA_DCE, TV_FROM_SSA): Kill. * common.opt: Remove -fssa, -fssa-ccp, -fssa-dce. * opts.c (common_handle_option): Likewise. * toplev.c (f_options): Likewise. (DFI_ssa, DFI_ssa_ccp, DFI_ssa_dce, DFI_ussa): Remove. (dump_file): Update to match. (flag_ssa, flag_ssa_ccp, flag_ssa_dce): Remove. (rest_of_handle_ssa): Remove. (rest_of_compilation): Don't call it. * toplev.h (flag_ssa, flag_ssa_dce, flag_ssa_ccp): Remove. * doc/invoke.texi: Remove -fssa, -fssa-ccp, -fssa-dce. * doc/passes.texi (SSA optimizations): Remove. * gcc.dg/20020201-2.c: Remove. * gcc.dg/20020201-4.c: Remove. * gcc.dg/20020304-1.c: Remove. From-SVN: r73789
2003-10-19Makefile.in (toplev.o): Add value-prof.h dependency.Zdenek Dvorak1-0/+1
* Makefile.in (toplev.o): Add value-prof.h dependency. (value-prof.o): Add REGS_H dependency. * common.opt (fprofile-values, fvpt): New. * flags.h (flag_value_profile_transformations): Declare. * opts.c (common_handle_option): Handle -fprofile_values and -fvpt. * profile.c (branch_prob): Don't remove death notes here. * timevar.def (TV_VPT): New. * value-prof.c: Include regs.h. (insn_divmod_values_to_profile, gen_divmod_fixed_value, gen_mod_pow2, gen_mod_subtract, divmod_fixed_value_transform,mod_pow2_value_transform, mod_subtract_transform, value_profile_transformations): New. (insn_values_to_profile): Call insn_divmod_values_to_profile. (find_values_to_profile): Add dumps. * value-prof.h (value_profile_transformations): Declare. * toplev.c: Include value-prof.h. (rest_of_handle_value_profile_transformations): New. (enum dump_file_index): Add DFI_vpt. (dump_file): Add vpt dump. (flag_value_profile_transformations): New. (lang_independent_options): Add flag_profile_values and flag_value_profile_transformations. (rest_of_compilation): Call rest_of_handle_value_profile_transformations. (process_options): Let -fvpt imply -fprofile-values. * doc/invoke.texi (-fvpt): Document. From-SVN: r72685
2003-10-11Makefile.in (web.o): New.Jan Hubicka1-0/+1
* Makefile.in (web.o): New. * web.c: New file. * rtl.h (web_main): Declare. * timervar.def (TV_WEB): New. * toplev.c (dump_file_index, dump_file_info): Add DFI_web. (rest_of_hanle_web): New. (flag_web): New static variable. (lang_independent_options): Add "web". (rest_of_compilation): Call rest_of_handle_web. * invoke.texi (-fweb): Document. * common.opt (fweb): New. * flags.h (flag_web): New. * opts.c (decode_options): Set flag_web at -O3. * passes.texi (web construction): Document. * invoke.texi (-O3): Document that -fweb is enabled. * regrename.c (regrename_optimize): Deal better with situation when replacement failed. * sched-ebb.c: Include params.h and profile.h (schedule_ebbs): Use tracer parameters to discover superblocks * Makefile.in (sched-ebb.o): Add dependencies. From-SVN: r72383
2003-07-09cgraph.c (cgraph_node_name): New function.Jan Hubicka1-0/+2
* cgraph.c (cgraph_node_name): New function. (dump_cgraph): Use it. * cgraph.h (cgraph_dump_file): Declare. (cgraph_node_name): Declare. * cgraphunit.c: Include timevar.h (cgraph_finalize_compilation_unit): Use timevar; reorganize dumps. (cgraph_optimize_function): Use TV_INTEGRATION. (cgraph_mark_local_functions): reorganize dumps. (cgraph_mark_functions_to_inline_once): Likewise. (cgraph_optimize): Likewise; use timevar. * timevar.def (TV_CGRAPH, TV_CGRAPHOPT): New. * toplev.c (dump_file_index): Add DFI_cgraph. (dump_file_info): Likewise. (cgraph_dump_file): New global variable. (do_compile): Open and close cgraph dump. * invoke.texi (-d): Document new flag; renumber. From-SVN: r69120
2003-02-26objc-act.c: Include cgraph.hJan Hubicka1-0/+4
* objc-act.c: Include cgraph.h (mark_referenced_methods): New function. (objc_init): Call it. * objc-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Set. * c-decl.c (finish_function): Honor can_defer_p even in unit-at-a-time mode. * optabs.c (expand_fix): Do not widen the input operand. * expr.c (emit_group_store): Fix crash when converting single register into complex register. * Makefile.in (jump.o, regclass.o, alias.o): Add dependency on timevar.h * alias.c: Include timevar.h (init_alias_analysis): Set timevar * jump.c: Include timevar.h (rebuild_jump_labels): Set timevar * regcalss.c: Include timevar.h (reg_scan): Set timevar * timevar.def (TV_ALIAS_ANALYSIS, TV_REG_SCAN, TV_REBUILD_JUMP): New From-SVN: r63464
2003-01-27timevar.def (TV_OVERLOAD, [...]): New timevar_id enumerations.Gabriel Dos Reis1-0/+2
* timevar.def (TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION): New timevar_id enumerations. From-SVN: r61873
2003-01-16gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps ↵Roger Sayle1-1/+2
and bypass_jumps flags... * gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps and bypass_jumps flags instead of just alter_jumps. (gcse_main): Update calls to one_cprop_pass, disabling bypassing. (bypass_jumps): New function to perform separate jump bypassing pass. * rtl.h (bypass_jumps): Add function prototype. * timevar.def (TV_BYPASS): New timing variable. * toplev.c (enum dump_file_index): Add new entry DFI_bypass. (dump_file): New entry for the bypass RTL dump file. (rest_of_compilation): Insert new jump bypassing optimization pass after loop. * doc/passes.texi: Document new pass. From-SVN: r61374
2003-01-14timevar.def: define TV_NAME_LOOKUP.Gabriel Dos Reis1-0/+1
* timevar.def: define TV_NAME_LOOKUP. * timevar.c (timevar_pop): Be verbose when aborting. From-SVN: r61260
2002-06-01Makefile.in (tracer.o): New.Jan Hubicka1-0/+1
* Makefile.in (tracer.o): New. * params.def (TRACER_*): New options. * rtl.h (tracer): Declare. * timevar.def (TV_TRACER): New. * toplev.c (dump_file_index): Add DFI_tracer. (dump_file_info): Add tracer. (flag_tracer): New. (lang_indepdenent_options): Add tracer. (rest_of_compilation): Call tracer. * tracer.c: New file. * invoke.texi (-ftracer): Document. (--param tracer-*): Document. From-SVN: r54154
2002-03-06cfgrtl.c (delete_insn_and_edges, [...]): New.Jan Hubicka1-0/+1
* cfgrtl.c (delete_insn_and_edges, delete_insn_chain_and_edges): New. * rtl.h (delete_insn_and_edges, delete_insn_chain_and_edges): Declare * basic-block.h (update_life_info, update_life_info_in_dirty_blocks, delete_noop_moves): Return indeger. * flow.c (ndead): New variable. (propagate_block_delete_insn): Use delete_insn_and_edges; remove BB argument; update callers. (propagate_block_delete_libcall): Use delete_insn_chain_and_edges. (life_analysis): Do not call purge_all_dead_edges. (update_life_info): Return number of deleted insns; print statistics. (update_life_info_in_dirty_blocks): likewise. (delete_noop_moves): Use delete_insn_and_edges; print statistics; return number of insns deleted. * cse.c: Include timevar.h (delete_trivially_dead_insns): Kill preserve_basic_blocks argument; iterate until stabilizes; print statistics; return number of killed insns. * Makefile.in: (cse.o): Add timevar.h dependency * rtl.h (delete_trivially_dead_insns): New. * timever.def: Add TV_DELETE_TRIVIALLY_DEAD timer. * toplev.c (rest_of_compilation): Update callers. * cfgcleanup.c (try_optimize_cfg): Kill blocks. (try_optimize_cfg): Do not update liveness. (cleanup-cfg): Loop until try_optimize_cfg and dead code removal stabilizes; use delete_trivially_dead_insns. * cfgrtl.c (verify_flow_info): Sanity check outgoing edges. From-SVN: r50355
2001-10-20basic-block.h (find_sub_basic_blocks): Use sbitmap parameter.Jan Hubicka1-0/+4
* basic-block.h (find_sub_basic_blocks): Use sbitmap parameter. * cfgbuild.c (find_bb_boundaries, compute_outgoing_frequencies): Break out from ... (find_sub_basic_blocks): ... here; (find_many_sub_basic_blocks): New. * recog.c (split_all_insns): Update find_sub_basic_blocks call. * i386.h (ASM_PREFERRED_EH_DATA_FORMAT): Define sdata4. * i386.c (ix86_va_arg): Kill indirect_p handling; fix aliasing issues.: * i386.c (split_di, split_ti): Revamp to use simplify_subreg. * timevar.def (TV_LIFE, TV_LIFE_UPDATE, TV_MODE_SWITCH): new. * flow.c (update_life_info): Measure time. * c-decl.c: Include timevar.h (c_expand_body): Measure time. * toplev.c (rest_of_compilation): Measure time of mode switching separately. * Makefile.in (c-decl.o, cfgcleanup.o): Add dependancy. * toplev.c (flag_asynchronous_unwind_tables): New global variable. (lang_independent_options): Add asynchronous-unwind-tables (toplev_main): flag_asynchronous_unwind_tables implies flag_unwind_tables. * flags.h (flag_asynchronous_unwind_tables): Declare. * dwarf2out.c (dwarf2out_stack_adjust): Take into account flag_asynchronous_unwind_tables. (output_call_frame_info): Likewise. * invoke.texi (-fasynchronous-unwind-tables): Document. * i386.c (optimization_options): Enable flag_asynchronous_unwind_tables. * i386.c (ix86_expand_setcc): Always expect target to be QImode. * i386.md (s* expanders): Destination is QImode. * toplev.c (rest_of_compilation): Do not call clear_log_links. * rtl.h (clear_log_links): Kill. * flow.c (clear_log_links): Make static; accept blocks parameter; do no clear life info. (update_life_info): Call clear_log_links. * cfganal.c (forwarder_block_p): Avoid active_insn_p calls. From-SVN: r46374
2001-08-22Makefile.in, [...]: replace "GNU CC" with "GCC".Lars Brinkhoff1-4/+4
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c, bitmap.h, builtin-types.def, builtins.c, builtins.def, c-aux-info.c, c-common.c, c-common.def, c-common.h, c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c, c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in, c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c, caller-save.c, calls.c, collect2.c, collect2.h, combine.c, conditions.h, config.gcc, configure.frag, configure.in, conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c, cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h, dependence.c, df.c, df.h, diagnostic.c, diagnostic.h, doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c, dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c, emit-rtl.c, errors.c, errors.h, except.c, except.h, exgettext, explow.c, expmed.c, expr.c, expr.h, final.c, fixproto, flags.h, flow.c, fold-const.c, fp-test.c, function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp, gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c, gencheck.c, gencodes.c, genconfig.c, genemit.c, genextract.c, genflags.c, gengenrtl.c, genmultilib, genopinit.c, genoutput.c, genpeep.c, genrecog.c, gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c, ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c, graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h, gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h, gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h, hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h, integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c, libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h, machmode.def, machmode.h, main.c, mbchar.c, mbchar.h, mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk, mkmap-symver.awk, optabs.c, output.h, params.c, params.def, params.h, predict.c, predict.def, predict.h, prefix.c, prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c, read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c, regclass.c, regmove.c, regrename.c, regs.h, reload.c, reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c, rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h, sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c, sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c, ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c, stringpool.c, system.h, timevar.c, timevar.def, timevar.h, tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h, tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h, unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h, unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c, xcoffout.h: replace "GNU CC" with "GCC". From-SVN: r45105
2001-08-18timevar.def (TV_MACH_DEP): New.Richard Henderson1-0/+1
* timevar.def (TV_MACH_DEP): New. * toplev.c (rest_of_compilation): Use it. * config/ia64/ia64.c (ia64_reorg): Push to TV_SCHED2. From-SVN: r45017
2001-07-16basic-block.h (CLEANUP_PRE_SIBCALL): New constant.Jan Hubicka1-0/+4
* basic-block.h (CLEANUP_PRE_SIBCALL): New constant. * except.c (finish_eh_generation): Update call of cleanup_cfg; do rebuild_jump_labels instead of jump_optimize * sibcall.c (optimize_sibling_and_tail_recursive_call): Likewise. * toplev.c (rest_of_compulation): Likewise for -Wreturn_type. * flow.c (try_optimize_cfg): Remove unneeded code_labels. * flow.c: Include timevar.h (find_basic_block): Push/pop timevar; (cleanup_cfg): Likewise. * timevar.def (TV_CFG, TV_CLEANUP_CFG): New. * Makefile: Add dependencies on timevar.h * integrate.c (save_for_inline): Kill all BASIC_BLOCK notes. (copy_insn_list): Avoid killing of BASIC_BLOCK notes. * rtl.h (delete_trivially_dead_insns): Add new parameter. * toplev.c (rest_of_compilation): Update calls. * cse.c (set_live_p, insn_live_p, dead_libcall_p): Break out from ... (delete_trivially_dead_insns): ... here; accept new argument preserve_basic_blocks; preserve basic blocks if set. * reg-stack.c (stack_regs_mentioned): Return 0 if stack_regs_mentioned_data is not initialized. (reg_to_stack): Make stack_regs_mentioned survive after the reg-stack is completted; do not call cleanup_cfg. * toplev.c (rest_of_compilation): Do cleanup_cfg before bb-reorder; make cleanup_cfg after bb-reorder to output to debug file. From-SVN: r44056
2001-07-09Makefile.in (OBJS): Add ssa-ccp.oJeff Law1-0/+1
* Makefile.in (OBJS): Add ssa-ccp.o (ssa-ccp.o): Add dependencies. * toplev.c (DFI_ssa_ccp): New dump file enum. (dump_file): Add entry for dumping after SSA CCP. (flag_ssa_ccp): New flag variable. (f_options): Add -fssa-ccp. (rest_of_compilation): Run SSA CCP if requested. * timevar.def (TV_SSA_CCP): New timevar. * ssa.c (mark_phi_and_copy_regs): Handle deleted PHI nodes. * doc/gcc.texi (Passes): Add documentation for SSA CCP pass. Fix minor typo in SSA DCE documentation. * doc/invoke.texi: Add documentation for new flag -fssa-ccp. Add documentation for new dump option. Renumber dump files appropriately. * po/POTFILES.in: Add ssa-ccp.c From-SVN: r43872
2001-06-29ssa-dce.c (ssa_eliminate_dead_code): Renamed from eliminate_date_code.Jeffrey A Law1-1/+1
* ssa-dce.c (ssa_eliminate_dead_code): Renamed from eliminate_date_code. * ssa.h (ssa_eliminate_dead_code): Corresponding changes. * timevar.def (TV_SSA_DCE): Renamed from TV_DEAD_CODE_ELIM. * toplev.c (DFI_ssa_dce): Renamed from DFI_dce. (dump_file_info): Similar changes. (flag_ssa_dce): Similarly (f_options): Similar changes. (rest_of_compilation): Corresponding changes. * doc/invoke.texi: Update as option is now -fssa-dce instead of -fdce. Update dump file name. From-SVN: r43658
2000-09-07Integrated preprocessor.Zack Weinberg1-0/+2
top level: * Makefile.in: Remove all references to c-parse.gperf, c-gperf.h, and c-parse.h. Remove -d from yacc command line generating c-parse.c. Update dependencies. * c-parse.gperf, c-gperf.h: Delete. * c-common.c: Don't define parse_options, cpp_token, yy_cur, yy_lim, or yy_get_token. Don't define get_directive_line if USE_CPPLIB. * c-common.h: Add multiple include guard. Define RID values for every keyword in C, C++, and Objective C. Put all the modifiers first. (struct c_fileinfo, get_fileinfo, dump_time_statistics): New. * c-decl.c (c_decode_option): Handle -lang-objc here. (print_lang_identifier): Handle C_IS_RESERVED_WORD case. (grokdeclarator): Adjust for new RID scheme. (extract_interface_info): New stub. * c-lang.c: Don't declare yy_cur or parse_options. (lang_init_options): Call cpp_init. Don't call cpp_options_init. (lang_init): Don't call check_newline if USE_CPPLIB. * c-lex.c: Don't include c-parse.h. Do include timevar.h. Elide lots of unnecessary code if USE_CPPLIB. Delete code rendered unnecessary by new architecture. Move routines not shared with C++ to c-parse.in. Maintain a local idea of the line number. Handle C++ as well as C. [USE_CPPLIB]: Declare and register callbacks for #ident and for entering/leaving files. (init_c_lex, c_lex): Are now the entry points to this file. (check_newline): Break out directive handling to process_directive. (read_ucs, is_extended_char, utf8_extend_token): Moved here from C++ front end. (readescape, parse_float): Overhaul. (lex_number, lex_string, lex_charconst): Break out of c_lex (n'ee yylex). (get_fileinfo, update_header_times, dump_one_header, dump_time_statistics): New and/or moved here from C++. Support per-file data needed by C++ and per-header timing statistics (C++ only, at the moment). * c-lex.h: Update prototypes. Add multiple include guard. * c-tree.h (struct lang_identifier): Add rid_code field. (C_IS_RESERVED_WORD, C_RID_CODE): New. * c-parse.in: Include c-pragma.h. Remove unnecesary calls to reinit_parse_for_function and/or position_after_white_space. (save_filename, save_lineno): Look ahead before saving. (label -> identifier ':'): Save file and line before shifting ':'. (reservedwords): No need to call get_identifier. (init_parse, finish_parse, yyerror, yylex, yyprint, make_pointer_declarator): Are now here for C/ObjC. (rid_to_yy): Conversion table from RID constants to Yacc codes. * c-pragma.c: Rewrite parsing logic to fit with cpplib's #pragma registry. Provide dummy implementation of that interface if !USE_CPPLIB. * c-pragma.h: Update to match. * flags.h: Add multiple include guard. (flag_detailed_statistics): Moved here from C++. * toplev.c: Define flag_detailed_statistics. * gcc.c (C specs): Use %(trad_capable_cpp) for -E|-M|-MM case #if USE_CPPLIB. * timevar.def (TV_CPP, TV_LEX): New. * timevar.h: Add multiple include guard. * objc/lang-specs.h: Use %(trad_capable_cpp) for -E|-M|-MM case #if USE_CPPLIB. * objc/objc-act.c: Don't mention yy_cur or parse_options. Initialize cpplib properly. Force lineno to 0 after first call to check_newline. Don't handle -lang-objc here. Move forget_protocol_qualifiers and remember_protocol_qualifiers here. cp: * Make-lang.in, Makefile.in: Remove all references to input.c, gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS. * gxx.gperf, hash.h, input.c: Delete. * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is initialized properly. * class.c (fixup_pending_inline): Take a tree, not a struct pending_inline *. All callers changed. (init_class_processing): Set RID_PUBLIC, RID_PRIVATE, RID_PROTECTED entries in ridpointers[] array here. * decl.c (duplicate_decls): Do not refer to struct pending_inline. (record_builtin_type, init_decl_processing): Use RID_MAX not CP_RID_MAX. (grokdeclarator): Use C_IS_RESERVED_WORD. * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of cpplib. (grok_x_components): Do not inspect pending_inlines chain. * cp-tree.h (struct lang_identifier): Add rid_code entry. (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New. (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare. (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME, TIME_IDENTIFIER_FILEINFO): Kill. Update prototypes. * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a single 32-bit word. * parse.y: Call do_pending_inlines unconditionally. reinit_parse_for_method is now snarf_method. fn.defpen is no longer necessary. Remove unnecessary <itype> annotation on SCOPE. Do not refer to end_of_file or struct pending_inline. * semantics.c (begin_inline_definitions): Call do_pending_inlines unconditionally. * lex.c: Remove all code now shared with C front end. Initialize cpplib properly if USE_CPPLIB. Put reserved words into the get_identifier table. Rewrite pragma handling to work with the registry. Move code to save tokens for later processing to spew.c. * spew.c: Rewrite everything in terms of token streams instead of text. Move routines here from lex.c / input.c as appropriate. GC-mark trees hanging off the pending inlines chain. testsuite: * g++.old-deja/g++.benjamin/13478.C: Put meaningful tags on ERROR markers. * g++.old-deja/g++.brendan/crash8.C: Move ERROR marker up one line. * gcc.dg/c99-array-nonobj-1.c: Don't expect func[] cases to fail. * gcc.dg/wtr-label-1.c: Don't use unconstrained .* in error regexps. * gcc.dg/wtr-suffix-1.c: Correct error regexps. * gcc.dg/cpp/unc1.c, gcc.dg/cpp/unc2.c, gcc.dg/cpp/unc3.c: Preprocess only. * gcc.dg/cpp/unc4.c: Adjust line number in dg-error line. * gcc.dg/noncompile/const-ll-1.c: Generalize error regexp. From-SVN: r36216
2000-08-02Makefile.in (OBJS): Added dce.o.Jeffrey Oldham1-0/+1
* Makefile.in (OBJS): Added dce.o. (ssa.o): Updated target to include ssa.h. (flow.o): Likewise. (toplev.o): Likewise. (dce.o): Created target. * basic-block.h: Added comments. (INVALID_BLOCK): Added definition. (connect_infinite_loops_to_exit): Added declaration. Moved SSA declarations to ssa.h. * flow.c: Added inclusion of ssa.h. (struct depth_first_search_dsS, depth_first_search_ds): Added definitions. (compute_immediate_postdominators): Added definition. (connect_infinite_loops_to_exit): Likewise. (flow_dfs_compute_reverse_init): Likewise. (flow_dfs_compute_reverse_add_bb): Likewise. (flow_dfs_compute_reverse_execute): Likewise. (flow_dfs_compute_reverse_finish): Likewise. * rtl.h (rtx/in_struct): Added use to determine insn necessity. (LABEL_P): Added definition. (JUMP_P): Likewise. (NOTE_P): Likewise. (BARRIER_P): Likewise. (JUMP_TABLE_DATA_P): Likewise. (INSN_DEAD_CODE_P): Likewise. * ssa.c: Replaced inclusions with ssa.h inclusion. (CONVERT_HARD_REGISTER_TO_SSA_P): Moved to ssa.h. (rename_registers): Removed unnecessary variables. * ssa.h: Created by moving declarations from ssa.c and basic-block.h. * timevar.def: Defined TV_DEAD_CODE_ELIM. * toplev.c: Added ssa.h inclusion. (dump_file_index): Added DFI_dce. (dump_file): Added "dce" entry. Defined flag_ssa. (f_options): Added dce entry. * invoke.texi: Document -fdce. Emphasize experimental status of -fssa. Co-Authored-By: Mark Mitchell <mark@codesourcery.com> From-SVN: r35419
2000-06-09timevar.def: Add TV_EXPAND.Jason Merrill1-0/+1
* timevar.def: Add TV_EXPAND. * timevar.c (timevar_print): Update timing information. * calls.c (try_to_integrate): Push to TV_INTEGRATION for inlining. * stmt.c (expand_return): Check for error_mark_node. cp/: * semantics.c (expand_body): Push to TV_EXPAND. * optimize.c (optimize_function): Push to TV_INTEGRATION. * decl.c (start_function): Always call announce_function. * tinfo2.cc: Just declare abort. From-SVN: r34470
2000-05-11regrename.c (replace_reg_in_block): Improve REG_DEAD handling.Stan Cox1-2/+2
* regrename.c (replace_reg_in_block): Improve REG_DEAD handling. * timevar.def (TV_RENAME_REGISTERS): Move before TV_SCHED2. * toplev.c (rest_of_compilation): Call regrename_optimize before sched2. From-SVN: r33845
2000-04-30ifcvt.c: New file.Richard Henderson1-0/+2
* ifcvt.c: New file. * Makefile.in (OBJS): Add it. (ifcvt.o): New target. * jump.c (jump_optimize_1): Remove all code related to if-conversion, and conditional arithmetic. (find_insert_position): Remove. * timevar.def (TV_IFCVT, TV_IFCVT2): New. * toplev.c (DFI_ce, DFI_ce2): New. (dump_file): Add ce and ce2 dumps. (rest_of_compilation): Run if_convert a couple o times. Set cse_not_expected after cse2. Don't set no_new_pseudos until after sched1 or recompute_reg_usage. From-SVN: r33547
2000-04-28Makefile.in (OBJS): Add timevar.o.Alex Samuel1-0/+73
hangeLog: * Makefile.in (OBJS): Add timevar.o. (toplev.o): Depend on timevar.h. (ggc-simple.o): Likewise. (ggc-page.o): Likewise. (timevar.o): New rule. (timevar.h): New rule. * timevar.h: New file. * timevar.c: Likewise. * timevar.def: Likewise. * toplev.h (gc_time, parse_time, varconst_time): Remove. * toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR throughout. (TIMEVAR): Remove macro. (gc_time, parse_time, varconst_time, integration_time, jump_time, cse_time, gcse_time, loop_time, cse2_time, branch_prob_time, flow_time, combine_time, regmove_time, sched_time, local_alloc_time, global_alloc_time, flow2_time, peephole2_time, sched2_time, dbr_sched_time, reorder_blocks_time, rename_registers_time, shorten_branch_time, stack_reg_time, to_ssa_time, from_ssa_time, final_time, symout_time, dump_time, all_time): Remove. (compile_file): Don't initialize time variables. Call init_timevar and start TV_TOTAL timer. Call timevar_print instead of many calls to print_time. (rest_of_compilation): Add timing for reload_cse_regs. (get_run_time): Removed to timevar.c. (print_time): Likewise. (get_run_time): Implement using TV_TOTAL time variable. (print_time): Get total run time from get_run_time. * ggc-page.c (ggc_collect): Push and pop TV_GC instead of computing elapsed time explicitly. * ggc-simple.c (ggc_collect): Likewise. (gc_time): Remove declaration. cp/ChangeLog: * lex.c (my_get_run_time): Remove. (init_filename_times): Use get_run_time instead of my_get_run_time. (check_newline): Likewise. (dump_time_statistics): Likewise. * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead of computing elapsed time explicitly. From-SVN: r33496