summaryrefslogtreecommitdiffstats
path: root/gcc/common.opt
Commit message (Collapse)AuthorAgeFilesLines
* * cgraph.c (cgraph_remove_node): Do not release function bodies untilhubicka2005-06-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | full cgraph is built. * cgraph.h (cgraph_decide_inlining_incrementally): Add early argument. * cgraphunit.c (cgraph_finalize_function): Update call of cgraph_decide_inlining_incrementally. (initialize_inline_failed): Break out of ... (cgraph_analyze_function): ... here. (rebuild_cgraph_edges): New function. (pass_rebuild_cgraph_edges): New pass. * common.opt (fearly-inlining): New flag. * ipa-inline.c: Include ggc.h (cgraph_clone_inlined_nodes): Avoid re-using of original copy when cgraph is not fully built. (cgraph_decide_inlining_incrementally): Add early mode. (cgraph_early_inlining): New function. (cgraph_gate_early_inlining): Likewise. (pass_early_ipa_inline): New pass. * ipa.c (cgraph_postorder): NULLify aux pointer. * tree-inline.c (expand_call_inline): Avoid warning early. * tree-optimize.c (pass_early_local_passes): New. (execute_cleanup_cfg_pre_ipa): New. (pass_cleanup_cfg): New. (register_dump_files): Fix handling subpasses of IPA pass. (init_tree_optimization_passes): Add early passes. (execute_ipa_pass_list): Fix handling of subpasses of IPA pass. * passes.h (pass_early_tree_profile, pass_rebuild_cgraph_edges, pass_early_ipa_inline): New passes. * tree-profile.c (do_early_tree_profiling, pass_early_tree_profile): New. * invoke.texi: Document early-inlining. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101369 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__.jakub2005-06-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cfgexpand.c: Include params.h. (has_protected_decls, has_short_buffer): New. (expand_stack_vars): Take a predicate to determine what to expand. (defer_stack_allocation): True when flag_stack_protect on. (SPCT_HAS_LARGE_CHAR_ARRAY, SPCT_HAS_SMALL_CHAR_ARRAY): New. (SPCT_HAS_ARRAY, SPCT_HAS_AGGREGATE): New. (stack_protect_classify_type, stack_protect_decl_phase): New. (stack_protect_decl_phase_1, stack_protect_decl_phase_2): New. (add_stack_protection_conflicts, create_stack_guard): New. (expand_used_vars): Add stack protection logic. (tree_expand_cfg): Likewise. * common.opt (Wstack-protector): New. (fstack-protector, fstack-protector-all): New. * function.c: Include predict.h. (assign_parm_adjust_stack_rtl): Zap stack_parm when stack protect wants to copy the parameter into the stack frame. (stack_protect_prologue, stack_protect_epilogue): New. (expand_function_end): Call stack_protect_epilogue. Do sjlj_emit_function_exit_after after naked_return_label. * function.h (struct function): Add stack_protect_guard. * params.def (PARAM_SSP_BUFFER_SIZE): New. * toplev.c (process_options): Disable flag_stack_protect and/or warn_stack_protect based on FRAME_GROWS_DOWNWARD. * tree.h (stack_protect_prologue): Declare. * target-def.h (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. (TARGET_INITIALIZER): Add them. * target.h (struct gcc_target): Add stack_protect_guard and stack_protect_fail. * targhooks.c: Include ggc.h, gty header. (stack_chk_guard_decl, default_stack_protect_guard): New. (stack_chk_fail_decl, default_external_stack_protect_fail): New. (default_hidden_stack_protect_fail): New. * targhooks.h (default_stack_protect_guard): Declare. (default_external_stack_protect_fail): Declare. (default_hidden_stack_protect_fail): Declare. * config/i386/i386.c (TARGET_STACK_PROTECT_FAIL): New. * config/i386/i386.md (UNSPEC_SP_SET, UNSPEC_SP_TEST): New. (trap): Use ud2. (conditional_trap, conditional_trap_1): Remove. (stack_protect_set, stack_protect_set_si, stack_protect_set_di): New. (stack_protect_test, stack_protect_test_si, stack_protect_test_di): New. * doc/md.texi (stack_protect_set, stack_protect_test): New. * doc/tm.texi (TARGET_STACK_PROTECT_GUARD): New. (TARGET_STACK_PROTECT_FAIL): New. * libgcc-std.ver (GCC_4.1.0): New. * libgcc.h (__stack_chk_guard): Declare. (__stack_chk_fail, __stack_chk_fail_local): Declare. * libgcc2.c (L_stack_chk, L_stack_chk_local): New. * mklibgcc.in (lib2funcs): Add them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101348 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kcook2005-06-251-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101317 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-optimize.c (init_tree_optimization_passes): Fix flags ofhubicka2005-06-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | all_passes and all_ipa_passes. * c-common.c: Include cgraph.h (handle_externally_visible_attribute): New function. (c_common_att): Add "externally_visible" attribute. * cgraph.c (decide_is_variable_needed): Obey externally visible flag. (cgraph_varpool_finalize_decl): Avoid redundant checking. * cgraph.h (struct cgraph_node): New flag externally_visible. (decide_is_function_needed): Obey externally visible flag. (cgraph_finalize_function): Avoid redundant checks. (cgraph_function_and_variable_visibility): Bring symbols local when asked for. * common.opt (fwhole-program): New flag. * doc/invoke.texi (-fwhole-program): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101295 138bc75d-0d04-0410-961f-82ee72b054a4
* * lcm.c: Move all mode-switching related functions from here...steven2005-06-041-1/+0
| | | | | | | | | | | | | | | * mode-switching.c: ...to this new file. * doc/passes.texi: Update accordingly. * basic-block.h (label_value_list): Remove extern decl. * cfgrtl.c (label_value_list): Remove. (can_delete_label_p): Don't look at it. * cfgcleanup.c (cleanup_cfg): Don't free it. * common.opt: Don't refer to non-existing flag_alias_check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100591 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (fjump-tables): New.jsm282005-06-011-0/+4
| | | | | | | | | * doc/invoke.texi (-fno-jump-tables): Document. * stmt.c (expand_end_case_type): Do not emit jump tables unless flag_jump_tables. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100457 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (-Wattributes): New. Default true.dj2005-05-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/invoke.texi (-Wno-attributes): Document. * attribs.c (decl_attributes): Move warning control from if() to warning(OPT_*). * c-common.c (handle_packed_attribute): Likewise. (handle_nocommon_attribute): Likewise. (handle_common_attribute): Likewise. (handle_noreturn_attribute): Likewise. (handle_noinline_attribute): Likewise. (handle_always_inline_attribute): Likewise. (handle_used_attribute): Likewise. (handle_unused_attribute): Likewise. (handle_const_attribute): Likewise. (handle_transparent_union_attribute): Likewise. (handle_constructor_attribute): Likewise. (handle_destructor_attribute): Likewise. (handle_mode_attribute): Likewise. (handle_alias_attribute): Likewise. (handle_visibility_attribute): Likewise. (handle_tls_model_attribute): Likewise. (handle_malloc_attribute): Likewise. (handle_returns_twice_attribute): Likewise. (handle_pure_attribute): Likewise. (handle_deprecated_attribute): Likewise. (handle_vector_size_attribute): Likewise. (handle_nothrow_attribute): Likewise. (handle_cleanup_attribute): Likewise. (handle_warn_unused_result_attribute): Likewise. (handle_sentinel_attribute): Likewise. * c-decl.c (diagnose_mismatched_decls): Likewise. (start_decl): Likewise. (grokdeclarator): Likewise. (start_function): Likewise. * c-format.c (check_function_format): Likewise. * stor-layout.c (place_field): Likewise. (finalize_record_size): Likewise. * tree.c (handle_dll_attribute)): Likewise. * varasm.c (default_assemble_visibility): Likewise. * config/darwin.c (darwin_handle_weak_import_attribute): Likewise. (darwin_assemble_visibility): Likewise. * config/arc/arc.c (arc_handle_interrupt_attribute): Likewise. * config/arm/arm.c (arm_handle_fndecl_attribute): Likewise. (arm_handle_isr_attribute): Likewise. * config/avr/avr.c (avr_handle_progmem_attribute): Likewise. (avr_handle_fndecl_attribute): Likewise. * config/bfin/bfin.c (handle_int_attribute): Likewise. * config/c4x/c4x.c (c4x_handle_fntype_attribute): Likewise. * config/h8300/h8300.c (h8300_handle_fndecl_attribute): Likewise. (h8300_handle_eightbit_data_attribute): Likewise. (h8300_handle_tiny_data_attribute): Likewise. * config/i386/i386.c (ix86_handle_cdecl_attribute): Likewise. (ix86_handle_regparm_attribute): Likewise. (ix86_handle_struct_attribute): Likewise. * config/i386/winnt.c (ix86_handle_shared_attribute): Likewise. (i386_pe_encode_section_info): Likewise. * config/ia64/ia64.c (ia64_handle_model_attribute): Likewise. * config/ip2k/ip2k.c (ip2k_handle_progmem_attribute): Likewise. (ip2k_handle_fndecl_attribute): Likewise. * config/m32r/m32r.c (m32r_handle_model_attribute): Likewise. * config/m68hc11/m68hc11 (m68hc11_handle_page0_attribute): Likewise. (m68hc11_handle_fntype_attribute): Likewise. (m68hc11_encode_section_info): Likewise. * config/m68k/m68k.c (m68k_handle_fndecl_attribute): Likewise. * config/mcore/mcore.c (mcore_handle_naked_attribute): Likewise. * config/ns32k/ns32k.c (ns32k_handle_fntype_attribute): Likewise. * config/rs6000/rs6000.c (rs6000_handle_longcall_attribute): Likewise. * config/sh/sh.c (sh_handle_interrupt_handler_attribute): Likewise. (sh_handle_sp_switch_attribute): Likewise. (sh_handle_trap_exit_attribute): Likewise. * config/sh/symbian.c (sh_symbian_dllimport_p): Likewise. (sh_symbian_handle_dll_attribute): Likewise. * config/stormy16/stormy16.c (xstormy16_handle_interrupt_attribute): Likewise. (xstormy16_handle_below100_attribute): Likewise. * config/v850/v850.c (v850_handle_interrupt_attribute): Likewise. [testsuite] * gcc.dg/Wattributes-1.c: New. * gcc.dg/Wattributes-2.c: New. * gcc.dg/Wattributes-3.c: New. [cp] * decl.c (duplicate_decls): Move warning control from if() to warning(OPT_*). * name-lookup.c (parse_using_directive): Likewise. * parser.c (cp_parser_elaborated_type_specifier): Likewise. (cp_parser_init_declarator): Likewise. * tree.c (handle_com_interface_attribute): Likewise. [java] * class.c (set_constant_value): Move warning control from if() to warning(OPT_*). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100136 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (fdiagnostics-show-option): No variable is needed.dj2005-05-041-1/+1
| | | | | | | | | | | | | | * diagnostic.h (diagnostic_context): Add show_option_requested flag. * diagnostic.c (diagnostic_initialize): Initialize show_option_requested. (diagnostic_report_diagnostic): Test for enabled diagnostics here. Save and restore original message format. Use flag in context instead of global. (warning): Don't test for enabled warnings here. * opts.c (common_handle_option): Handle -fdiagnostics-show-option here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99204 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinerydj2005-05-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | decide if the warning will be printed. * calls.c (expand_call): Likewise. * function.c (init-function_start): Likewise. * common.opt (-fdiagnostics-show-option): New. * opts.c (option_enabled): Accept the option index instead of a pointer to the option descriptor. * opts.h (option_enabled): Likewise. * toplev.c (print_switch_values): Pass option index, not option descriptor. * diagnostic.h (diagnostic_info): Add option_index. * diagnostic.c: Include opts.h. (diagnostic_set_info): Initialize option_index. (diagnostic_report_diagnostic): Amend option name if appropriate. (warning): Check to see if the specified warning is enabled. Store option index. * doc/invoke.texi (-fdiagnostics-show-options): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99169 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from tree-cleanup-branch: VRP, store CCP, storednovillo2005-04-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | copy-prop, incremental SSA updating of FUD chains and newly exposed symbols. * Makefile.in (tree-ssa-copy.o): Depend on tree-ssa-propagate.h. (OBJS-common): Add tree-vrp.o. (tree-vrp.o): New rule. * basic-block.h (nearest_common_dominator_for_set): Declare. * common.opt (ftree-store-ccp): New flag. (ftree-copy-prop): New flag. (ftree-vrp): New flag. (ftree-store-copy-prop): New flag. * dominance.c (nearest_common_dominator_for_set): New. * domwalk.c (walk_dominator_tree): Only traverse statements in blocks marked in walk_data->interesting_blocks. * domwalk.h (struct dom_walk_data): Add field interesting_blocks. * fold-const.c (fold): Handle ASSERT_EXPR. * opts.c (decode_options): Set flag_tree_copy_prop at -O1. Set flag_tree_store_ccp, flag_tree_store_copy_prop and flag_tree_vrp at -O2. * timevar.def (TV_TREE_VRP): Define. (TV_TREE_COPY_PROP): Define. (TV_TREE_STORE_COPY_PROP): Define. (TV_TREE_SSA_INCREMENTAL): Define. (TV_TREE_STORE_CCP): Define. * tree-cfg.c (tree_can_merge_blocks_p): Remove reference to kill_redundant_phi_nodes from comment. (verify_expr): Handle ASSERT_EXPR. * tree-dfa.c (mark_new_vars_to_rename): Remove second argument. Update all users. (mark_call_clobbered_vars_to_rename): Remove. Update all users. * tree-flow-inline.h (unmodifiable_var_p): New. * tree-flow.h (enum value_range_type): Declare. (struct value_range_def): Declare. (value_range): Declare. (remove_all_phi_nodes_for): Remove. Update all users. (find_phi_node_for): Declare. (add_type_alias): Declare. (count_uses_and_derefs): Declare. (kill_redundant_phi_nodes): Remove. (rewrite_into_ssa): Remove. (rewrite_def_def_chains): Remove. (update_ssa, register_new_name_mapping, create_new_def_for, need_ssa_update_p, name_registered_for_update_p, release_ssa_name_after_update_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by, mark_sym_for_renaming, mark_set_for_renaming, get_current_def, set_current_def, get_value_range, dump_value_range, debug_value_range, dump_all_value_ranges, debug_all_value_ranges, expr_computes_nonzero, loop_depth_of_name, unmodifiable_var_p): Declare. * tree-gimple.c (is_gimple_formal_tmp_rhs): Handle ASSERT_EXPR. * tree-into-ssa.c (block_defs_stack): Update comment. (old_ssa_names, new_ssa_names, old_virtual_ssa_names, syms_to_rename, names_to_release, repl_tbl, need_to_initialize_update_ssa_p, need_to_update_vops_p, need_to_replace_names_p): New locals. (NAME_SETS_GROWTH_FACTOR): Define. (struct repl_map_d): Declare. (struct mark_def_sites_global_data): Add field interesting_blocks. (enum rewrite_mode): Declare. (REGISTER_DEFS_IN_THIS_STMT): Define. (compute_global_livein): Use last_basic_block instead of n_basic_blocks. (set_def_block): Remove last argument. Update all callers. (prepare_use_operand_for_rename): Remove. Update all callers. (prepare_def_operand_for_rename): Remove. Update all callers. (symbol_marked_for_renaming): New. (is_old_name): New. (is_new_name): New. (repl_map_hash): New. (repl_map_eq): New. (repl_map_free): New. (names_replaced_by): New. (add_to_repl_tbl): New. (add_new_name_mapping): New. (mark_def_sites): Assume that all the operands in the statement are in normal form. (find_idf): Assert that the block in the stack is valid. (get_default_def_for): New. (insert_phi_nodes_for): Add new argument 'update_p'. Add documentation. If update_p is true, add a new mapping between the LHS of each new PHI and the name that it replaces. (insert_phi_nodes_1): Only call find_idf if needed. (get_reaching_def): Call get_default_def_for. (rewrite_operand): Remove. (rewrite_stmt): Do nothing if REGISTER_DEFS_IN_THIS_STMT and REWRITE_THIS_STMT are false. Assume that all the operands in the statement are in normal form. (rewrite_add_phi_arguments): Don't use PHI_REWRITTEN. (rewrite_virtual_phi_arguments): Remove. (invalidate_name_tags): Remove. (register_new_update_single, register_new_update_set, rewrite_update_init_block, replace_use, rewrite_update_fini_block, rewrite_update_stmt, rewrite_update_phi_arguments): New. rewrite_blocks): Remove argument 'fix_virtual_phis'. Add arguments 'entry', 'what' and 'blocks'. Initialize the dominator walker according to 'what' and 'blocks'. Start the dominator walk at 'entry'. (mark_def_site_blocks): Add argument 'interesting_blocks'. Use it to configure the dominator walker. (rewrite_into_ssa): Remove argument 'all'. Make internal. (rewrite_all_into_ssa): Remove. (rewrite_def_def_chains): Remove. (mark_def_interesting, mark_use_interesting, prepare_phi_args_for_update, prepare_block_for_update, prepare_def_site_for, prepare_def_sites, dump_names_replaced_by, debug_names_replaced_by, dump_repl_tbl, debug_repl_tbl, init_update_ssa, delete_update_ssa, create_new_def_for, register_new_name_mapping, mark_sym_for_renaming, mark_set_for_renaming, need_ssa_update_p, name_registered_for_update_p, ssa_names_to_replace, release_ssa_name_after_update_ssa, insert_updated_phi_nodes_for, update_ssa): New. * tree-loop-linear.c (linear_transform_loops): Call update_ssa instead of rewrite_into_ssa. * tree-optimize.c (vars_to_rename): Remove. Update all users. (init_tree_optimization_passes): Replace pass_redundant_phi with pass_copy_prop. Add pass_vrp. Replace pass_ccp with pass_store_ccp. Add pass_store_copy_prop after pass_store_ccp. (execute_todo): If the TODO_ flags don't include updating the SSA form, assert that it does not need to be updated. Call update_ssa instead of rewrite_into_ssa and rewrite_def_def_chains. If TODO_verify_loops is set, call verify_loop_closed_ssa. (tree_rest_of_compilation): * tree-pass.h (TODO_dump_func, TODO_ggc_collect, TODO_verify_ssa, TODO_verify_flow, TODO_verify_stmts, TODO_cleanup_cfg): Renumber. (TODO_verify_loops, TODO_update_ssa, TODO_update_ssa_no_phi, TODO_update_ssa_full_phi, TODO_update_ssa_only_virtuals): Define. (pass_copy_prop, pass_store_ccp, pass_store_copy_prop, pass_vrp): Declare. * tree-phinodes.c (make_phi_node): Update documentation. (remove_all_phi_nodes_for): Remove. (find_phi_node_for): New. * tree-pretty-print.c (dump_generic_node): Handle ASSERT_EXPR. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs): Likewise. (interpret_rhs_modify_expr): Likewise. * tree-sra.c (decide_instantiations): Mark all symbols in SRA_CANDIDATES for renaming. (mark_all_v_defs_1): Rename from mark_all_v_defs. (mark_all_v_defs): New function. Update all users to call it with the whole list of scalarized statements, not just the first one. * tree-ssa-alias.c (count_ptr_derefs): Make extern. (compute_flow_insensitive_aliasing): If the tag is unmodifiable and the variable isn't or vice-versa, don't make them alias of each other. (setup_pointers_and_addressables): If the type tag for VAR is about to change, mark the old one for renaming. (add_type_alias): New. * tree-ssa-ccp.c: Document SSA-CCP and STORE-CCP. (ccp_lattice_t): Rename from latticevalue. (value): Remove. Update all users. (const_val): New local variable. (do_store_ccp): New local variable. (dump_lattice_value): Handle UNINITIALIZED. (debug_lattice_value): New. (get_default_value): Re-write. (set_lattice_value): Re-write. (def_to_varying): Remove. Update all users. (likely_value): Return VARYING for statements that make stores when STORE_CCP is false. Return VARYING for any statement other than MODIFY_EXPR, COND_EXPR and SWITCH_EXPR. (ccp_initialize): Re-write. (replace_uses_in, replace_vuse_in, substitute_and_fold): Move to tree-ssa-propagate.c. (ccp_lattice_meet): Handle memory stores when DO_STORE_CCP is true. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Add argument 'store_ccp'. Copy it into DO_STORE_CCP. (do_ssa_ccp): New. (pass_ccp): Use it. (do_ssa_store_ccp): New. (gate_store_ccp): New. (pass_store_ccp): Declare. * tree-ssa-copy.c: Include tree-ssa-propagate.h. (may_propagate_copy): Reformat. Don't abort if ORIG is a virtual and DEST isn't. If NEW does not have alias information but DEST does, copy it. (copy_of, cached_last_copy_of, do_store_copy_prop, enum copy_prop_kind, which_copy_prop): Declare. (stmt_may_generate_copy, get_copy_of_val, get_last_copy_of, set_copy_of_val, dump_copy_of, copy_prop_visit_assignment, copy_prop_visit_cond_stmt, copy_prop_visit_stmt, copy_prop_visit_phi_node, init_copy_prop, fini_copy_prop, execute_copy_prop, gate_copy_prop, do_copy_prop, gate_store_copy_prop, store_copy_prop): New. (pass_copy_prop, pass_store_copy_prop): Declare. * tree-ssa-dom.c (struct opt_stats_d): Add fields 'num_const_prop' and 'num_copy_prop'. (cprop_operand): Update them. (dump_dominator_optimization_stats): Dump them. (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_into_ssa. (loop_depth_of_name): Declare extern. (simplify_cond_and_lookup_avail_expr): Guard against NULL values for LOW or HIGH. (cprop_into_successor_phis): Only propagate if NEW != ORIG. (record_equivalences_from_stmt): Call expr_computes_nonzero. (cprop_operand): Only propagate if VAL != OP. * tree-ssa-dse.c (dse_optimize_stmt): Mark symbols in removed statement for renaming. * tree-ssa-loop-im.c (move_computations): Call update_ssa. * tree-ssa-loop-ivopts.c (rewrite_address_base): Call add_type_alias if necessary. Call mark_new_vars_to_rename. (tree_ssa_iv_optimize): If new symbols need to be renamed, mark every statement updated, call update_ssa and rewrite_into_loop_closed_ssa. * tree-ssa-loop-manip.c (add_exit_phis): Do not remove DEF_BB from LIVEIN if VAR is a virtual. * tree-ssa-loop.c (tree_loop_optimizer_init): Call update_ssa. * tree-ssa-operands.c (get_expr_operands): Handle ASSERT_EXPR. (get_call_expr_operands): Reformat statement. (add_stmt_operand): Don't create V_MAY_DEFs for read-only symbols. * tree-ssa-propagate.c (ssa_prop_init): Initialize SSA_NAME_VALUE for every name. (first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by): New. (replace_uses_in, replace_vuses_in, replace_phi_args_in, substitute_and_fold): Move from tree-ssa-ccp.c. * tree-ssa-propagate.h (struct prop_value_d, prop_value_t, first_vdef, stmt_makes_single_load, stmt_makes_single_store, get_value_loaded_by, replace_uses_in, substitute_and_fold): Declare. * tree-ssa.c (verify_use): Fix error message. (propagate_into_addr, replace_immediate_uses, get_eq_name, check_phi_redundancy, kill_redundant_phi_nodes, pass_redundant_phi): Remove. Update all users. * tree-vect-transform.c (vect_create_data_ref_ptr): Call add_type_alias, if necessary. * tree-vectorizer.h (struct _stmt_vect_info): Update documentation for field 'memtag'. * tree-vrp.c: New file. * tree.def (ASSERT_EXPR): Define. * tree.h (ASSERT_EXPR_VAR): Define. (ASSERT_EXPR_COND): Define. (SSA_NAME_VALUE_RANGE): Define. (struct tree_ssa_name): Add field 'value_range'. (PHI_REWRITTEN): Remove. (struct tree_phi_node): Remove field 'rewritten'. * doc/invoke.texi (-fdump-tree-storeccp, -ftree-copy-prop, -ftree-store-copy-prop): Document. * doc/tree-ssa.texi: Remove broken link to McCAT's compiler. Document usage of update_ssa. testsuite/ChangeLog * g++.dg/tree-ssa/pr18178.C: New test. * gcc.c-torture/execute/20030216-1.x: Ignore at -O1. * gcc.c-torture/execute/20041019-1.c: New test. * gcc.dg/tree-ssa/20041008-1.c: New test. * gcc.dg/tree-ssa/ssa-ccp-12.c: New test. * gcc.dg/tree-ssa/20030731-2.c: Update to use -fdump-tree-store_ccp. * gcc.dg/tree-ssa/20030917-1.c: Likewise. * gcc.dg/tree-ssa/20030917-3.c: Likewise. * gcc.dg/tree-ssa/20040721-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-1.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-2.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-3.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-7.c: Likewise. * gcc.dg/tree-ssa/ssa-ccp-9.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97884 138bc75d-0d04-0410-961f-82ee72b054a4
* * c.opt (-F): Remove trailing whitespace from help string.rsandifo2005-04-061-3/+3
| | | | | | | | | | (-finput-charset): Use a tab to separate the switch name and help string. * common.opt (-fsched-stalled-insns, -fsched-stalled-insns-dep) (-ftree-vectorizer-verbose): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97742 138bc75d-0d04-0410-961f-82ee72b054a4
* Make -f[no-]show-column also control non-cpp diagnostics.bothner2005-03-281-1/+5
| | | | | | | | | | * c.opt (fshow-column): Move option from here ... * common.opt (fshow-column): ... to here. * diagnostic.c (diagnostic_build_prefix): Only print column number if flag_show_column. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97127 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (m): Remove.rsandifo2005-03-181-3/+0
| | | | | | | | | * opts.c (handle_option): Pass 'm' options to set_target_switch if table lookup fails. (common_handle_option): Remove OPT_m case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96650 138bc75d-0d04-0410-961f-82ee72b054a4
* In gcc/ada/dberlin2005-03-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-03-12 Daniel Berlin <dberlin@dberlin.org> * misc.c (gnat_post_options): Turn off structural aliasing for now. In gcc/ 2005-03-12 Daniel Berlin <dberlin@dberlin.org> * tree-flow-inline.h (ref_contains_array_ref): New function. (lookup_subvars_for_var): Ditto. (get_subvars_for_var): Ditto. (var_can_have_subvars): Ditto. * tree-flow.h (mem_tag_kind): Add STRUCT_FIELD. (struct subvar): New type. * tree-dfa.c (okay_component_ref_for_subvars): New function. * tree-optimize.c (init_tree_optimization_passes): Call pass_create_structure_vars. * tree-ssa-alias.c: Include vec.h. (init_alias_info): Don't auto-clear call clobbered on struct-field tags. (compute_flow_insensitive_aliasing): Handle subvars. (group_aliases): Handle STRUCT_FIELD aliases. (setup_pointers_and_addressables): Ditto. Don't mark variables non-addressable if they still have addressable subvars. Also mark subvars addressable when the real variable is marked addressable. (add_pointed_to_var): Try to prune the pointed-to set by only pointing to subvars when possible. Otherwise, make sure we set addresses_needed and pt_vars to properly include subvars. (bitpos_of_field): New function. (push_fields_onto_fieldstack): Ditto. (get_or_create_used_part_for): Ditto. (create_overlap_variables_for): Ditto. (find_used_portions): Ditto. (create_structure_vars): Ditto. (pass_create_structure_vars): New structure. * tree-ssa-operands.c (finalize_ssa_v_must_defs): Remove assert. (get_expr_operands): Handle subvars. Also try to turn COMPONENT_REF accesses into must-defs now that we can accurately portray it. (note_addressable): Try to only mark as addressable those subvars we know a COMPONENT_REF touches. (overlap_subvar): New function. * tree-vect-analyze.c (vect_object_analysis): Add new parameter. Handle subvar storing. (vect_address_analysis): Update caller of vect_object_analysis. * tree-vect-transform.c (vect_create_data_ref_ptr): Copy subvars. * tree-vectorizer.h (struct _stmt_vec_info): Add subvars member. (STMT_VINFO_SUBVARS): New macro. * common.opts: add flag_tree_salias. * opts.c (decode_options): flag_tree_salias defaults to on. * doc/invoke.texi: Document fdump-tree-svars and -ftree-salias. * doc/tree-ssa.texi: Document structural alias analysis. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96362 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-03-01 Daniel Berlin <dberlin@dberlin.org>dberlin2005-03-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (tree-ssa-sink.o): New. (OBJS-common): Add tree-ssa-sink.o. * common.opt: Add -ftree-sink * opts.c (decode_options): flag_tree_sink is set at O1 or higher. * timevar.def (TV_TREE_SINK): new timevar. * tree-flow.h (is_hidden_global_store): Prototype. * tree-optimize.c (init_tree_optimization_passes): Add pass_sink_code. * tree-pass.h (pass_sink_code): New. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Move checking for non-obvious global store store to is_hidden_global_store, and call that new function. * tree-ssa-sink.c: New file. * doc/invoke.texi: Document -fdump-tree-sink and -ftree-sink. * doc/passes.texi: Document forward store motion. * testsuite/gcc.dg/tree-ssa/ssa-sink-1.c: New test * testsuite/gcc.dg/tree-ssa/ssa-sink-2.c: New test * testsuite/gcc.dg/tree-ssa/ssa-sink-3.c: New test * testsuite/gcc.dg/tree-ssa/ssa-sink-4.c: New test git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95750 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/18902rth2005-02-241-0/+4
| | | | | | | | | | | | | | * c-opts.c (c_common_post_options): Set flag_complex_method to 2 for c99. * common.opt (fcx-limited-range): New. * opts.c (set_fast_math_flags): Set flag_cx_limited_range. * toplev.c (flag_complex_method): Initialize to 1. (process_options): Set flag_complex_method to 0 if flag_cx_limited_range. * doc/invoke.texi (-fcx-limited-range): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95493 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/invoke.texi (ftree-vectorizer-verbose): New.dorit2005-02-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * opts.c (OPT_ftree_vectorizer_verbose_): New case for switch. * common.opt (ftree-vectorizer-verbose): New Flag for the vectorizer was added. * tree.h (vect_set_verbosity_level): New extern function declaration added. * tree-vectorizer.h (verbosity_levels): New enum type. * tree-vectorizer.c (vect_debug_stats): Function removed. (vect_debug_details): Likewise. (vect_verbosity_level): Global variable was defined and initialized. (vect_dump): Global variable definition. (vect_print_dump_info): New function. (vect_set_dump_settings): New function. (vect_set_verbosity_level): New function. (vectorize_loops): Add call to vect_set_dump_settings. (slpeel_make_loop_iterate_ntimes): Dump condition was changed. (slpeel_tree_duplicate_loop_to_edge_cfg): Likewise. (slpeel_tree_peel_loop_to_edge): Likewise. (vect_analyze_offset_expr): Call to vect_print_dump_info with appropriate verbosity level instead of call to vect_debug_details or vect_debug_stats. (vect_get_base_and_offset): (vect_create_addr_base_for_vector_ref): (get_vectype_for_scalar_type): (vect_create_data_ref_ptr): (vect_init_vector): (vect_get_vec_def_for_operand): (vect_finish_stmt_generation): (vectorizable_assignment): (vectorizable_operation): (vectorizable_store): (vectorizable_load): (vect_transform_stmt): (vect_update_ivs_after_vectorizer): (vect_do_peeling_for_loop_bound): (vect_update_inits_of_drs): (vect_do_peeling_for_alignment): (vect_transform_loop): (vect_is_simple_use): (vect_analyze_operations): (vect_is_simple_iv_evolution): (vect_analyze_scalar_cycles): (vect_analyze_data_ref_dependence): (vect_analyze_data_ref_dependences): (vect_compute_data_ref_alignment): (vect_enhance_data_refs_alignment): (vect_analyze_data_refs_alignment): (vect_analyze_data_ref_access): (vect_analyze_data_ref_accesses): (vect_analyze_pointer_ref_access): (vect_get_memtag_and_dr): (vect_analyze_data_refs): (vect_mark_relevant): (vect_stmt_relevant_p): (vect_mark_stmts_to_be_vectorized): (vect_can_advance_ivs_p): (vect_get_loop_niters): (vect_analyze_loop_form): (vect_analyze_loop): (vectorize_loops): Likewise. (vect_do_peeling_for_loop_bound): Dump format slightly changed. (vect_update_inits_of_drs): (vect_do_peeling_for_alignment): (vect_transform_loop): (vect_analyze_operations): (vect_analyze_scalar_cycles): (vect_analyze_data_ref_dependences): (vect_analyze_data_refs_alignment): (vect_analyze_data_ref_accesses): (vect_analyze_data_refs): (vect_mark_stmts_to_be_vectorized): (vect_get_loop_niters): (vect_analyze_loop_form): (vect_analyze_loop): Likewise. (vect_mark_stmts_to_be_vectorized): Add call to print_generic_expr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94697 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-01-17 Paolo Bonzini <bonzini@gnu.org>bonzini2005-01-171-5/+1
| | | | | | | | | | | | | | * common.opt (-fnew-ra): Remove. * ra*.*: Remove. * toplev.h (flag_new_regalloc): Remove. * Makefile.in (ra*.*): Don't mention. * passes.c (rest_of_handle_new_regalloc): Remove. (rest_of_handle_combine, rest_of_compilation): Always consider flag_new_regalloc as false. * doc/invoke.texi: Don't document -fnew-ra. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93759 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>pinskia2004-10-281-1/+1
| | | | | | | | PR other/18186 * common.opt (--param): Fix spelling of parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89731 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-10-18 Revital Eres <eres@il.ibm.com>hagog2004-10-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (loop-unroll.o): Add VARRAY_H dependency. * loop-unroll.c: Include varray.h. (struct var_to_expand, struct opt_info): Rename split_ivs_info to opt_info and expand it to support variable expansion. (analyze_insns_in_loop): Rename analyze_ivs_to_split and expand it to support variable expansion. (pt_info_start_duplication): Rename si_info_start_duplication. (apply_opt_in_copies): Rename split_ivs_in_copies and add support to the variable expansion optimization. (free_opt_info): Rename free_si_info. (analyze_insn_to_expand_var, referenced_in_one_insn_in_loop_p, expand_var_during_unrolling, insert_var_expansion_initialization, combine_var_copies_in_loop_exit, release_var_copies, get_expansion): New functions. (peel_loop_completely, unroll_loop_constant_iterations, unroll_loop_runtime_iterations, peel_loop_simple, unroll_loop_stupid): Change uses of struct si_info to struct opt_info and add uses of fvariable-expansion-in-unroller flag. * params.def: Add parameter to restrict the number of expansions. * params.h: (MAX_VARIABLE_EXPANSIONS): New define to restrict the number of expansions. * common.opt: (fvariable-expansion-in-unroller): New flag. * doc/invoke.texi: (fvariable-expansion-in-unroller): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89197 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (ftree-loop-ivcanon): Enable by default.rakdver2004-10-011-1/+1
| | | | | | | | | | | | | * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Enable complete loop unrolling. (canonicalize_induction_variables, tree_unroll_loops_completely): Reset scev info. * gcc.dg/tree-ssa/loop-1.c: Check that unrolling occurs already on tree level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88404 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (flag_gcse_sm): Disable by default.steven2004-09-281-3/+3
| | | | | | | | | | | (flag_gcse_las): Likewise. (flag_web): Likewise. Create from this file. * flags.h: Remove flag_web declaration. * toplev.c (flag_web): Likewise. (process_options): Never set flag_web. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88250 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (loop-unroll.o): Add HASHTAB_H and RECOG_H dependency.rakdver2004-09-141-0/+4
| | | | | | | | | | | | | | | | | | | | | * basic-block.h (struct reorder_block_def): Add copy_number field. * cfgloop.h (biv_p): Declare. * cfgloopmanip.c (duplicate_loop_to_header_edge): Set copy_number. * common.opt (fsplit-ivs-in-unroller): New flag. * loop-iv.c (biv_p): New function. * loop-unroll.c: Include hashtab.h and recog.h. (struct iv_to_split, struct split_ivs_info): New types. (analyze_ivs_to_split, si_info_start_duplication, split_ivs_in_copies, free_si_info, si_info_hash, si_info_eq, analyze_iv_to_split_insn, determine_split_iv_delta, get_ivts_expr, allocate_basic_variable, insert_base_initialization, split_iv): New functions. (peel_loop_completely, unroll_loop_constant_iterations, unroll_loop_runtime_iterations, peel_loop_simple, unroll_loop_stupid): Use them. * doc/invoke.texi (-fsplit-ivs-in-unroller): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87487 138bc75d-0d04-0410-961f-82ee72b054a4
* * unroll.c: Removed.rakdver2004-09-141-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * loop.h: Removed. * Makefile.in (LOOP_H, unroll.o): Removed. (toplev.o, passes.o, stmt.o, integrate.o, loop.o): Remove LOOP_H dependency. * alias.c (init_alias_analysis): Remove flag_old_unroll_loops reference. * cfgloop.h (LOOP_PREFETCH, loop_optimize): Moved from loop.h. * common.opt (fold-unroll-loops, fold-unroll-all-loops): Removed. * loop.c: Do not include loop.h. (LOOP_INFO, LOOP_MOVABLES, LOOP_REGS, LOOP_IVS, INSN_LUID, REGNO_FIRST_LUID, REGNO_LAST_LUID, enum g_types, struct induction, struct iv_class, enum iv_mode, struct iv, REG_IV_TYPE, REG_IV_INFO, REG_IV_CLASS, struct loop_ivs, struct loop_mem_info, struct loop_reg, struct loop_regs, struct loop_movables, struct loop_info): Moved from loop.h. (back_branch_in_range_p, fold_rtx_mult_add, biv_total_increment, reg_dead_after_loop, final_biv_value, loop_find_equiv_value, find_common_reg_term, loop_iterations, final_giv_value): Moved from unroll.c. (uid_luid, uid_loop, max_uid_for_loop, max_reg_before_loop, loop_dump_stream, for_each_insn_in_loop, express_from, extend_value_for_giv, loop_iv_add_mult_emit_before, loop_iv_add_mult_sink, loop_iv_add_mult_hoist, loop_insn_first_p, get_condition_for_loop, loop_insn_emit_before, loop_insn_hoist, loop_insn_sink): Made static. (loop_invariant_p): Made static. Removed flag_old_unroll_loops reference. (strength_reduce): Do not call unroller. (record_giv): Do not initialize unrolled field. (prescan_loop): Do not set loop_info->preconditioned. * passes.c: Do not include loop.h. (rest_of_handle_loop_optimize): Do not call unroller. * predict.c: Do not include loop.h. * rtl.h (NOTE_PRECONDITIONED): Removed. * stmt.c: Do not include loop.h. * toplev.c: Do not include loop.h. (process_options): Do not handle flag_old_unroll_loops. * doc/invoke.texi (fold-unroll-loops, fold-unroll-all-loops): Documentation removed. * doc/passes.texi (unroll.c, loop.h): Documentation removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87485 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-12 Toon Moene <toon@moene.indiv.nluug.nl>toon2004-09-121-8/+0
| | | | | | | | | | | | | | | | * common.opt: Remove flags -fmove-all-movables and -freduce-all-givs. * loop-invariant.c (find_invariants_to_move): Remove all uses of flag_move_all_movables. * loop.c (move_movables): Remove all uses of flag_move_all_movables. (strength_reduce): Remove all uses of flag_reduce_all_givs. * doc/invoke.texi: Remove documentation of flags -fremove-all-movables and -freduce-all-givs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87386 138bc75d-0d04-0410-961f-82ee72b054a4
* Toplevel:dberlin2004-09-091-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-09-09 Daniel Berlin <dberlin@dberlin.org> * Makefile.def: Remove libbanshee. * Makefile.tpl: Ditto. * configure.in: Ditto. * Makefile.in: Regen. * configure: Ditto. gcc/ 2004-09-09 Daniel Berlin <dberlin@dberlin.org> * Makefile.in: Remove libbanshee, tree-alias-*. Remove tree-alias-common.h dependencies. * common.opt: Remove -ftree-points-to. * configure.ac: Remove libbanshee. * flags.h: Remove pta_type, flag_tree_points_to. * gengtype.c (open_base_files): Remove tree-alias-type.h. * opts.c (OPT_ftree_points_to): Remove. * toplev.c: Remove tree-alias-common.h, flag_tree_points_to. * tree-dfa.c: Remove tree-alias-common.h * tree-into-ssa.c: Ditto. * tree-outof-ssa.c: Ditto. * tree-ssa-copyrename.c: Ditto. * tree-ssa-live.c: Ditto. * tree-optimize.c: Ditto. * tree-ssa.c: Ditto. Remove pass_build_pta, pass_del_pta. * tree-pass.h: Ditto. * tree-ssa-alias.c: Remove tree-alias-common.h. (struct alias_stats_d): Remove pta_queries, pta_resolved. (pass_may_alias): Remove PROP_pta requirement. (may_alias_p): Remove pta_queries, pta_resolved, use of andersens. (get_tmt_for): Ditto. (dump_alias_stats): Ditto. * doc/passes.texi: Remove blurb about points-to analysis. * fortran/Make-lang.in: Remove tree-alias-*.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87253 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-08 Daniel Berlin <dberlin@dberlin.org>dberlin2004-09-081-0/+4
| | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87190 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-ssa-loop-ivopts.c: New file.rakdver2004-09-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87100 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/7054rth2004-09-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defaults.h (TARGET_DEFAULT_PACK_STRUCT): Provide default. * tree.h (initial_max_fld_align): Declare * stor-layout.c (initial_max_fld_align): Define and initialize. (maximum_field_alignment): Initialize to the same value. * common.opt: Add -fpack-struct= variant of switch. * opts.c: Handle -fpack-struct= variant of switch. * c-pragma.c: Change #pragma pack() handling so that it becomes compatible to other compilers: accept individual 'push' argument, make final pop restore (command line) default, correct interaction of push/pop and sole specification of a new alignment (so that the sequence #pragma pack(push) - #pragma pack(<n>) becomes identical to #pragma pack(push, <n>). * doc/extend.texi: New node "Structure-Packing Pragmas" under "Pragmas", describing #pragma pack. * doc/invoke.texi: Document -fpack-struct=<n> variant of switch. * doc/tm.texi: Adjust description for HANDLE_PRAGMA_PACK_PUSH_POP. Document new TARGET_DEFAULT_PACK_STRUCT. testsuite: * gcc.dg/pack-test-2.c: Adjust to permit and check #pragma pack(push). * gcc.dg/c99-flex-array-4.c: Add -fpack-struct=8 to provide a deterministic starting point for the alignment of structure fields. * gcc.dg/Wpadded.c: Dito. * g++.dg/abi/vbase10.C: Dito. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87037 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-09-02 Daniel Berlin <dberlin@dberlin.org>dberlin2004-09-031-6/+6
| | | | | | | | | | | * gcc/common.opt: Rename ivcanon to tree-loop-ivcanon, tree-lim to tree-loop-im. * gcc/tree-ssa-loop.c: Ditto * gcc/tree-ssa-loop-ivcanon.c: Ditto * gcc/doc/invoke.texi: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87023 138bc75d-0d04-0410-961f-82ee72b054a4
* Enable -ftrapping-math by default.wilson2004-09-021-1/+1
| | | | | | | * common.opt (ftrapping-math): Default to on. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86972 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (rtl-profile.o, value-prof.o): Add GCC_H dependency.rakdver2004-09-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.opt (fspeculative-prefetching): New. * flags.h (flag_speculative_prefetching_set): Declare. * gcov-io.c (gcov_write_counter, gcov_read_counter): Allow negative values. * opts.c (flag_sepculative_prefetching_set): New variable. (common_handle_option): Handle -fspeculative-prefetching. * passes.c (rest_of_compilation): Ditto. * profile.c (instrument_values, compute_value_histograms, branch_prob): Use vectors instead of arrays. * toplev.c (process_options): Handle -fspeculative-prefetching. * rtl-profile.c: Include ggc.h. (rtl_gen_interval_profiler, rtl_gen_pow2_profiler, rtl_gen_one_value_profiler_no_edge_manipulation, rtl_gen_one_value_profiler, rtl_gen_const_delta_profiler): Type of argument changed. * tree-profile.c (tree_gen_interval_profiler, tree_gen_pow2_profiler, tree_gen_one_value_profiler, tree_gen_const_delta_profiler): Type of argument changed. * value-prof.c: Include ggc.h. (NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX): New macros. (insn_prefetch_values_to_profile, find_mem_reference_1, find_mem_reference_2, find_mem_reference, gen_speculative_prefetch, speculative_prefetching_transform): New. (value_profile_transformations): Call speculative_prefetching_transform. (insn_values_to_profile): Call insn_prefetch_values_to_profile. (insn_divmod_values_to_profile, rtl_find_values_to_profile, tree_find_values_to_profile, find_values to profile): Use vectors instead of arrays. (free_profiled_values): Removed. * value-prof.h (struct histogram_value): Renamed to struct histogram_value_t. (histogram_value, histogram_values): New types. (find_values_to_profile): Declaration changed. (free_profiled_values): Removed. (struct profile_hooks): Type of argument of the hooks changed to histogram_value. * doc/invoke.texi (-fspeculative-prefetching): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86930 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-ssa-loop-ivcanon.c: New file.rakdver2004-08-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86516 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees.dorit2004-08-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86131 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-08-08 Mostafa Hagog <mustafa@il.ibm.com>hagog2004-08-081-0/+4
| | | | | | | | | | | | | | | | | | | | Ayal Zaks <zaks@il.ibm.com> * common.opt (freschedule-modulo-scheduled-loops): New flag. * final.c (final_scan_insn): Handle NOTE_DISABLE_SCHED_OF_BLOCK. * modulo-sched.c (sms_schedule): Emit a note to disable scheduling when -freschedule-modulo-scheduled-loops flag is not specified. (sms_schedule_by_order, ps_insn_advance_column, add_node_to_ps, add_node_to_ps, ps_has_conflicts, ps_add_node_check_conflicts): More accurate placing of insn in row of partial schedule. (ps_insn_find_column): New function. * rtl.h (NOTE_DISABLE_SCHED_OF_BLOCK): New note. * sched-rgn.c (sched_is_disabled_for_current_region_p): New. (schedule_region): Use sched_is_disabled_for_current_region_p. * docs/invoke.texi: Document -freschedule-modulo-scheduled-loops. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85696 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/9283giovannibajo2004-07-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/15000 * c-common.c (c_common_attribute_table): Allow handle_visibility_attribute to be called for types. (handle_visibility_attribute) When given a type, set the visibility bits on the TYPE_NAME. When given a decl, don't set no_add_attrs so that we can check later whether the attribute was present. Added warning if attribute applied to non class type. * c-decl.c (diagnose_mismatched_decls): Updated rules for merging decls and checking that they are consistent. * common.opt: Added -fvisibility. * c.opt, c-opts.c: Added -fvisibility-inlines-hidden. * c-pragma.h, c-pragma.c: Added handle_pragma_visibility(). * flags.h, tree.h: Added assorted support defines for overall patch * opts.c: Added parsing support for -fvisibility. * tree.c (build_decl): Set visibility for all decls to be whatever is in force at that time. * varasm.c (default_binds_local_p_1): Reworked logic determining when to make a symbol locally bound. * doc/invoke.texi: Added documentation for -fvisibility and -fvisibility-inlines-hidden. PR c++/15000 PR c++/9283 * class.c (check_field_decls): Apply hidden visibility if -fvisibility-inlines-hidden and inlined unless otherwise specified (build_vtable): Set vtable visibility to class visibility. (check_field_decls): Default static member visibility to class visibility. (check_methods): Default method visibility to class visibility. * cp-tree.h: Added CLASSTYPE_VISIBILITY and CLASSTYPE_VISIBILITY_SPECIFIED macro. * decl.c (duplicate_decls): New logic for merging definition decls with declaration decls. Added ignore & warning when non default applied to global operator new or delete. * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED wherever VISIBILITY was changed * rtti.c (get_tinfo_decl): Set typeinfo visibility to class visibility. (tinfo_base_init): Set typeinfo name visibility to class visibility. PR c++/9283 PR c++/15000 * gcc.dg/visibility-9.c, gcc.dg/visibility-a.c: New tests. * g++.dg/ext/visibility/: New directory. * g++.dg/ext/visibility-1.C, g++.dg/ext/visibility-2.C g++.dg/ext/visibility-3.C, g++.dg/ext/visibility-4.C, g++.dg/ext/visibility-5.C, g++.dg/ext/visibility-6.C, g++.dg/ext/visibility-7.C: Move to g++.dg/ext/visibility/. * g++.dg/ext/visibility/fvisibility.C, g++.dg/ext/visibility/fvisibility-inlines-hidden.C, g++.dg/ext/visibility/fvisibility-override1.C g++.dg/ext/visibility/fvisibility-override2.C g++.dg/ext/visibility/memfuncts.C g++.dg/ext/visibility/noPLT.C g++.dg/ext/visibility/pragma.C g++.dg/ext/visibility/pragma-override1.C g++.dg/ext/visibility/pragma-override2.C g++.dg/ext/visibility/staticmemfuncts.C g++.dg/ext/visibility/virtual.C: New tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85167 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree-ssa-loop-im.c: New file.rakdver2004-07-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84441 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-07-10 Kelley Cook <kcook@gcc.gnu.org>kcook2004-07-101-9/+86
| | | | | | | | | * flags.h: Delete redundant prototypes that are being generated in options.h from common.opt. * common.opt: Add in the expository comments formerly in flags.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84432 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (ftree-loop-optimize): New flag.rakdver2004-06-301-0/+4
| | | | | | | | | | | | | | | * tree-flow.h (kill_redundant_phi_nodes): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_loop. * tree-pass.h (pass_loop_init, pass_loop_done): Declare. * tree-ssa-loop.c (current_loops): New variable. (tree_loop_optimizer_init, gate_loop, tree_ssa_loop_init, tree_ssa_loop_done): New functions. (pass_loop, pass_loop_init, pass_loop_done): New passes. * tree-ssa.c (kill_redundant_phi_nodes): Export. * doc/invoke.texi (-ftree-loop-optimize): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83933 138bc75d-0d04-0410-961f-82ee72b054a4
* * common.opt (ftree-fre): New flag.dnovillo2004-06-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83837 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop-invariant.c: New file.rakdver2004-06-201-0/+8
| | | | | | | | | | | | | | | | | | | | * Makefile.in (loop-invariant.o): New. * cfgloop.h (global_cost_for_size, init_set_costs, move_loop_invariants): Declare. * cfgloopanal.c (seq_cost, init_set_costs, global_cost_for_size): New functions. (avail_regs, res_regs, small_cost, pres_cost, spill_cost): New variables. * common.opt (floop-optimize2, fmove-loop-invariants): New options. * loop-init.c (loop_optimizer_init): Call init_set_costs. * passes.c (rest_of_handle_loop2): Call move_loop_invariants. (rest_of_compilation): Check flag_loop_optimize2. * toplev.c (process_options): Handle flag_loop_optimize2. * doc/invoke.texi (-floop-optimize2, -fmove-loop-invariants): Document. * doc/passes.texi (loop-invariant.c): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83419 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (FLAGS_H): New.rakdver2004-06-141-167/+168
| | | | | | | | | | | | | | | | | | | | | | | | | (flags.h): Replace by FLAGS_H. * c.opt: Document Var, VarExists, Init and Report attributes. * common.opt: Fill the values of the attributes. * diagnostic.c (flag_fatal_errors): Do not define. * except.c (flag_non_call_exceptions): Do not define. * flags.h: Include options.h. Remove declarations conflicting with the automatically defined ones. * opts.c: Remove automatically defined variables. (handle_option): Perform default initialization. (common_handle_option): Do not handle options covered by the default initialization. * opts.h (struct cl_option): Add flag_var, has_set_value and set_value fields. (CL_REPORT): New. * opts.sh: Generate variable declarations, handle CL_REPORT. * toplev.c: Remove automatically defined variables. (f_options): Removed. (print_switch_values): Use cl_options instead of f_options. * toplev.h (version_flag): Declaration removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83105 138bc75d-0d04-0410-961f-82ee72b054a4
* * ddg.h, ddg.c, modulo-sched.c: New files.hagog2004-05-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82235 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>pinskia2004-05-201-4/+0
| | | | | | | * common.opt (ftree-loop-optimize): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82069 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge tree-ssa-20020619-branch into mainline.dnovillo2004-05-131-0/+71
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81764 138bc75d-0d04-0410-961f-82ee72b054a4
* Patch from Richard Guenther.wilson2004-04-301-0/+4
| | | | | | | | | | | | * commom.opt (Wfatal-errors): Add it. * diagnostic.c (flag_fatal_errors): Define it. (diagnostic_action_after_output): Check for flag_fatal_errors. * flags.h (flag_fatal_errors): Declare it. * opts.c (common_handle_option): Add OPT_Wfatal_errors. * doc/invoke.texi (Warning Options): Document -Wfatal-errors. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81323 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-04-09 Caroline Tice <ctice@apple.com>ctice2004-04-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h (struct edge_def): Add new field, crossing_edge. (struct basic_block_def): Add new field, partition. (UNPARTITIONED, HOT_PARTITION, COLD_PARTITION): New constant macro definitions. (partition_hot_cold_basic_blocks): Add extern function declaration. * bb-reorder.c (function.h, obstack.h, expr.h, regs.h): Add four new include statements. (N_ROUNDS): Increase the maximum number of rounds by 1. (branch_threshold): Add array value for new round. (exec_threshold): Add array value for new round. (push_to_next_round_p): New function. (add_unlikely_executed_notes): New function. (find_rarely_executed_basic_blocks_and_crossing_edges): New function. (mark_bb_for_unlikely_executed_section): New function. (add_labels_and_missing_jumps): New function. (add_reg_crossing_jump_notes): New function. (fix_up_fall_thru_edges): New function. (find_jump_block): New function. (fix_crossing_conditional_branches): New function. (fix_crossing_unconditional_branches): New function. (fix_edges_for_rarely_executed_code): New function. (partition_hot_cold_basic_blocks): New function. (find_traces): Add an extra round for partitioning hot/cold basic blocks. (find_traces_1_round): Add a parameter. Modify to push all cold blocks, and only cold blocks, into the last (extra) round of collecting traces. (better_edge_p): Add a parameter. Modify to favor non-crossing edges over crossing edges. (bb_to_key): Add code to correctly identify cold blocks when doing partitioning. (connect_traces): Modify to connect all the non-cold traces first, then go back and connect up all the cold traces. (reorder_basic_blocks): Add call to add_unlikely_executed_notes. * cfg.c (entry_exit_blocks): Add initialization for partition field in entry and exit blocks. * cfgbuild.c (make_edges): Update current_function_has_computed_jump if we are doing hot/cold partitioning. * cfgcleanup.c (cfglayout.h): Add new include statement. (try_simplify_condjump): Modify to not attempt on blocks with jumps that cross section boundaries. (try_forward_edges): Likewise. (merge_blocks_move_predecessor_nojumps): Likewise. (merge_blocks_move_successor_nojumps): Likewise. (merge_blocks_move): Likewise. (try_crossjump_to_edge): Modify to not attempt after we have done the block partitioning. (try_crossjump_bb): Modify to not attempt on blocks with jumps that cross section boundaries. (try_optimize_cfg): Likewise. * cfghooks.c (tidy_fallthru_edges): Modify to not remove indirect jumps that cross section boundaries. * cfglayout.c (flags.h): Add new include statement. (update_unlikely_executed_notes): New function. (fixup_reorder_chain): Add code so when a new jumping basic block is added, it's UNLIKELY_EXECUTED_CODE and REG_CROSSING_JUMP notes are updated appropriately. (duplicate_insn_chain): Add code to duplicate the new NOTE insn introduced by this optimization. * cfglayout.h (scan_ahead_for_unlikely_executed_note): Add new extern function declaration. * cfgrtl.c (can_delete_note_p): Add NOTE_INSN_UNLIKELY_EXECUTED_CODE to list of notes that can be deleted. (create_basic_block_structure): Add initialization for partition field. (rtl_can_merge_blocks): Modify to test blocks for jumps that cross section boundaries. (try_redirect_by_replacing_jump): Modify to not attempt on jumps that cross section boundaries. (commit_one_edge_insertion): Add code so newly created basic block ends up in correct (hot or cold) section. Modify to disallow insertions before NOTE_INSN_UNLIKELY_EXECUTED_CODE notes. (rtl_verify_flow_info_1): Add code to verify that no fall_thru edge crosses section boundaries. (cfg_layout_can_merge_blocks_p): Modify to test blocks for jumps that cross section boundaries. (force_nonfallthru_and_redirect): Modify to make sure new basic block ends up in correct section, with correct notes attached. * common.opt (freorder-blocks-and-partition): Add new flag for this optimization. * dbxout.c (dbx_function_end): Add code to make sure scope labels at the end of functions are written into the correct (hot or cold) section. (dbx_source_file): Add code so writing debug file information doesn't incorrectly change sections. * defaults.h (NORMAL_TEXT_SECTION_NAME): New constant macro, for use in partitioning hot/cold basic blocks into separate sections. (SECTION_FORMAT_STRING): New constant macro, for linux/i386 hot/cold section partitioning. (HAS_LONG_COND_BRANCH): New constant macro, indicating whether or not conditional branches can span all of memory. (HAS_LONG_UNCOND_BRANCH): New constant macro, indicationg whether or not unconditional branches can span all of memory. * final.c (scan_ahead_for_unlikely_executed_note): New function. (final_scan_insn): Add code to check for NOTE instruction indicating whether basic block belongs in hot or cold section, and to make sure the current basic block is being written to the appropriate section. Also added code to ensure that jump table basic blocks end up in the correct section. * flags.h (flag_reorder_blocks_and_partition): New flag. * ifcvt.c (find_if_case_1): Modify to not attempt if conversion if one of the branches has a jump that crosses between sections. (find_if_case_2): Likewise. (ifcvt): Modify to not attempt to mark loop exit edges after hot/cold partitioning has occurred. * opts.c (decode_options): Code to handle new flag, flag_reorder_blocks_and_partition; also to turn it off if flag_exceptions is on. (common_handle_option): Code to handle new flag, flag_reorder_blocks_and_partition. * output.h (unlikely_text_section): New extern function declaration. (in_unlikely_text_section): New extern function declaration. * passes.c (rest_of_handle_stack_regs): Add flag_reorder_blocks_and_partition as an 'or' condition for calling reorder_basic_blocks. (rest_of_handle_reorder_blocks): Add flag_reorder_blocks_and_partition as an 'or' condition for calling reorder_basic_blocks. (rest_of_compilation): Add call to partition_hot_cold_basic_blocks. * print-rtl.c (print_rtx): Add code for handling new note, NOTE_INSN_UNLIKELY_EXECUTED_CODE * rtl.c (NOTE_INSN_UNLIKELY_EXECUTED_CODE): New note insn (see below). (REG_CROSSING_JUMP): New kind of reg_note, to mark jumps that cross between section boundaries. * rtl.h (NOTE_INSN_UNLIKELY_EXECUTED_CODE): New note instruction, indicating the basic block containing it belongs in the cold section. (REG_CROSSING_JUMP): New type of reg_note, to mark jumps that cross between hot and cold sections. * toplev.c (flag_reorder_blocks_and_partition): Add code to initialize this flag, and to tie it to the command-line option freorder-blocks-and-partition. * varasm.c (cfglayout.h): Add new include statement. (unlikely_section_label_printed): New global variable, used for determining when to output section name labels for cold sections. (in_section): Add in_unlikely_executed_text to enum data structure. (text_section): Modify code to use SECTION_FORMAT_STRING and NORMAL_TEXT_SECTION_NAME macros. (unlikely_text_section): New function. (in_unlikely_text_section): New function. (function_section): Add code to make sure beginning of function is written into correct section (hot or cold). (assemble_start_function): Add code to make sure stuff is written to the correct section. (assemble_zeros): Add in_unlikely_text_section as an 'or' condition to an if statement that was checking 'in_text_section'. (assemble_variable): Add 'in_unlikely_text_section' as an 'or' condition to an if statement that was checking 'in_text_section'. (default_section_type_flags_1): Add check: if in cold section flags = SECTION_CODE. * config/darwin.c (darwin_asm_named_section): Modify to use SECTION_FORMAT_STRING if we are partitioning hot/cold blocks. * config/i386/i386.h (HAS_LONG_COND_BRANCH): Defined this macro specifically for the i386. (HAS_LONG_UNCOND_BRANCH): Defined this macro specifically for the i386. * config/rs6000/darwin.h (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Change text string to something more informative. (NORMAL_TEXT_SECTION_NAME): Add new definition. (SECTION_FORMAT_STRING): Add new definition. * config/rs6000/rs6000.c (rs6000_assemble_integer): Add '!in_unlikely_text_section' as an 'and' condition to an if statement that was already checking '!in_text_section'. * config/rs6000/sysv4.h (HOT_TEXT_SECTION_NAME,NORMAL_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME,SECTION_FORMAT_STRING): Make sure these are properly defined for linux on ppc. * doc/invoke.texi (freorder-blocks-and-partition): Add documentation for this new flag. * doc/rtl.texi (REG_CROSSING_JUMP): Add documentation for new reg_note. * doc/tm.texi (NORMAL_TEXT_SECTION_NAME, SECTION_FORMAT_STRING, HAS_LONG_COND_BRANCH, HAS_LONG_UNCOND_BRANCH): Add documentation for these new macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80564 138bc75d-0d04-0410-961f-82ee72b054a4
* New option -Wstrict-aliasing=2.wilson2004-03-101-0/+4
| | | | | | | | | | | | | | * alias.c (alias_sets_might_conflict_p): New. * c-typeck.c (build_c_cast): Call it if warn_strict_aliasing > 1. * common.opt (Wstrict-aliasing=): New. * flags.h (warn_strict_aliasing): Change type to int. * opts.c (warn_strict_aliasing): Change type to int. (common_handle_option): Handle OPT_Wstrict_aliasing_. * tree.h (alias_sets_might_conflict_p): Declare it. * doc/invoke.tex (-Wstrict-aliasing=2): Document it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79222 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-03-03 Mostafa Hagog <mustafa@il.ibm.com>dje2004-03-031-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common.opt: Add description of the new -fgcse-after-reload flag. * flags.h (flag_gcse_after_reload): Declaration of global variable. * gcse.c (reg_used_on_edge ,reg_set_between_after_reload_p, reg_used_between_after_reload_p, rtx 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): New functions to implement gcse-after-reload. (gcse_after_reload_main): New function, the main entry point to gcse-after-reload. * rtl.h (gcse_after_reload_main): Declaration of the new function. * opts.c (common_handle_option): Handle the -fgcse-after-reload flag. * toplev.c (flag_gcse_after_reload): Initialization. * passes.c (rest_of_handl_gcse2): Call gcse_after_reload_main. * params.def (PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION, PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION): New parameters for tuning the gcse after reload optimization. * params.h (GCSE_AFTER_RELOAD_PARTIAL_FRACTION, GCSE_AFTER_RELOAD_CRITICAL_FRACTION): Two macros to access the tuning parameters. * doc/invoke.texi: Documentation for the new flag gcse-after-reload. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78842 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/kazu2004-02-231-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove -fwritable-strings. * c-common.c (fix_string_type): Don't check flag_writable_strings. (fix_string_type): Likewise. * c-opts.c (set_std_c89): Don't initialize flag_writable_strings. (set_std_c99): Likewise. * common.opt (fwritable-strings): Remove. * flags.h: Remove the external declaration of flag_writable_strings. * opts.c (common_handle_option) <OPT_fwritable_strings>: Remove. * toplev.c (flag_writable_strings): Remove. (f_options): Remove an entry for writable-strings. * varasm.c (const_hash_1) <STRING_CST>: Don't check flag_writable_strings. (compare_constant) <STRING_CST>: Likewise. (build_constant_desc): Likewise. * config/darwin.c (machopic_select_section): Likewise. * config/arm/arm.c (AOF_ASSEMBLER): Likewise. * config/arm/pe.c (arm_pe_encode_section_info): Likewise. * config/iq2000/iq2000.c (iq2000_select_section): Likewise. * config/mips/mips.c (mips_select_section): Likewise. (mips_encode_section_info): Likewise. * config/pa/pa.c (pa_select_section): Likewise. * config/pa/pa.h (TEXT_SPACE_P): Likewise. * config/v850/v850.c (v850_select_section): Likewise. * doc/invoke.texi (-fwritable-strings): Remove. (-fno-const-strings): Don't mention -fwritable-strings. * doc/trouble.texi: Don't mention -fwritable-strings. gcc/cp/ * decl.c (cxx_init_decl_processing): Don't check flag_writable_strings. gcc/testsuite/ * gcc.dg/fwritable-strings-1.c: Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78333 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud