aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2008-08-30optabs.c (expand_abs_nojump): Update BRANCH_COST call.Jan Hubicka37-57/+168
* optabs.c (expand_abs_nojump): Update BRANCH_COST call. * fold-cost.c (LOGICAL_OP_NON_SHORT_CIRCUIT, fold_truthop): Likewise. * dojump.c (do_jump): Likewise. * ifcvt.c (MAX_CONDITIONAL_EXECUTE): Likewise. (note-if_info): Add BRANCH_COST. (noce_try_store_flag_constants, noce_try_addcc, noce_try_store_flag_mask, noce_try_cmove_arith, noce_try_cmove_arith, noce_try_cmove_arith, noce_find_if_block, find_if_case_1, find_if_case_2): Use compuated branch cost. * expr.h (BRANCH_COST): Update default. * predict.c (predictable_edge_p): New function. * expmed.c (expand_smod_pow2, expand_sdiv_pow2, emit_store_flag): Update BRANCH_COST call. * basic-block.h (predictable_edge_p): Declare. * config/alpha/alpha.h (BRANCH_COST): Update. * config/frv/frv.h (BRANCH_COST): Update. * config/s390/s390.h (BRANCH_COST): Update. * config/spu/spu.h (BRANCH_COST): Update. * config/sparc/sparc.h (BRANCH_COST): Update. * config/m32r/m32r.h (BRANCH_COST): Update. * config/i386/i386.h (BRANCH_COST): Update. * config/i386/i386.c (ix86_expand_int_movcc): Update use of BRANCH_COST. * config/sh/sh.h (BRANCH_COST): Update. * config/pdp11/pdp11.h (BRANCH_COST): Update. * config/avr/avr.h (BRANCH_COST): Update. * config/crx/crx.h (BRANCH_COST): Update. * config/xtensa/xtensa.h (BRANCH_COST): Update. * config/stormy16/stormy16.h (BRANCH_COST): Update. * config/m68hc11/m68hc11.h (BRANCH_COST): Update. * config/iq2000/iq2000.h (BRANCH_COST): Update. * config/ia64/ia64.h (BRANCH_COST): Update. * config/rs6000/rs6000.h (BRANCH_COST): Update. * config/arc/arc.h (BRANCH_COST): Update. * config/score/score.h (BRANCH_COST): Update. * config/arm/arm.h (BRANCH_COST): Update. * config/pa/pa.h (BRANCH_COST): Update. * config/mips/mips.h (BRANCH_COST): Update. * config/vax/vax.h (BRANCH_COST): Update. * config/h8300/h8300.h (BRANCH_COST): Update. * params.def (PARAM_PREDICTABLE_BRANCH_OUTCOME): New. * doc/invoke.texi (predictable-branch-cost-outcome): Document. * doc/tm.texi (BRANCH_COST): Update. From-SVN: r139804
2008-08-30re PR target/37283 (Cannot build crtbegin.o for ARM)Samuel Tardieu2-2/+12
gcc/ PR target/37283 * config/arm/arm.c (arm_optimization_options): Set flag_section_anchors to 2 instead of 1 to distinguish it from -fsection-anchors given explicitely on the command line. From-SVN: r139803
2008-08-30recog.c (split_insn): Consider attaching a REG_EQUAL note to the final insn ↵Richard Sandiford2-0/+25
of a split. gcc/ * recog.c (split_insn): Consider attaching a REG_EQUAL note to the final insn of a split. From-SVN: r139802
2008-08-30parse.c (parse_interface): Silence uninitialized var warning.Jan Hubicka12-48/+77
* parse.c (parse_interface): Silence uninitialized var warning. * postreload-gcse.c (gate_handle_gcse2): Disable for functions optimized for speed. * final.c (compute_alignments): Use optimize_bb_for_size_p. * tree-call-cdce.c (gate_call_cdce): Use optimize_function_for_speed_p. * opts.c (flag_predictive_commoning_set, flag_unswitch_loops_set, flag_gcse_after_reload_set): New static vars. (common_handle_option): Enable those flags for profile-use. (decode_options): Remove optimize_size flags that are handled on higher granuality. * tree-vectorizer.c (vectorize_loops): Use optimize_loop_nest_for_speed_p. * tree-ssa-pre.c (do_pre): Use optimize_function_for_speed_p. * tree-predcom.c (tree_predictive_commoning): Use optimize_loop_for_speed_p. * varasm.c (assemble_start_function): Use optimize_function_for_speed_p. * bb-reorder.c (rest_of_handle_reorder_blocks): Likewise. * predict.c (optimize_loop_for_speed_p): Fix walk. From-SVN: r139801
2008-08-30ipa-inline.c (cgraph_estimate_growth): Discover self recursive functions.Jan Hubicka2-9/+28
* ipa-inline.c (cgraph_estimate_growth): Discover self recursive functions. (cgraph_decide_inlining_of_small_function): Use edge->count to detect profile presence locally. From-SVN: r139800
2008-08-30Make-lang.in: Allow s-oscons.{o,ali} to be built even without a separate ↵Thomas Quinot2-2/+9
libada directory. 2008-08-30 Thomas Quinot <quinot@adacore.com> gcc/ada/ * gcc-interface/Make-lang.in: Allow s-oscons.{o,ali} to be built even without a separate libada directory. From-SVN: r139799
2008-08-30Implement C++0x 'auto' semantics.Jason Merrill11-19/+332
* decl.c (start_decl_1): Don't complain about auto being incomplete. (cp_finish_decl): Deduce auto. * init.c (build_new): Handle 'new auto'. * typeck2.c (cxx_incomplete_type_diagnostic): Give a different message for auto than for normal template type parms. * pt.c (type_dependent_expression_p): Handle { }. (make_auto): New function. (listify_autos): New function. (do_auto_deduction): New function. (is_auto): New function. (type_uses_auto): New function. * cp-tree.h: Declare them. * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't treat auto as a declspec. (cp_parser_simple_type_specifier): It's a type-specifier. From-SVN: r139798
2008-08-30Daily bump.GCC Administrator1-1/+1
From-SVN: r139795
2008-08-30re PR bootstrap/37086 (GCC 3.4 miscompiles trunk (for cross compiling))Joseph Myers2-0/+11
PR bootstrap/37086 * tree-vrp.c (find_switch_asserts): Make idx volatile for GCC versions before 4.0. From-SVN: r139792
2008-08-29mangle.c (write_type): Add target-specific manglings for non-fundamental ↵Mark Mitchell4-1/+20
types to the substitution table. * mangle.c (write_type): Add target-specific manglings for non-fundamental types to the substitution table. * g++.dg/abi/mangle-neon.C: Add substitution test. From-SVN: r139791
2008-08-29tree-inline.c (insert_init_stmt): Insert sequence even when not in SSA form.Jan Hubicka2-4/+9
* tree-inline.c (insert_init_stmt): Insert sequence even when not in SSA form. From-SVN: r139790
2008-08-29mn10300.c (mn10300_secondary_reload_class): We need secondary reloads for ↵Jeff Law2-12/+34
AM33-2 if IN is a pseudo with an equivalent... * mn10300.c (mn10300_secondary_reload_class): We need secondary reloads for AM33-2 if IN is a pseudo with an equivalent memory location and class is an FP register. From-SVN: r139789
2008-08-29see.c (see_merge_one_def_extension): Silence used uninitialized warning.Jan Hubicka6-4/+14
* see.c (see_merge_one_def_extension): Silence used uninitialized warning. * matrix-reorg.c (check_allocation_function): Likewise. * config/i386/driver-i386.c (detect_caches_amd): Likewise. * parse.c (parse_interface): Likewise. From-SVN: r139788
2008-08-29re PR middle-end/37261 (Spurious (?) "integer overflow in expression" warnings)Jakub Jelinek4-8/+29
PR c/37261 * fold-const.c (fold_binary): In (X | C1) & C2 canonicalization compute new & and | in type rather than TREE_TYPE (arg0). * gcc.dg/pr37261.c: New test. From-SVN: r139784
2008-08-29dwarf2out.c (fortran_common): Update comment.Jakub Jelinek2-25/+29
* dwarf2out.c (fortran_common): Update comment. (gen_variable_die): Swap com_die and var_die variables in Fortran COMMON block handling code. From-SVN: r139783
2008-08-29dwarf2out.c (descr_info_loc): Handle VAR_DECL.Jakub Jelinek6-3/+23
* dwarf2out.c (descr_info_loc): Handle VAR_DECL. * trans.h (struct lang_type): Add span. (GFC_TYPE_ARRAY_SPAN): Define. * trans-decl.c (gfc_get_symbol_decl): For subref array pointers, copy TREE_STATIC from decl to span instead of setting it unconditionally, set DECL_ARTIFICIAL, fix type of initializer and set GFC_TYPE_ARRAY_SPAN on decl's type. * trans-types.c (gfc_get_array_descr_info): If GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size. From-SVN: r139782
2008-08-29dwarf2out.c (gen_const_die): New function.Jakub Jelinek4-6/+361
* dwarf2out.c (gen_const_die): New function. (size_of_die, value_format, output_die): Output larger dw_val_class_vec using DW_FORM_block2 or DW_FORM_block4. (native_encode_initializer): New function. (tree_add_const_value_attribute): Call it. (gen_decl_die, dwarf2out_decl): Handle CONST_DECLs if is_fortran (). * trans-decl.c (check_constant_initializer, gfc_emit_parameter_debug_info): New functions. (gfc_generate_module_vars, gfc_generate_function_code): Emit PARAMETERs and unreferenced variables with initializers into debug info. From-SVN: r139781
2008-08-29gfortran.h (gfc_use_list): Add where field.Jakub Jelinek4-22/+50
* gfortran.h (gfc_use_list): Add where field. * module.c (use_locus): New static variable. (gfc_match_use): Set it. (gfc_use_module): Copy it to gfc_use_list's where field. * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts. (gfc_trans_use_stmts): Set backend locus before calling the debug hook. Allow non-VAR_DECLs to be created even for non-external module. Don't emit anything so far for renames from different modules. From-SVN: r139780
2008-08-29dwarf2out.c (gen_formal_parameter_die, [...]): For DECL_BY_REFERENCE decls ↵Jakub Jelinek2-10/+17
don't pass TREE_READONLY and TREE_THIS_VOLATILE to... * dwarf2out.c (gen_formal_parameter_die, gen_variable_die): For DECL_BY_REFERENCE decls don't pass TREE_READONLY and TREE_THIS_VOLATILE to add_type_attribute. From-SVN: r139779
2008-08-29dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG types.Jakub Jelinek2-4/+50
* dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG types. (gen_array_type_die): Emit DW_TAG_string_type for Fortran character types. From-SVN: r139778
2008-08-29re PR fortran/24790 (arguments are displayed as reference or pointer to ↵Jakub Jelinek2-0/+8
normal type in GDB) PR fortran/24790 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on PARM_DECLs with pointer or reference type. From-SVN: r139777
2008-08-29dwarf2out.c (loc_by_reference): New function.Jakub Jelinek2-6/+39
* dwarf2out.c (loc_by_reference): New function. (add_location_or_const_value_attribute): Use it. From-SVN: r139776
2008-08-29re PR fortran/23057 (Fortran common blocks are not described with ↵Jakub Jelinek4-18/+53
DW_TAG_common_block) PR fortran/23057 * dwarf2out.c (gen_variable_die): Represent Fortran COMMON vars as DW_TAG_variable children of DW_TAG_common_block rather than DW_TAG_member children. Put DW_AT_external to individual DW_TAG_variable DIEs, not to DW_TAG_common_block. * gfortran.dg/debug/pr35154-dwarf2.f: Adjust for replacement of DW_TAG_member with DW_TAG_variable. From-SVN: r139775
2008-08-29trans-decl.c (gfc_build_qualified_array): Build non-flat array type for ↵Jakub Jelinek4-0/+56
debug info purposes. * trans-decl.c (gfc_build_qualified_array): Build non-flat array type for debug info purposes. * dwarf2out.c (add_bound_info): If lookup_decl_die failed, try loc_descriptor_from_tree_1. From-SVN: r139774
2008-08-29re PR fortran/29635 (debug info of modules)Jakub Jelinek20-79/+493
PR fortran/29635 PR fortran/23057 * debug.h (struct gcc_debug_hooks): Add NAME and CHILD arguments to imported_module_or_decl. (debug_nothing_tree_tree): Removed. (debug_nothing_tree_tree_tree_bool): New prototype. * debug.c (do_nothing_debug_hooks): Adjust. (debug_nothing_tree_tree): Removed. (debug_nothing_tree_tree_tree_bool): New function. * dwarf2out.c (is_symbol_die): Handle DW_TAG_module. (gen_variable_die): Put all common vars for the same COMMON block under one DW_TAG_common_block. (declare_in_namespace): Return new context_die, for Fortran return the module DIE instead of adding extra declarations into the namespace. (gen_type_die_with_usage): Adjust declare_in_namespace caller. (gen_namespace_die): If is_fortran (), generate DW_TAG_module instead of DW_TAG_namespace. If DECL_EXTERNAL is set, add DW_AT_declaration. (dwarf2out_global_decl): Don't skip Fortran global vars. (gen_decl_die): Likewise. Adjust declare_in_namespace callers. (dwarf2out_imported_module_or_decl): Add NAME and CHILD arguments. If NAME is non-NULL, add DW_AT_name. If CHILD is non-NULL, put DW_TAG_imported_declaration as child of previous DW_TAG_imported_module. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Adjust. * sdbout.c (sdb_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using): Adjust debug_hooks->imported_module_or_decl callers. * f95-lang.c (gfc_init_ts): New function. (LANG_HOOKS_INIT_TS): Define. * gfortran.h (gfc_use_rename): New type, moved from module.c. (gfc_get_use_rename): New macro, moved from module.c. (gfc_use_list): New type. (gfc_get_use_list): New macro. (gfc_namespace): Add use_stmts field. (gfc_free_use_stmts): New prototype. * Make-lang.in (fortran/trans-decl.o): Depend on debug.h. * module.c (gfc_use_rename, gfc_get_use_rename): Moved to gfortran.h. (gfc_use_module): Chain the USE statement info to ns->use_stmts. (gfc_free_use_stmts): New function. * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts. * trans.h (struct module_htab_entry): New type. (gfc_find_module, gfc_module_add_decl): New functions. * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for the module, adjust DECL_CONTEXTs of module procedures and call gfc_module_add_decl for them. * trans-common.c (build_common_decl): Set DECL_IGNORED_P on the common variable. (create_common): Set DECL_IGNORED_P for use associated vars. * trans-decl.c: Include debug.h. (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from modules. (build_function_decl): Allow current_function_decl's context to be a NAMESPACE_DECL. (module_htab, cur_module): New variables. (module_htab_do_hash, module_htab_eq, module_htab_decls_hash, module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New functions. (gfc_create_module_variable): Adjust DECL_CONTEXTs of module variables and types and call gfc_module_add_decl for them. (gfc_generate_module_vars): Temporarily set cur_module. (gfc_trans_use_stmts): New function. (gfc_generate_function_code): Call it. (gfc_generate_block_data): Set DECL_IGNORED_P on decl. * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT and TYPE_CONTEXT of module derived types. From-SVN: r139773
2008-08-29cgraph.c (cgraph_remove_node): Do not remove nested nodes.Jan Hubicka11-126/+279
* cgraph.c (cgraph_remove_node): Do not remove nested nodes. * cgraph.h (cgraph_maybe_hot_edge_p): Declare. * ipa-cp.c (n_cloning_candidates): New static variable. (ipcp_print_profile_data, ipcp_function_scale_print): Forward declare. (ipcp_print_all_lattices): Improve debug output. (ipcp_cloning_candidate_p): New function. (ipcp_initialize_node_lattices): Use it. (ipcp_init_stage): Do only analyzis here; prettier debug output. (ipcp_propagate_stage): Prettier debug output. (ipcp_iterate_stage): Initialize latices here; prettier debug output. (ipcp_print_all_structures): Remove. (ipcp_need_redirect_p): Test !n_cloning_candidates. (ipcp_insert_stage): Prettier debug output; call cgraph_remove_unreachable_nodes before propagating. (pass_ipa_cp): Schedule function removal pass. * ipa-inline.c (inline_indirect_intraprocedural_analysis): Better debug output. (cgraph_maybe_hot_edge_p): Move to ... * predict.c (cgraph_maybe_hot_edge_p) ... here. * opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New. (common_handle_option): Set them; enable ipa-cp when profiling. * ipa-prop.c (ipa_print_node_jump_functions): Prettier output. (ipa_print_all_jump_functions): Likewise. (ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. * ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags, ipa_print_all_param_flags): Remove. (ipa_print_node_params, ipa_print_all_params): New. From-SVN: r139772
2008-08-29xtensa.c (xtensa_secondary_reload_class): Revert change from 2008-04-03.Bob Wilson3-2/+12
* config/xtensa/xtensa.c (xtensa_secondary_reload_class): Revert change from 2008-04-03. * config/xtensa/xtensa.h (IRA_COVER_CLASSES): Define. From-SVN: r139771
2008-08-29re PR rtl-optimization/37251 (ICE with ira: delete_allocno_from_bucket)Vladimir Makarov2-0/+8
2008-08-29 Vladimir Makarov <vmakarov@redhat.com> PR rtl-opt/37251 * ira-color.c (push_allocnos_to_stack): Truncate removed_splay_allocno_vec. From-SVN: r139770
2008-08-29re PR middle-end/37243 (IRA causes wrong code generation)Vladimir Makarov2-2/+12
2008-08-29 Vladimir Makarov <vmakarov@redhat.com> PR rtl-opt/37243 * ira-color (ira_fast_allocation): Don't assign hard registers to global allocnos. From-SVN: r139769
2008-08-29re PR middle-end/37278 (Revision 139760 causes many failures)Jan Hubicka2-1/+7
PR middle-end/37278 * predict.c (optimize_loop_nest_for_speed_p): Do not ICE for cold internal loops. From-SVN: r139768
2008-08-29ipa-1.c: Fix template for better debug output.Jan Hubicka7-6/+20
* gcc.dg/ipa/ipa-1.c: Fix template for better debug output. * gcc.dg/ipa/ipa-2.c: Fix template for better debug output. * gcc.dg/ipa/ipa-3.c: Fix template for better debug output. * gcc.dg/ipa/ipa-4.c: Fix template for better debug output. * gcc.dg/ipa/ipa-5.c: Fix template for better debug output. * gcc.dg/ipa/ipa-7.c: Fix template for better debug output. From-SVN: r139766
2008-08-29tree-ssa-structalias.c (create_variable_info_for): Do not create fields for ↵Richard Guenther4-2/+47
heap vars or vars with a noalias state. 2008-08-29 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (create_variable_info_for): Do not create fields for heap vars or vars with a noalias state. For NO_ALIAS_ANYTHING variables add a self-constraint, not one from ESCAPED. * gfortran.fortran-torture/compile/20080806-1.f90: New testcase. From-SVN: r139765
2008-08-29common.opt (ftree-store-ccp): Mark as preserved for backward compatibility.Richard Guenther9-356/+56
2008-08-29 Richard Guenther <rguenther@suse.de> * common.opt (ftree-store-ccp): Mark as preserved for backward compatibility. * doc/invoke.texi (-ftree-store-ccp): Remove documentation. * tree-pass.h (pass_store_ccp): Remove. * tree-ssa-propagate.h (struct prop_value_d): Remove mem_ref field. (first_vdef): Remove declaration. (get_value_loaded_by): Likewise. * tree-ssa-ccp.c (do_store_ccp): Remove. (get_default_value): Simplify as do_store_ccp is always false now. Do not initialize mem_ref. (set_value_varying): Likewise. (canonicalize_float_value): Likewise. (set_lattice_value): Likewise. (likely_value): Likewise. (surely_varying_stmt_p): Likewise. (ccp_initialize): Likewise. (ccp_lattice_meet): Likewise. (ccp_visit_phi_node): Likewise. (ccp_fold): Likewise. (evaluate_stmt): Likewise. (visit_assignment): Likewise. (ccp_visit_stmt): Likewise. (execute_ssa_ccp): Fold into ... (do_ssa_ccp): ... this. (do_ssa_store_ccp): Remove. (gate_store_ccp): Likewise. (pass_store_ccp): Likewise. * tree-ssa-copy.c (copy_prop_visit_phi_node): Do not initialize mem_ref. * tree-ssa-propagate.c (first_vdef): Remove. (get_value_loaded_by): Likewise. (replace_vuses_in): Likewise. (substitute_and_fold): Do not call replace_vuses_in. * opts.c (decode_options): Do not set flag_tree_store_ccp. From-SVN: r139764
2008-08-29re PR middle-end/37236 (ICE: in mark_operand_necessary, at tree-ssa-dce.c:242)Richard Guenther5-21/+118
2008-08-29 Richard Guenther <rguenther@suse.de> PR middle-end/37236 * tree-ssa-structalias.c (intra_create_variable_infos): Mark PARAM_NOALIAS tags with is_heapvar. * tree-ssa-operands.c (access_can_touch_variable): Offset based tests do not apply for heapvars. Fix offset test. * gfortran.fortran-torture/compile/pr37236.f: New testcase. From-SVN: r139763
2008-08-29invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3Jan Hubicka3-1/+17
* doc/invoke.texi (-fipa-cp): Enabled by default at -O2/-Os/-O3 (-fipa-cp-clone): Enabled by default at -O3. * opts.c (decode_options): Enable ipa-cp at -O2, ipa-cp-clone at -O3; make ipa-cp-clone to imply ipa-cp; disable cloning at -Os. From-SVN: r139762
2008-08-29tree.c (build_function_type_skip_args, [...]): New functions.Jan Hubicka11-51/+267
* tree.c (build_function_type_skip_args, build_function_decl_skip_args): New functions. * tree.h (build_function_type_skip_args, build_function_decl_skip_args): Declare. * gimple.c (giple_copy_call_skip_args): New function. (giple_copy_call_skip_args): Declare. * cgraph.h (cgraph_function_versioning): Add skip_args arugmnet * ipa-cp.c (ipcp_node_not_modifiable_p): Rename to ... (ipcp_node_modifiable_p): ... this one; use tree_versionable_function_p. (ipcp_create_replace_map): Improve debug output. (ipcp_need_redirect_p): Return false when not clonning. (ipcp_update_callgraph): Skip args. (ipcp_insert_stage): UPdate call of !ipcp_node_modifiable_p; skip args. * cgraphunit.c (cgraph_function_versioning): Add skip_args argument. (save_inline_function_body): Update call of tree_function_versioning. * ipa-prop.c (ipa_edge_removal_hook): Do not ICE on unanalyzed nodes. * tree-inline.c (copy_arguments_for_versioning): Add skip_args argument. (tree_function_versioning): Likewise. * tree-inline.h (tree_function_versioning): Update prototype. From-SVN: r139761
2008-08-29loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p.Jan Hubicka29-94/+167
* loop-unswitch.c (unswitch_single_loop): Use optimize_loop_for_speed_p. * tree-ssa-threadupdate.c (mark_threaded_blocks): Use optimize_function_for_size_p. * tracer.c (ignore_bb_p): Use optimize_bb_for_size_p. * postreload-gcse.c (eliminate_partially_redundant_load): Use optimize_bb_for_size_p. * value-prof.c (gimple_divmod_fixed_value_transform, gimple_mod_pow2_value_transform, gimple_mod_subtract_transform, gimple_stringops_transform): Use optimize_bb_for_size_p. * ipa-cp.c (ipcp_insert_stage): Use optimize_function_for_size_p. * final.c (compute_alignments): Use optimize_function_for_size_p. * builtins.c (fold_builtin_cabs): Use optimize_function_for_speed_p. (fold_builtin_strcpy, fold_builtin_fputs): Use optimize_function_for_size_p. * fold-const.c (tree_swap_operands_p): Use optimize_function_for_size_p. * recog.c (relax_delay_slots): Likewise. * tree-ssa-math-opts.c (replace_reciprocal): Use optimize_bb_for_speed_p. (execute_cse_reciprocals): Use optimize_bb_for_size_p. * ipa-inline.c (cgraph_decide_recursive_inlining): Use optimize_function_for_size_p. (cgraph_decide_inlining_of_small_function): Use optimize_function_for_size_p. * global.c (find_reg): Use optimize_function_for_size_p. * opts.c (decode_options): Do not clear flag_tree_ch, flag_inline_functions, flag_unswitch_loops, flag_unroll_loops, flag_unroll_all_loops and flag_prefetch_loop_arrays. Those can work it out from profile. * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Use optimize_loop_for_speed_p. * predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p): Constify argument. (optimize_loop_nest_for_size_p, optimize_loop_nest_for_speed_p): New. * tree-parloops.c (parallelize_loops): Use optimize_loop_for_size_p. * tree-eh.c (decide_copy_try_finally): Use optimize_function_for_size_p. * local-alloc.c (block_alloc): Pass BB pointer. (find_free_reg): Add BB pointer, use optimize_bb_for_size_p. * gcse.c (gcse_main): Use optimize_function_for_size_p. * loop-unroll.c (decide_unrolling_and_peeling): Use optimize_loop_for_size_p. (decide_peel_completely): Likewise. * tree-vect-analyze.c (vect_mark_for_runtime_alias_test): Use optimize_loop_for_size_p. (vect_enhance_data_refs_alignment): Likewise. * tree-ssa-coalesce.c (coalesce_cost): Add optimize_for_size argument. (coalesce_cost_bb, coalesce_cost_edge, create_outofssa_var_map): Update call. * cfgcleanup.c (outgoing_edges_match): Use optimize_bb_for_speed_p. (try_crossjump_bb): Use optimize_bb_for_size_p. * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Use optimize_loop_for_speed_p. * bb-reorder.c (find_traces_1_round): Likewise. (copy_bb): Use optimize_bb_for_speed_p. (duplicate_computed_gotos): Likewise. * basic-block.h (optimize_loop_nest_for_size_p, optimize_loop_nest_for_speed_p): New. * stmt.c (expand_case): Use optimize_insn_for_size_p. From-SVN: r139760
2008-08-29gcov.c (main): Call expandargv.Tristan Gingold2-0/+7
2008-08-29 Tristan Gingold <gingold@adacore.com> * gcov.c (main): Call expandargv. From-SVN: r139759
2008-08-29tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Check that loop is not ↵Jan Hubicka4-4/+40
cold. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Check that loop is not cold. * predict.c (optimize_bb_for_size_p, optimize_bb_for_speed_p): Constify arguments. (optimize_loop_for_size_p, optimize_loop_for_speed_p): New functions. * basic-block.h (optimize_bb_for_size_p, optimize_bb_for_speed_p): Constify. (optimize_loop_for_size_p, optimize_loop_for_speed_p): Declare. From-SVN: r139756
2008-08-29cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.Jan Hubicka7-23/+72
* cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic. * tree-pass.h (pass_strip_predict_hints): Declare. * predict.c (strip_builtin_expect): Rename to ... (strip_predict_hints): ... this one; strip also GIMPLE_PREDICT. (tree_bb_level_predictions): Do not remove GIMPLE_PREDICT. (tree_estimate_probability): Do not strip builtin_expect. (pass_strip_predict_hints): New pass. * tree-inline.c (expand_call_inline): When inlining cold function, predict it as unlikely. * passes.c (init_optimization_passes): Add pass_strip_predict_hints. From-SVN: r139755
2008-08-29re PR tree-optimization/37207 (ice at tree-ssa-ifcombine.c:222 for -Os)Richard Guenther4-3/+45
2008-08-29 Richard Guenther <rguenther@suse.de> PR tree-optimization/37207 * tree-vrp.c (extract_range_from_binary_expr): Also try to constant fold if only one of the operands is a constant. * gcc.dg/tree-ssa/vrp46.c: New testcase. From-SVN: r139754
2008-08-29m32r.h (LEGITIMATE_CONSTANT_P): Treat LABEL_REFs in the same way as SYMBOL_REFs.Nick Clifton2-1/+6
* config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Treat LABEL_REFs in the same way as SYMBOL_REFs. From-SVN: r139753
2008-08-29* config/xtensa/xtensa.md (<u>mulsidi3): Use a temporary register.Bob Wilson2-2/+7
From-SVN: r139750
2008-08-29Daily bump.GCC Administrator1-1/+1
From-SVN: r139746
2008-08-29mips.h (ISA_HAS_BBIT): New macro.Adam Nemet7-8/+202
* config/mips/mips.h (ISA_HAS_BBIT): New macro. * config/mips/mips.md (branch_likely): Remove const. Fix comment formatting. (define_delay for type "branch"): Change to only apply for branch with likely variant. (define_delay for type "branch" and "branch_likely" no). New delay definition. (equality_op): New code iterator. (bbv, bbinv): New code attributes. (*branch_bit<bbv><mode>, *branch_bit<bbv><mode>_inverted): New patterns. testsuite/ * gcc.target/mips/octeon-bbit-1.c: New test. * gcc.target/mips/octeon-bbit-2.c: New test. * gcc.target/mips/octeon-bbit-3.c: New test. From-SVN: r139743
2008-08-29re PR c/18050 (-Wsequence-point reports false positives)Manuel López-Ibáñez5-0/+68
2008-08-28 Manuel Lopez-Ibanez <manu@gcc.gnu.org> Andrew Pinski <pinskia@gcc.gnu.org> PR 18050 * c-common.c (verify_tree): Fix handling of ADDR_EXPR. testsuite/ * gcc.dg/Wsequence-point-pr18050.c: New. * g++.dg/warn/Wsequence-point-pr18050.C: New. Co-Authored-By: Andrew Pinski <pinskia@gcc.gnu.org> From-SVN: r139742
2008-08-28re PR c++/37260 (infinite loop in init)Paolo Carlini4-0/+28
/cp 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com> PR c++/37260 * decl.c (reshape_init_r): Check init for error_mark_node. /testsuite 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com> PR c++/37260 * g++.dg/parse/crash44.C: New. From-SVN: r139740
2008-08-28gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix rule that a ↵Paolo Carlini3-0/+17
symbolic constant... 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com> * gtrh-posix.h: Fix uses of _POSIX_TIMEOUTS per the normal Posix rule that a symbolic constant must be defined and >= 0 for the corresponding facility to be present at compile-time. * gthr-posix.c: Likewise. From-SVN: r139739
2008-08-28mips.h (ISA_HAS_DMUL3): New macro.Adam Nemet7-24/+86
* config/mips/mips.h (ISA_HAS_DMUL3): New macro. * config/mips/mips.md (D): New mode attribute. (mulsi3, muldi3): Merge it into ... (mul<mode>3): ... new template. Use _mul3 ending for 3-op patterns. (muldi3_mul3): New pattern. (mulsi3_mult3): Rename to mulsi3_mul3. testsuite/ * gcc.target/mips/octeon-dmul-1.c: New test. * gcc.target/mips/octeon-dmul-2.c: New test. * gcc.target/mips/dmult-1.c: New test. From-SVN: r139738
2008-08-28expmed.c (store_bit_field_1): Be prepared for movstrict expander to fail.Jan Hubicka7-251/+319
* expmed.c (store_bit_field_1): Be prepared for movstrict expander to fail. * predict.c (always_optimize_for_size_p): Rename to ... (optimize_function_for_size): ... this one; make extern. (optimize_function_for_speed_p): New. (optimize_bb_for_size_p, optimize_bb_for_size_p, optimize_edge_for_size_p,optimize_edge_for_size_p, optimize_insn_for_size_p, optimize_insn_for_size_p): Update. * basic-block.h (optimize_function_for_size_p, optimize_function_for_speed_p): Declare. * i386.md (optimize_size checks): Replace them by appropriate predicate. (standard_80387_constant_p, ix86_compute_frame_layout, ix86_expand_epilogue, ix86_decompose_address, print_operand, emit_i387_cw_initialization, inline_memory_move_cost, ix86_pad_returns, ix86_reorg): Replace optimize_size checks. From-SVN: r139737