aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
AgeCommit message (Collapse)AuthorFilesLines
2010-11-23lto.c (read_cgraph_and_symbols): Remove newline from diagnostic.Richard Guenther2-1/+5
2010-11-23 Richard Guenther <rguenther@suse.de> * lto.c (read_cgraph_and_symbols): Remove newline from diagnostic. From-SVN: r167077
2010-11-23re PR lto/46605 (Segmentation fault in lto_cgraph_replace_node)Richard Guenther2-0/+10
2010-11-23 Richard Guenther <rguenther@suse.de> PR lto/46605 * lto.c (read_cgraph_and_symbols): Bail out after errors. From-SVN: r167074
2010-11-17invoke.texi (-dy): Remove.Joseph Myers3-2/+7
* doc/invoke.texi (-dy): Remove. * langhooks-def.h (lhd_do_nothing_i): Don't declare. (LANG_HOOKS_PARSE_FILE): Define to lhd_do_nothing. * langhooks.c (lhd_do_nothing_i): Remove. * langhooks.h (lang_hooks.parse_file): Take no arguments. * toplev.c (set_yydebug): Remove. (compile_file): Update call to lang_hooks.parse_file. (decode_d_option): Don't handle -dy. ada: * gcc-interface/misc.c (gnat_parse_file): Take no arguments. c-family: * c-opts.c (c_common_parse_file): Take no arguments. * c-common.h (c_common_parse_file): Update prototype. fortran: * f95-lang.c (gfc_be_parse_file): Take no arguments. java: * jcf-parse.c (java_parse_file): Take no arguments. * java-tree.h (java_parse_file): Update prototype. lto: * lto.c (lto_main): Take no arguments. * lto.h (lto_main): Update prototype. From-SVN: r166868
2010-11-17simple-object.h (simple_object_attributes_merge): Declare, replacing ↵Ian Lance Taylor2-2/+8
simple_object_attributes_compare. include/: * simple-object.h (simple_object_attributes_merge): Declare, replacing simple_object_attributes_compare. libiberty/: * simple-object.c (simple_object_attributes_merge): Rename from simple_object_attributes_compare. Call merge field. * simple-object-common.h (struct simple_object_functions): Rename attributes_compare field to attribute_merge. * simple-object-elf.c (EM_SPARC): Define. (EM_SPARC32PLUS): Define. (simple_object_elf_attributes_merge): Renamed from simple_object_elf_attributes_compare. Permit EM_SPARC and EM_SPARC32PLUS objects to be merged. (simple_object_elf_functions): Update function name. * simple-object-coff.c (simple_object_coff_attributes_merge): Rename from simple_object_coff_attributes_compare. (simple_object_coff_functions): Update function name. * simple-object-mach-o.c (simple_object_mach_o_attributes_merge): Renamed from simple_object_mach_o_attributes_compare. (simple_object_mach_o_functions): Update function name. gcc/lto/: * lto-object.c (lto_obj_file_open): Call simple_object_attributes_merge rather than simple_object_attributes_compare. From-SVN: r166848
2010-11-12Makefile.in (OPTS_H): Define.Joseph Myers3-1/+7
* Makefile.in (OPTS_H): Define. (c-decl.o, c-family/c-common.o, c-family/c-opts.o, c-family/c-pch.o, c-family/c-pragma.o, gcc.o, gccspec.o, cppspec.o, options.o, gcc-options.o, lto-opts.o, opts.o, opts-common.o, toplev.o, passes.o, matrix-reorg.o, ipa-struct-reorg.o, PLUGIN_HEADERS): Use $(OPTS_H). * gcc.c (driver_handle_option): Take location_t parameter. (process_command, do_self_spec): Update calls to read_cmdline_option. * langhooks-def.h (lhd_handle_option): Take location_t parameter. * langhooks.c (lhd_handle_option): Take location_t parameter. * langhooks.h (handle_option): Take location_t parameter. * lto-opts.c (lto_reissue_options): Update call to set_option. * opts-common.c (handle_option): Make static. Take location_t parameter and pass it to other functions. (handle_generated_option): Take location_t parameter and pass it to other functions. (read_cmdline_option): Take location_t parameter and pass it to other functions. Use warning_at and error_at. (set_option): Take location_t parameter and pass it to other functions. * opts.c (common_handle_option): Take location_t parameter and pass it to other functions. (enable_warning_as_error): Make static. Take location_t parameter and pass it to other functions. (lang_handle_option): Take location_t parameter and pass it to other functions. (target_handle_option): Take location_t parameter. (read_cmdline_options, maybe_default_option, maybe_default_options, default_options_optimization, decode_options): Take location_t parameter and pass it to other functions. * opts.h: Include input.h. (struct cl_option_handler_func, decode_options, set_option, handle_generated_option, read_cmdline_option): Take location_t parameters. (handle_option, enable_warning_as_error): Remove. * toplev.c (toplev_main): Update call to decode_options. ada: * gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTS_H). * gcc-interface/misc.c (gnat_handle_option): Take location_t parameter. c-family: * c-common.c (parse_optimize_options): Update call to decode_options. * c-common.h (c_common_handle_option): Update prototype. * c-opts.c (c_common_handle_option): Take location_t parameter and pass it to other functions. cp: * Make-lang.in (g++spec.o): Use $(OPTS_H). fortran: * Make-lang.in (gfortranspec.o): Use $(OPTS_H). * gfortran.h (gfc_handle_option): Take location_t parameter. * options.c (gfc_handle_option): Take location_t parameter. java: * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H). * lang.c (java_handle_option): Take location_t parameter. lto: * Make-lang.in (lto/lto.o): Use $(OPTS_H). * lto-lang.c (lto_handle_option): Take location_t parameter. From-SVN: r166688
2010-11-10cfgloop.c (verify_loop_structure): Use %' in diagnostics.Joseph Myers2-4/+10
* cfgloop.c (verify_loop_structure): Use %' in diagnostics. Start diagnostics with lowercase letters. * cgraphunit.c (verify_cgraph_node): Start diagnostics with lowercase letters. * collect2.c (maybe_run_lto_and_relink): Remove trailing '.' from diagnostic. * config/alpha/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/arm/arm.c (arm_get_pcs_model): Start diagnostics with lowercase letters. * config/arm/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. Remove trailing ' ' from diagnostic. * config/avr/avr.c (print_operand_address): Start diagnostic with a lowercase letter and remove trailing '.'. * config/avr/avr.opt (mpmem-wrap-around): Fix typo in help text. * config/bfin/bfin.c (bfin_option_override): Start diagnostics with lowercase letters. Use %' in diagnostics. Remove trailing '.' from diagnostics. (bfin_handle_longcall_attribute): Use %' in diagnostic. * config/cris/cris.c (cris_split_movdx, cris_expand_pic_call_address): Start diagnostics with lowercase letters. (cris_asm_output_label_ref): Use %' in diagnostic. * config/cris/cris.h (ASM_SPEC): Start diagnostic with a lowercase letter. * config/crx/crx.h (FUNCTION_PROFILER): Start diagnostic with a lowercase letter. * config/darwin-c.c (version_as_macro): Start diagnostic with a lowercase letter. * config/darwin-driver.c (darwin_default_min_version): Use %' in diagnostic. * config/host-darwin.c (darwin_gt_pch_use_address): Use %' in diagnostic. * config/i386/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/i386/host-cygwin.c (cygwin_gt_pch_get_address): Use %' in diagnostics. * config/i386/i386.c (ix86_option_override_internal): Write diagnostic as a single sentence without trailing '.'. Use %' in diagnostics. (ix86_function_sseregparm, classify_argument): Start diagnostics with lowercase letters. (ix86_expand_prologue): Use %' in diagnostic. * config/i386/i386.h (CC1_CPU_SPEC_1): Remove trailing '.' from diagnostic. * config/i386/nwld.h (LINK_SPEC): Start diagnostic with a lowercase letter. * config/i386/winnt.c (i386_pe_determine_dllimport_p): Use %' in diagnostic. * config/ia64/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/ia64/ia64.opt (msched-max-memory-insns-hard-limit): Avoid '`' in help text. * config/lm32/lm32.c (lm32_print_operand): Start diagnostic with a lowercase letter. * config/mep/mep.c (mep_validate_vliw): Start diagnostics with lowercase letters. * config/microblaze/microblaze.c (microblaze_handle_option): Remove trailing '.' from diagnostic. (print_operand): Start diagnostic with a lowercase letter. * config/pa/pa-hpux10.h (LINK_SPEC): Start diagnostics with lowercase letters. Avoid '`' in diagnostics. * config/pa/pa-hpux11.h (LINK_SPEC): Start diagnostics with lowercase letters. Avoid '`' in diagnostics. * config/pa/pa64-hpux.h (LINK_SPEC): Start diagnostics with lowercase letters. Avoid '`' in diagnostics. * config/picochip/picochip.c (picochip_option_override, picochip_emit_save_register, picochip_function_arg, picochip_output_label, picochip_output_internal_label, picochip_asm_output_opcode, picochip_output_cbranch, picochip_output_compare, picochip_output_branch, picochip_get_vliw_alu_id): Remove trailing '.' and '\n' from diagnostics. Start diagnostics with lowercase letters. Use %' in diagnostics. * config/rs6000/rs6000.c (rs6000_option_override_internal): Use "SPE" capitalization. Start diagnostic with a lowercase letter. (rs6000_handle_option): Start diagnostics with lowercase letters. (def_builtin): Remove trailing '.' from diagnostic. (rs6000_savres_routine_name): Start diagnostic with a lowercase letter. * config/rs6000/sysv4.h (LINK_OS_FREEBSD_SPEC): Avoid '`' in diagnostic. * config/rx/rx.c (rx_handle_option): Start diagnostic with a lowercase letter. * config/s390/s390.c (s390_option_override) Start diagnostics with lowercase letters. Use %' in diagnostic. * config/sh/sh.c (sh_output_mi_thunk): Start diagnostics with lowercase letters. * config/sh/symbian-base.c (sh_symbian_mark_dllimport): Use %' in diagnostic. * config/sh/symbian-c.c (sh_symbian_is_dllimported): Use %' in diagnostic. * config/sh/symbian-cxx.c (sh_symbian_is_dllimported): Use %' in diagnostic. * config/sparc/freebsd.h (LINK_SPEC): Avoid '`' in diagnostic. * config/spu/spu.c (spu_option_override): Start diagnostics with lowercase letters. Use %qs for quoting in diagnostics. (spu_check_builtin_parm): Remove trailing '.' from diagnostics. Use %wd instead of HOST_WIDE_INT_PRINT_DEC in diagnostic . * config/v850/v850.c (construct_save_jarl): Remove trailing '\n' from diagnostic. * convert.c (convert_to_integer, convert_to_vector): Use %' in diagnostics. * dbgcnt.c (dbg_cnt_process_opt): Start diagnostic with lowercase letter and use "cannot" spelling. * expmed.c (extract_fixed_bit_field): Start diagnostic with lowercase letter and format as a single sentence without '.'. * ggc-common.c (write_pch_globals, gt_pch_save, gt_pch_restore): Use %' in diagnostics. * ggc-page.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read): Use %' in diagnostics. * ggc-zone.c (ggc_pch_write_object, ggc_pch_finish, ggc_pch_read): Use %' in diagnostics. * graph.c (clean_graph_dump_file): Use %' in diagnostic. * graphite-poly.c (graphite_read_scop_file): Start diagnostics with lowercase letters and remove tailing '.' and '\n'. * lto-cgraph.c (input_profile_summary): Start diagnostic with lowercase letter and remove trailing '.'. (input_cgraph): Start diagnostics with lowercase letters and remove trailing '\n'. * opts.c (finish_options, common_handle_option): Start diagnostics with lowercase letters and remove trailing '.'. Fix typo in diagnostic. * passes.c (position_pass): Start diagnostic with lowercase letter. * plugin.c (add_new_plugin, parse_plugin_arg_opt, register_callback, try_init_one_plugin): Start diagnostics with lowercase letters. * reload1.c (spill_failure): Use %' in diagnostic. (gen_reload): Start diagnostic with a lowercase letter. * stor-layout.c (place_field): Start diagnostic with a lowercase letter. * toplev.c (open_auxiliary_file): Use %' in diagnostic. * tree-cfg.c (verify_expr, verify_types_in_gimple_reference, verify_gimple_call, verify_gimple_phi, verify_eh_throw_stmt_node): Start diagnostics with lowercase letters, remove trailing '.' and use %' in diagnostics. * tree-ssa.c (verify_def): Remove trailing '.' from diagnostic. (verify_ssa): Don't split diagnostic across two error calls. Spell out "number" and use %' in diagnostic. * value-prof.c (visit_hist, check_counter): Start diagnostics with lowercase letters. c-family: * c-common.c (handle_mode_attribute): Use %' and word "signedness" in diagnostic. * c-opts.c (c_common_parse_file): Start diagnostics with lowercase letter. * c-pragma.c (handle_pragma_target, handle_pragma_optimize): Remove trailing '.' from diagnostics. * c.opt (Wwrite-strings_: Avoid '`' in help text. cp: * cvt.c (cp_convert_to_pointer): Use %' in diagnostic. * decl.c (layout_var_decl, maybe_commonize_var, grokdeclarator): Use %' in diagnostics. * decl2.c (check_classfn): Use %' in diagnostic. * init.c (build_java_class_ref): Use %' in diagnostic. (build_delete): Remove trailing '.' from diagnostic. * method.c (do_build_copy_assign, walk_field_subobs): Use %' in diagnostics. * name-lookup.c (pushdecl_maybe_friend): Use %' in diagnostic. * parser.c (cp_parser_exception_specification_opt): Remove trailing '.' from diagnostic. (cp_parser_objc_interstitial_code): Use %qs for quoting in diagnostic. * pt.c (check_valid_ptrmem_cst_expr): Use %< and %> for quoting in diagnostic. * repo.c (reopen_repo_file_for_write): Use %' in diagnostic. fortran: * trans-array.c (gfc_trans_deferred_array): Use "front-end" spelling in diagnostic. * trans.c (gfc_allocate_array_with_status): Add missing space in diagnostic. java: * expr.c (expand_java_field_op): Use %' in diagnostic. * jcf-parse.c (java_parse_file): Use %' in diagnostics. * jvspec.c (lang_specific_driver): Use %' in diagnostic. * lang.c (java_post_options): Use %' in diagnostics. lto: * lto.c (lto_resolution_read): Start diagnostics with lowercase letters and remove trailing '.'. (lto_file_finalize): Start diagnostic with a lowercase letter. objc: * objc-act.c (objc_init): Use %' in diagnostic. (objc_set_method_opt): Remove trailing '.' from diagnostic. From-SVN: r166570
2010-11-02lto-object.c: New file.Ian Lance Taylor8-3252/+397
* lto-object.c: New file. * lto-elf.c: Remove file. * lto-macho.c: Remove file. * lto-macho.h: Remove file. * lto-coff.c: Remove file. * lto-coff.h: Remove file. * Make-lang.in (LTO_OBJS): Change lto/$(LTO_BINARY_READER).o to lto/lto-object.o. ($(LTO_EXE)): Remove $(LTO_USE_LIBELF) (lto/lto-objfile.o): New target. (lto/lto-elf.o, lto/lto-coff.o, lto/lto-macho.o): Remove targets. (lto/lto.o): Remove $(LIBIBERTY_H). From-SVN: r166187
2010-10-26lto.c (add_cgraph_node_to_partition, [...]): Add debug info.Jan Hubicka2-9/+33
* lto.c (add_cgraph_node_to_partition, add_varpool_node_to_partition): Add debug info. (lto_1_to_1_map, lto_balanced_map): Do not re-add already partitioned nodes. (do_whole_program_analysis): Set function flags before dumping. From-SVN: r165984
2010-10-22gimple.h (gimple_register_canonical_type): Declare.Richard Guenther2-4/+13
2010-10-22 Richard Guenther <rguenther@suse.de> * gimple.h (gimple_register_canonical_type): Declare. * gimple.c (gimple_canonical_types): New global hashtable. (struct gimple_type_leader_entry_s): New type. (gimple_type_leader): New global cache. (gimple_lookup_type_leader): New function. (gtc_visit): Query the proper cache. (gimple_types_compatible_p): Likewise. (gimple_register_type): Use the new cache instead of TYPE_CANONICAL. (gimple_canonical_type_eq): New function. (gimple_register_canonical_type): Likewise. (print_gimple_types_stats): Adjust for gimple_canonical_types. (free_gimple_type_tables): Likewise. Free gimple_type_leader. * tree-ssa.c (useless_type_conversion_p): Do not dispatch to gimple_types_compatible_p for LTO. lto/ * lto.c (lto_fixup_type): Fixup TYPE_CANONICAL again, via the new gimple_register_canonical_type. From-SVN: r165848
2010-10-20Add LTO to boot language if it is enabled.H.J. Lu2-0/+8
2010-10-20 H.J. Lu <hongjiu.lu@intel.com> PR bootstrap/45954 * config-lang.in (boot_language): Set to $enable_lto. From-SVN: r165721
2010-10-18re PR lto/45638 (No rule to make target `check-lto', needed by `check'. Stop.)Jakub Jelinek2-0/+8
PR lto/45638 * Make-lang.in (check-lto): New dummy target. From-SVN: r165638
2010-10-14* lto-elf.c (SHN_XINDEX): Define if not already defined.Eric Botcazou2-0/+9
From-SVN: r165464
2010-10-11vec.h (VEC_qsort): Define.Nathan Froyd1-2/+1
gcc/ * vec.h (VEC_qsort): Define. * dbxout.c (output_used_types): Use it. * df-scan.c (df_sort_and_compress_refs): Likewise. (df_sort_and_compress_mws): Likewise. * genautomata.c (uniq_sort_alt_states): Likewise. (evaluate_equiv_classes): Likewise. (output_trans_table): Likewise. (output_state): Likewise. * gimplify.c (compare_case_labels): Likewise. * graphite-sese-to-poly.c (graphite_sort_dominated_info): Likewise. * ipa.c (build_cdtor_fns): Likewise. * lto.c (lto_wpa_write_files): Likewise. * sel-sched.c (fill_vec_av_set): Likewise. * tree-predcom.c (determine_roots_comp): Likewise. * tree-sra.c (sort_and_spliace_var_accesses): Likewise. (splice_param_accesses): Likewise. * tree-ssa-live.c (dump_enumerated_decls): Likewise. * tree-ssa-reassoc.c (undistribute_ops_list): Likewise. (reassociate_bb): Likewise. * tree-ssa-sccvn.c (sort_scc): Likewise. * tree-ssa-structalias.c (sort_fieldstack): Likewise. gcc/ada/ * gcc-interface/utils2.c (gnat_build_constructor): Use VEC_qsort. From-SVN: r165314
2010-10-08Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.Joseph Myers2-5/+11
* Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h. (TREE_H): Include $(FLAGS_H) instead of options.h. (opts-common.o): Depend on $(FLAGS_H) instead of options.h. * c-objc-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. * common.opt (flag_complex_method, flag_evaluation_order, flag_ira_algorithm, flag_ira_region, flag_warn_unused_result): New Variable declarations. * configure.ac (tm_include_list): Include flags.h instead of options.h. * configure: Regenerate. * flags.h: Condition out contents for target libraries. Include options.h at end of file. (flag_complex_method, flag_ira_algorithm, flag_ira_region, flag_evaluation_order, flag_warn_unused_result): Remove. * gcc.c (main): Intialize global_options with global_options_init. * langhooks-def.h (lhd_init_options_struct): Declare. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. (LANG_HOOKS_INITIALIZER): Include LANG_HOOKS_INIT_OPTIONS_STRUCT. * langhooks.c (lhd_init_options_struct): New. * langhooks.h (struct lang_hooks): Add init_options_struct. Update comment on init_options. * optc-gen.awk: Generate initializer for global_options_init, not global_options. * opth-gen.awk: Condition out structure declarations for target libraries. Declare global_options_init. * opts-common.c: Include flags.h instead of options.h. * opts.c (flag_warn_unused_result): Remove. (read_cmdline_options): Take gcc_options parameters. Pass them to read_cmdline_option. (initial_lang_mask, initial_min_crossjump_insns, initial_max_fields_for_field_sensitive, initial_loop_invariant_max_bbs_in_loop): Define at file scope. (init_options_once): New. Split out of decode_options. (init_options_struct): New. Split out of decode_options. (decode_cmdline_options_to_array_default_mask): New. (default_options_optimization): New. Split out of decode_options. (decode_options): Move most code to other functions. Update call to read_cmdline_options. (finish_options): New. Split out of decode_options. * opts.h (decode_options): Add gcc_options parameters. (init_options_once, init_options_struct, decode_cmdline_options_to_array_default_mask): New. * toplev.c (flag_complex_method, flag_ira_algorithm, flag_ira_region, flag_evaluation_order): Remove. (general_init): Use global_options_init for initial flag values for global_dc. (toplev_main): Call init_options_once, init_options_struct, lang_hooks.init_options_struct, decode_cmdline_options_to_array_default_mask and lang_hooks.init_option before decode_options. Update arguments to decode_options. * tree.h: Include flags.h instead of options.h. ada: * gcc-interface/misc.c (gnat_init_options_struct): New. Split out from gnat_init_options. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. c-family: * c-common.c (parse_optimize_options): Call decode_cmdline_options_to_array_default_mask before decode_options. Update arguments to decode_options. * c-common.h (c_common_init_options_struct): Declare. * c-opts.c (c_common_init_options_struct): New. Split out from c_common_init_options. cp: * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. fortran: * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. * gfortran.h (gfc_init_options_struct): Declare. * options.c (gfc_init_options_struct): New. Split out from gfc_init_options. java: * lang.c (java_init_options_struct): New. Split out from java_init_options. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. lto: * lto-lang.c (lto_init_options): Change to lto_init_options_struct. Update parameters. (LANG_HOOKS_INIT_OPTIONS): Don't define. (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define. From-SVN: r165189
2010-10-08* lto.c (lto_balanced_map): Fix accounting of program size.Jan Hubicka2-3/+9
From-SVN: r165145
2010-10-07* lto.c (lto_balanced_map): Do not produce empty partitions.Jan Hubicka2-0/+7
From-SVN: r165093
2010-10-06[PATCH] Report LTO phase in lto1 process name v2Andi Kleen2-0/+19
On larger parallel WHOPR builds I find it useful to see in top which phase a given lto1 is in. Set the process name to lto1-wpa, lto1-ltrans, lto1-lto depending on the current mode. This is currently only implemented for Linux and only using the "comm" process name, which is reported in top. v2: Moved function to libiberty, renamed setproctitle to match BSD. In theory it should pick up BSD's libc function for this on a BSD system, but I haven't tested this. gcc/lto/ 2010-10-06 Andi Kleen <ak@linux.intel.com> * lto.c (lto_process_name): Add. (lto_main): Call lto_process_name. include/ 2010-10-06 Andi Kleen <ak@linux.intel.com> * libiberty.h (setproctitle): Add prototype. libiberty/ 2010-10-06 Andi Kleen <ak@linux.intel.com> * Makefile.in (CFILES): Add setproctitle. (CONFIGURED_OFILES): Add setproctitle. (setproctitle): Add rule. * config.in: Regenerate. * configure: Regenerate. * configure.ac: Add checks for prctl PR_SET_NAME and setproctitle. * setproctitle.c: Add file. * functions.texi: Regenerate. From-SVN: r165066
2010-10-06lto.c (partition_cgraph_node_p, [...]): Handle COMDATs required by the linker.Jan Hubicka2-2/+9
* lto.c (partition_cgraph_node_p, partition_varpool_node_p): Handle COMDATs required by the linker. From-SVN: r165058
2010-10-05* lto.c (lto_section_with_id): Make s a const pointer.Ian Lance Taylor2-1/+5
From-SVN: r164996
2010-10-05invoke.texi (-flto-partition, [...]): Document.Jan Hubicka3-28/+382
* doc/invoke.texi (-flto-partition, lto-partitions, lto-minpartition): Document. * opts.c (decode_options): Handle lto partitions. * common.opt (flto-partition=1to1, flto-partition=balanced): New. * params.def (PARAM_LTO_PARTITIONS, MIN_PARTITION_SIZE): New. * lto.c: Include params.h. (add_cgraph_node_to_partition, add_varpool_node_to_partition): Do refcounting in aux field. (undo_partition, partition_cgraph_node_p, partition_varpool_node_p): New functions. (lto_1_to_1_map): Simplify. (lto_balanced_map): New function. (do_whole_program_analysis): Chose proper partitioning alg. * Make-lang.in (lto.o): Add dependency on params.h From-SVN: r164995
2010-10-04Mark linker Makefile rules for job server buildAndi Kleen2-1/+5
-fwhopr=jobserver requires telling GNU make that the linker (= lto) rules support job server, so that the necessary jobserver information is passed through. Add + to all the executable targets that run LTO for this purpose. This improves build performance with a -fwhopr=jobserver bootstrap (or BUILD_CONFIG=bootstrap-lto) significantly. I didn't change Ada because that apparently doesn't support LTO. Passes bootstrap and test suite. Ok to commit? gcc/ 2010-10-04 Andi Kleen <ak@linux.intel.com> * Makefile.in (xgcc, cpp, cc1, collect2, lto-wrapper, gcov, gcov-dump, cc1-dummy, genprog, build/gcov-iov): Add + to build rule. gcc/cp/ 2010-10-04 Andi Kleen <ak@linux.intel.com> * Make-lang.in (g++, cc1plus): Add + to build rule. gcc/fortran/ 2010-10-04 Andi Kleen <ak@linux.intel.com> * Make-lang.in (gfortran, f951): Add + to build rule. gcc/java/ 2010-10-04 Andi Kleen <ak@linux.intel.com> * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain): Add + to build rule. gcc/lto/ 2010-10-04 Andi Kleen <ak@linux.intel.com> * Make-lang.in (lto1): Add + to build rule. gcc/objc/ 2010-10-04 Andi Kleen <ak@linux.intel.com> * Make-lang.in (cc1obj-dummy, cc1obj): Add + to build rule. gcc/objcp/ 2010-10-04 Andi Kleen <ak@linux.intel.com> * Make-lang.in (cc1objplus-dummy, cc1objplus): Add + to build rule. More plus fixes From-SVN: r164949
2010-10-03lto-cgraph.c (input_cgraph): Check for missing sections.Andi Kleen2-1/+10
gcc/ 2010-10-03 Andi Kleen <ak@linux.intel.com> * lto-cgraph.c (input_cgraph): Check for missing sections. gcc/lto/ 2010-10-03 Andi Kleen <ak@linux.intel.com> * lto.c (lto_file_finalize): Replace gcc_assert for missing section with fatal_error. From-SVN: r164916
2010-09-28builtin-attrs.def (ATTR_LEAF): New attribute.Jan Hubicka2-0/+29
* builtin-attrs.def (ATTR_LEAF): New attribute. (ATTR_NOVOPS_LEAF_LIST, ATTR_LEAF_LIST, ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_PURE_NOTHROW_LEAF_LIST, ATTR_PURE_NOTHROW_NOVOPS_LEAF_LIST, ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_MALLOC_NOTHROW_LEAF_LIST, ATTR_SENTINEL_NOTHROW_LEAF_LIST, ATTR_NOTHROW_NONNULL_LEAF, ATTR_CONST_NOTHROW_NONNULL_LEAF, ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF, ATTR_PURE_NOTHROW_NONNULL_LEAF, ATTR_MALLOC_NOTHROW_NONNULL_LEAF): New attribute lists. * sync-builtins.def: Annotate all builtins by leaf. * omp-builtins.def: Annotate all builtins by leaf. * builtins.def: Annotate relevant builtins with leaf attribute. (ATTR_MATHFN_ERRNO, ATTR_MATHFN_FPROUNDING, ATTR_MATHFN_FPROUNDING_ERRNO, ATTR_MATHFN_FPROUNDING_STORE): Make leaf. * gcc-interface/utils.c (handle_leaf_attribute): New function. (gnat_internal_attribute_tables): Add leaf. * lto-lang.c (handle_leaf_attribute): New function. (lto_attribute_tables): Add leaf. * f95-lang.c (gfc_define_builtin): Make leaf. (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST and ATTR_NOTHROW_LEAF_LIST. (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST. (DEF_GOMP_BUILTIN): Likewise. From-SVN: r164689
2010-09-25lto.c (lto_read_all_file_options): Start a new line after printing out file ↵Jie Zhang2-0/+8
names. * lto.c (lto_read_all_file_options): Start a new line after printing out file names. From-SVN: r164620
2010-09-24lto-symtab.c (lto_symtab_entry_def): Add guessed field.Jan Hubicka2-1/+6
* lto-symtab.c (lto_symtab_entry_def): Add guessed field. (lto_symtab_resolve_symbols): Set it. (lto_symtab_merge_decls_1): Do not compute used_from_object_file; store resolution field in cgraph/varpool. * cgraph.c (cgraph_same_body_alias, cgraph_add_thunk): Return node. (cgraph_get_node_or_alias, cgraph_get_node_or_alias): Constify. (cgraph_dump_node): Drop used_from_object_file. (cgraph_clone_node, cgraph_create_virtual_clone): Likewise. (cgraph_function_body_availability): Use decl_replaceable_p. (cgraph_make_node_local): Set resolution to LDPR_PREVAILING_DEF_IRONLY. (cgraph_can_remove_if_no_direct_calls_and_refs): Use cgraph_used_from_object_file_p. (cgraph_will_be_removed_from_program_if_no_direct_calls): Use cgraph_used_from_object_file_p. (resolution_used_from_other_file_p): New functoin. (cgraph_used_from_object_file_p): New predicate. * cgraph.h: Include plugin-api.h (struct cgraph_local_info): Remove used_from_object_file. (struct cgraph_node): Add resolution field. (struct varpool_node): Likewise; remove used_from_object_file; reove const_value_known. (cgraph_get_node, cgraph_get_node_or_alias, cgraph_node, cgraph_same_body_alias, cgraph_add_thunk): Update prototypes. (resolution_used_from_other_file_p, cgraph_used_from_object_file_p, varpool_used_from_object_file_p): Declare. (varpool_get_node, varpool_extra_name_alias): Update prototype. * tree.h (DECL_REPLACEABLE_P): Remove. (decl_replaceable_p, decl_binds_to_current_def_p): Declare. * final.c (rest_of_clean_state): Use decl_binds_to_current_def_p. * lto-cgraph.c (lto_output_node, lto_output_varpool_node, input_overwrite_node, input_node, input_varpool_node): Stream resolution. * expr.c (expand_expr_real_1): Use const_value_known_p * ipa.c (ipa_discover_readonly_nonaddressable_var): Do not set const_value_known. (cgraph_externally_visible_p): Use cgraph_used_from_object_file_p. (function_and_variable_visibility): Set resolution for local vars and functions. use varpool_used_from_object_file_p. * varasm.c (resolution_to_local_definition_p, resolution_local_p): New static functions. (default_binds_local_p_1): Use resolutoin info. (decl_binds_to_current_def_p, decl_replaceable_p): New functions. * varpool.c (varpool_get_node): Constify. (const_value_known_p): Do not use vnode->const_value_known; use decl_replaceable_p. (varpool_finalize_decl): Do not set const_value_known. (cgraph_variable_initializer_availability): Use decl_replaceable_p (varpool_extra_name_alias): Return new node. (varpool_used_from_object_file_p): New function. * decl.c (finish_function): Use decl_replaceable_p * method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias. * lto.c (lto_promote_cross_file_statics): Use const_value_known_p. From-SVN: r164610
2010-09-20re PR tree-optimization/45605 (Missed devirtualization)Jan Hubicka2-1/+6
PR tree-optimize/45605 * cgraph.h (const_value_known_p): Declare. (varpool_decide_const_value_known): Remove. * tree-ssa-ccp.c (get_base_constructor): Use it. * lto-cgraph.c (compute_ltrans_boundary): Likewise. * expr.c (string_constant): Likewise. * tree-ssa-loop-ivcanon.c (constant_after_peeling): Likewise. * ipa.c (ipa_discover_readonly_nonaddressable_var, function_and_variable_visibility): Likewise. * gimplify.c (gimplify_call_expr): Likewise. * gimple-fold.c (get_symbol_constant_value): Likewise. * varpool.c (varpool_decide_const_value_known): Replace by... (const_value_known_p): ... this one; handle other kinds of DECLs too and work for automatic vars. (varpool_finalize_decl): Use const_value_known_p. * lto.c (lto_promote_cross_file_statics): Use const_value_known_p. * g++.dg/tree-ssa/pr45605.C: New testcase. From-SVN: r164438
2010-09-18lto-elf.c (lto_obj_file_open): Also provide filename when elf_begin fails.Gerald Pfeifer2-1/+6
* lto-elf.c (lto_obj_file_open): Also provide filename when elf_begin fails. From-SVN: r164394
2010-09-17lto-cgraph.c (compute_ltrans_boundary): Use const_value_known.Jan Hubicka2-2/+6
* lto-cgraph.c (compute_ltrans_boundary): Use const_value_known. * lto.c (lto_promote_cross_file_statics): Use const_value_known. From-SVN: r164366
2010-09-17common.opt (combine): Remove.Richard Guenther2-1/+5
2010-09-17 Richard Guenther <rguenther@suse.de> * common.opt (combine): Remove. * gcc.c (default_compilers): Remove specs testing combine. The C compilers no longer can combine. (option_map): Remove -combine. (display_help): Remove -combine. (driver_handle_option): Remove OPT_combine handling. (compile_input_file_p): Remove. (do_spec): Remove code concerning combine. (main): Likewise. * doc/invoke.texi: Remove traces of -combine. * lto-wrapper.c (run_gcc): Do not pass -combine to the compiler driver. lto/ * lang.opt (flag_wpa): Also enable for the driver. * gcc.dg/pr27898.c: Use -flto instead of -combine. * gcc.dg/pr28706.c: Likewise. * gcc.dg/pr28712.c: Likewise. * gcc.dg/pr30762-1.c: Likewise. * gcc.dg/pr30762-2.c: Likewise. * gcc.dg/pr31529-1.c: Likewise. * gcc.dg/pr31529-2.c: Likewise. * gcc.dg/pr34457-1.c: Likewise. * gcc.dg/pr34457-2.c: Likewise. * gcc.dg/pr34668-1.c: Likewise. * gcc.dg/pr34668-2.c: Likewise. * gcc.dg/pr34989-1.c: Likewise. * gcc.dg/pr34989-2.c: Likewise. * gcc.dg/pr43557-1.c: Likewise. * gcc.dg/pr43557-2.c: Likewise. * gcc.dg/debug/pr41893-1.c: Likewise. * gcc.dg/matrix/matrix.exp: Do not use -combine. * gcc.dg/matrix/matrix-3.c: Drop dg-options. * gcc.dg/matrix/matrix-4.c: Likewise. * gcc.dg/struct/struct-reorg.exp: Do not use -combine. * gcc.dg/struct/wo_prof_empty_str.c: Drop dg-options. * gcc.dg/struct/wo_prof_escape_arg_to_local.c: Likewise. * gcc.dg/struct/wo_prof_escape_return.c: Likewise. From-SVN: r164357
2010-09-17lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when ↵Jan Hubicka2-5/+5
processing clone. * lto-cgraph.c (input_overwrite_node): Do not set DECL_EXTERNAL when processing clone. * lto.c (lto_materialize_function): Do not tamper with STATIC and EXTERNAL flags. From-SVN: r164354
2010-09-15c-lang.h (struct lang_type): Add variable_size GTY option.Laurynas Biveinis2-1/+5
gcc/ChangeLog: 2010-09-14 Laurynas Biveinis <laurynas.biveinis@gmail.com> * c-lang.h (struct lang_type): Add variable_size GTY option. gcc/lto/ChangeLog: 2010-09-14 Laurynas Biveinis <laurynas.biveinis@gmail.com> * lto-tree.h (struct lang_type): Add variable_size GTY option. From-SVN: r164295
2010-09-09lto.c (real_file_count, [...]): New static vars.Jan Hubicka2-2/+15
* lto.c (real_file_count, real_file_decl_data): New static vars. (read_cgraph_and_symbols): Use it. From-SVN: r164037
2010-09-08gimple.c (gimple_types, [...]): Move to GC memory.Richard Guenther2-2/+6
2010-09-08 Richard Guenther <rguenther@suse.de> * gimple.c (gimple_types, type_hash_cache): Move to GC memory. (visit): Adjust. (iterative_hash_gimple_type): Likewise. (gimple_type_hash): Likewise. (gimple_register_type): Likewise. (print_gimple_types_stats): Likewise. (free_gimple_type_tables): Likewise. lto/ * lto.c (read_cgraph_and_symbols): Collect again after each file. From-SVN: r164001
2010-09-07* lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.Jan Hubicka2-0/+7
From-SVN: r163957
2010-09-03lto-elf.c (validate_file): Always error if validation fails.Richard Guenther2-2/+8
2010-09-03 Richard Guenther <rguenther@suse.de> * lto-elf.c (validate_file): Always error if validation fails. From-SVN: r163800
2010-08-21lto-cgraph.c (lto_output_edge): Use gimple_has_body_p instead of flag_wpa.Jan Hubicka2-12/+27
* lto-cgraph.c (lto_output_edge): Use gimple_has_body_p instead of flag_wpa. * lto-streamer-out.c (lto_output): Likewise. * passes.c (ipa_write_optimization_summaries): Initialize statement uids. * lto.c (lto_1_to_1_map): Be prepared for node to have no file data. (lto_wpa_write_files): Update comments. From-SVN: r163438
2010-08-20Replace has_analyzed_clone with has_analyzed_clone_p.H.J. Lu2-1/+7
2010-08-20 H.J. Lu <hongjiu.lu@intel.com> PR bootstrap/45357 * lto.c (lto_materialize_function): Replace has_analyzed_clone with has_analyzed_clone_p. From-SVN: r163405
2010-08-20lto.c (has_analyzed_clone_p): New functionJan Hubicka2-28/+55
* lto.c (has_analyzed_clone_p): New function (lto_materialize_function): Use callgraph to determine if body is needed. (materialize_cgraph): Remove DECL_IS_BUILTIN check. From-SVN: r163403
2010-08-20vec.h (FOR_EACH_VEC_ELT): Define.Nathan Froyd2-3/+7
gcc/ * vec.h (FOR_EACH_VEC_ELT): Define. * c-decl.c: Use it. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * config/bfin/bfin.c: Likewise. * config/mips/mips.c: Likewise. * config/rs6000/rs6000.c: Likewise. * dbxout.c: Likewise. * df-scan.c: Likewise. * dominance.c: Likewise. * dse.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * ggc-common.c: Likewise. * gimplify.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * ipa-prop.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-emit.c: Likewise. * lambda-code.c: Likewise. * loop-invariant.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-opts.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-symtab.c: Likewise. * matrix-reorg.c: Likewise. * opts.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * stor-layout.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-data-ref.c: Likewise. * tree-emutls.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. gcc/ada/ * gcc-interface/decl.c: Use FOR_EACH_VEC_ELT. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. gcc/c-family/ * c-common.c: Use FOR_EACH_VEC_ELT. * c-gimplify.c: Likewise. * c-pragma.c: Likewise. gcc/cp/ * call.c: Use FOR_EACH_VEC_ELT. * class.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * error.c: Likewise. * except.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * repo.c: Likewise. * semantics.c: Likewise. * typeck2.c: Likewise. gcc/fortran/ * trans-openmp.c: Use FOR_EACH_VEC_ELT. gcc/java/ * class.c: Use FOR_EACH_VEC_ELT. * expr.c: Likewise. * jcf-parse.c: Likewise. * resource.c: Likewise. gcc/lto/ * lto.c: Use FOR_EACH_VEC_ELT. From-SVN: r163401
2010-07-28* Make-lang.in (lto.o): Add dependency to splay-tree.hAndi Kleen2-1/+5
From-SVN: r162632
2010-07-27coretypes.h (struct cl_option_handlers): Declare.Joseph Myers2-4/+9
* coretypes.h (struct cl_option_handlers): Declare. * hooks.c (hook_int_size_t_constcharptr_int_0): Remove. * hooks.h (hook_int_size_t_constcharptr_int_0): Remove. * langhooks-def.h (lhd_handle_option): Declare. (LANG_HOOKS_HANDLE_OPTION): Use lhd_handle_option. * langhooks.c (lhd_handle_option): New. * langhooks.h (struct lang_hooks): Update prototype and return value type of handle_option hook. * optc-gen.awk: Generate target_flags_explicit definition for the driver. * opts-common.c: Include diagnostic.h. (handle_option): Move from opts.c. Update prototype and return value type. Use handlers structure. (read_cmdline_option): Move from opts.c. Update prototype. Use handlers structure. (set_option): Move from opts.c. * opts.c (common_handle_option): Update prototype and return value type. Update calls to handle_option and enable_warning_as_error. (unknown_option_callback, post_handling_callback, lang_handle_option, target_handle_option): New. (handle_option, read_cmdline_option): Move to opts-common.c. (read_cmdline_options): Update prototype. Update call to read_cmdline_option. (decode_options): Initialize and use handlers structure. (set_option): Move to opts-common.c. (enable_warning_as_error): Update prototype. Update call to handle_option. * opts.h (struct cl_option_handler_func, struct cl_option_handlers): New. (handle_option, enable_warning_as_error): Update prototypes. (read_cmdline_option): Declare. * Makefile.in (opts-common.o): Update dependencies. ada: * gcc-interface/misc.c (gnat_handle_option): Update prototype and return value type. Don't check for missing arguments here. c-family: * c-common.h (c_common_handle_option): Update prototype and return value type. * c-opts.c (c_common_handle_option): Update prototype and return value type. Update calls to handle_option and enable_warning_as_error. fortran: * gfortran.h (gfc_handle_option): Update prototype and return value type. * options.c (gfc_handle_option): Update prototype and return value type. java: * lang.c (java_handle_option): Update prototype and return value type. lto: * lto-lang.c (lto_handle_option): Update prototype and return value type. Remove duplicate assignment to result. From-SVN: r162601
2010-07-27langhooks-def.h (lhd_init_options, [...]): New.Joseph Myers2-4/+34
* langhooks-def.h (lhd_init_options, LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): New. (LANG_HOOKS_INIT_OPTIONS): Update default definition. (LANG_HOOKS_INITIALIZER): Add new hooks. * langhooks.c (lhd_init_options, lhd_complain_wrong_lang_p): New. * langhooks.h (struct lang_hooks): Add new hooks option_lang_mask and complain_wrong_lang_p. Update init_options prototype. * c-objc-common.c (c_initialize_diagnostics): First call c_common_initialize_diagnostics. * c-objc-common.h (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define. * coretypes.h (struct cl_option, struct cl_decoded_option): Declare. * hooks.c (hook_uint_uint_constcharptrptr_0): Remove. (hook_uint_void_0): New. * hooks.h (hook_uint_uint_constcharptrptr_0): Remove. (hook_uint_void_0): New. * opts-common.c (decode_cmdline_option, decode_cmdline_options_to_array): Also fill in canonical_option field. * opts.c (complain_wrong_lang): Use langhook to determine whether to complain instead of special-casing LTO. (decode_options): Separate lang_mask determination with option_lang_mask hook from call of init_options hook. * opts.h (struct cl_decoded_option): Add canonical_option. ada: * gcc-interface/misc.c (gnat_option_lang_mask): New. (gnat_init_options): Update prototype. Reconstruct argv array from decoded options. c-family: * c-common.h (c_common_option_lang_mask, c_common_initialize_diagnostics, c_common_complain_wrong_lang_p): New. (c_common_init_options): Update prototype. * c-opts.c (c_common_option_lang_mask): New. (c_common_initialize_diagnostics): Split out of c_common_init_options. (accept_all_c_family_options, c_common_complain_wrong_lang_p): New. (c_common_init_options): Update prototype. Use decoded options in search for -lang-asm. cp: * cp-objcp-common.c (cxx_initialize_diagnostics): First call c_common_initialize_diagnostics. * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define. fortran: * cpp.c (gfc_cpp_init_options): Update prototype. Use number of decoded options in allocating deferred_opt. * cpp.h (gfc_cpp_init_options): Update prototype. * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define. * gfortran.h (gfc_option_lang_mask): New. (gfc_init_options): Update prototype. * options.c (gfc_option_lang_mask): New. (gfc_init_options): Update prototype. Pass new arguments to gfc_cpp_init_options. java: * lang.c (java_option_lang_mask): New. (java_init_options): Update prototype. (LANG_HOOKS_OPTION_LANG_MASK): Define. lto: * lto-lang.c (lto_option_lang_mask, lto_complain_wrong_lang_p): New. (lto_init_options): Update prototype. (LANG_HOOKS_OPTION_LANG_MASK, LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define. From-SVN: r162560
2010-07-23Move changelogs to correct filesAndi Kleen1-0/+12
From-SVN: r162447
2010-07-23re PR lto/44992 (ld -r breaks LTO)Andi Kleen2-36/+197
gcc: 2010-07-10 Andi Kleen <ak@linux.intel.com> PR lto/44992 * lto-opts.c (lto_write_options): Add NULL file_data argument to lto_get_section_name. * lto-section-out.c (lto_destroy_simple_output_block): Likewise. * lto-streamer-out.c (produce_asm): Likewise. (copy_function): Likewise. (produce_symtab): Likewise. (produce_asm_for_decls): Likewise. * lto-streamer.c (lto_get_section_name): Add file_data argument. Rewrite to add random postfix to LTO sections. * lto-streamer.h (lto_file_decl_data): Add next, id, resolutions. (lto_get_section_name): Add file_data argument to prototype. lto: 2010-07-10 Andi Kleen <ak@linux.intel.com> PR lto/44992 * lto.c: Include splay-tree.h (lto_resolution_read): Change to walk file_ids tree and parse extra file_id in resolution file. (lto_section_with_id): Add. (create_subid_section_table): Add. (lwstate): Add. (lto_create_files_from_ids): Add. (lto_file_read): Change to handle sub file ids and create list of file_datas. Add output argument for count. (get_section_data): Pass file_data to lto_get_section_name. (lto_flatten_file): Add. (read_cgraph_and_symbols): Handle linked lists of file_datas. lto-plugin: 2010-07-10 Andi Kleen <ak@linux.intel.com> PR lto/44992 * lto-plugin.c (sym_aux): Add. (plugin_symtab): Remove slots. Add aux and id. (parse_table_entry): Change to use aux instead of slots. (LTO_SECTION_PREFIX): Add. (translate): Improve buffer allocation. Change to append symbols to existing out buffer. (get_section): Remove. (process_symtab): Add. (free_2): Free symtab->aux. (write_resolution): Handle aux instead of slots. Print sub id to resolution file. (claim_file_handler): Clear lto_file. Replace get_symtab/translate calls with call to process_symtab. From-SVN: r162443
2010-07-23lto-coff.c (hash_name, eq_name): Move.Andi Kleen5-73/+45
2010-07-10 Andi Kleen <ak@linux.intel.com> * lto-coff.c (hash_name, eq_name): Move. (lto_obj_build_section_table): Call lto_obj_create_section_hash_table. * lto-elf.c: (hash_name, eq_name): Move. (lto_obj_build_section_table): Call lto_obj_create_section_hash_table. * lto-macho.c: (hash_name, eq_name): Move. (lto_obj_build_section_table): Call lto_obj_create_section_hash_table. * lto.c: (hash_name, eq_name): Move from lto-*.c (lto_obj_create_section_hash_table): Add. (free_with_string): Add. From-SVN: r162441
2010-07-08toplev.h: Do not include diagnostic-core.h.Manuel López-Ibáñez5-0/+12
2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org> * toplev.h: Do not include diagnostic-core.h. Include diagnostic-core.h in every file that includes toplev.h. * c-tree.h: Do not include toplev.h. * pretty-print.h: Update comment. * Makefile.in: Update dependencies. * alias.c: Include diagnostic-core.h in every file that includes toplev.h. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * combine.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/arm.c: Likewise. * config/arm/pe.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/cris/cris.c: Likewise. * config/crx/crx.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/h8300/h8300.c: Likewise. * config/host-darwin.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/netware.c: Likewise. * config/i386/nwld.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68hc11/m68hc11.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/picochip/picochip.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390.c: Likewise. * config/score/score.c: Likewise. * config/score/score3.c: Likewise. * config/score/score7.c: Likewise. * config/sh/sh.c: Likewise. * config/sh/symbian-base.c: Likewise. * config/sh/symbian-c.c: Likewise. * config/sh/symbian-cxx.c: Likewise. * config/sol2-c.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. * convert.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbxout.c: Likewise. * ddg.c: Likewise. * dominance.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * gimple-low.c: Likewise. * gimplify.c: Likewise. * graph.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * implicit-zee.c: Likewise. * integrate.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-iv.c: Likewise. * lto-opts.c: Likewise. * lto-symtab.c: Likewise. * main.c: Likewise. * modulo-sched.c: Likewise. * optabs.c: Likewise. * params.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtlanal.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * simplify-rtx.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * targhooks.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-inline.c: Likewise. * tree-nomudflap.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-phinodes.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. * varasm.c: Likewise. * vec.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. c-family/ * c-common.h: Include diagnostic-core.h. Error if already included. * c-semantics.c: Do not define GCC_DIAG_STYLE here. cp/ * cp-tree.h: Do not include toplev.h. java/ * boehm.c: Include diagnostic-core.h in every file that includes toplev.h. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * jcf-parse.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. ada/ * gcc-interface/utils.c: Include diagnostic-core.h in every file that includes toplev.h. lto/ * lto-coff.c: Include diagnostic-core.h in every file that includes toplev.h. * lto-elf.c: Likewise. * lto-lang.c: Likewise. * lto-macho.c: Likewise. From-SVN: r161943
2010-07-07lto-elf.c (ELFOSABI_NONE, [...]): Define if not defined.Jakub Jelinek2-3/+34
* lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined. (validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX objects. From-SVN: r161935
2010-07-05cgraph.h (cgraph_node, [...]): Update docmentation of in_other_partition.Jan Hubicka2-8/+94
* cgraph.h (cgraph_node, cgraph_varpool_node): Update docmentation of in_other_partition. * lto-cgraph.c (referenced_from_other_partition_p, reachable_from_other_partition_p): Use in_other_partition flags. (output_node, output_varpool_node): COMDAT nodes always have private copies and thus are never used from other partition. * lto.c (add_cgraph_node_to_partition): Forward declare; walk also nodes from same comdat group as well as all comdat functions referenced here. (add_varpool_node_to_partition, add_references_to_partition): New function. (lto_1_1_map): Skip COMDAT fnctions/variables; use add_varpool_node_to_partition; clear aux flags when done. (lto_promote_cross_file_statics): Do not promote stuff that gets duplicated to each ltrans. From-SVN: r161846
2010-07-04cgraphunit.c (init_cgraph): Only initialize dump file if it is not already ↵Jan Hubicka2-0/+11
initialized. * cgraphunit.c (init_cgraph): Only initialize dump file if it is not already initialized. * lto.c (read_cgraph_and_symbols): Dump cgraph before merging. From-SVN: r161811
2010-07-03timevar.def (TV_OUT_OF_SSA, [...]): New timevars.Jan Hubicka1-4/+4
* timevar.def (TV_OUT_OF_SSA, TV_VAR_EXPAND, TV_POST_EXPAND, TV_VAR_TRACKING_DATAFLOW, TV_VAR_TRACKING_EMIT): New timevars. * cfgexpand.c (gimple_expand_cfg): Use new timevars. * var-tracking.c (vt_find_locations, variable_tracking_main_1): Likewise. * lto-stramer-out.c (pass_ipa_lto_gimple_out, pass_ipa_lto_finish_out): Update timevars.V * timevar.def (TV_IPA_LTO_GIMPLE_IO, TV_IPA_LTO_DECL_IO): Remove. (TV_IPA_LTO_GIMPLE_IN, TV_IPA_LTO_GIMPLE_OUT, TV_IPA_LTO_DECL_IN, TV_IPA_LTO_DECL_OUT): New. * lto.c (read_cgraph_and_symbols, materialize_cgraph): Update timevars. From-SVN: r161779