OSDN Git Service

./:
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
index 2fce0d5..20000c9 100644 (file)
+2009-10-05  Sriraman Tallam  <tmsriram@google.com>
+
+       * doc/plugins.texi: Change plugin_pass to register_pass_info.
+
+2009-10-05  Basile Starynkevitch  <basile@starynkevitch.net>
+           Rafael Espindola  <espindola@google.com>
+
+       * gengtype.c (write_types): Moved call to write_func_for_structure
+       into seperate loops.
+
+2009-10-05  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41281
+       * lto-cgraph.c (output_cgraph): Output toplevel asms.
+       (input_cgraph_1): Input toplevel asms.
+
+2009-10-05  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/40902
+       * lto-symtab.c (lto_compatible_attributes_p): Remove.
+       (external_aggregate_decl_p): Likewise.
+       (lto_symtab_compatible): Re-structure.  Remove dead code.
+       For variables ignore toplevel qualifiers when comparing types.
+       Issue warnings, not errors for mismatched user-alignment.
+
+2009-10-05  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41552
+       PR lto/41487
+       * lto-symtab.c (struct lto_symtab_base_def): Remove.
+       (struct lto_symtab_identifier_def): Likewise.
+       (struct lto_symtab_decl_def): Likewise.
+       (struct lto_symtab_entry_def): New.
+       (lto_symtab_identifier_t): Rename to ...
+       (lto_symtab_entry_t): ... this.
+       (lto_symtab_decls): Remove.
+       (lto_symtab_base_hash): Rename to ...
+       (lto_symtab_entry_hash): ... this.
+       (lto_symtab_base_eq): Rename to ...
+       (lto_symtab_entry_eq): ... this.
+       (lto_symtab_base_marked_p): Rename to ...
+       (lto_symtab_entry_marked_p): ... this.
+       (lto_symtab_identifier_marked_p): Remove.
+       (lto_symtab_decl_marked_p): Likewise.
+       (lto_symtab_maybe_init_hash_tables): Rename to ...
+       (lto_symtab_maybe_init_hash_table): ... this.
+       (lto_symtab_set_resolution_and_file_data): Remove.
+       (lto_symtab_register_decl): New function.
+       (lto_symtab_get_identifier): Remove.
+       (lto_symtab_get): New function.
+       (lto_symtab_get_resolution): Adjust.
+       (lto_symtab_get_identifier_decl): Remove.
+       (lto_symtab_set_identifier_decl): Likewise.
+       (lto_symtab_merge_decl): Rename to ...
+       (lto_symtab_merge): ... this.  Rewrite.
+       (lto_symtab_merge_var): Remove.
+       (lto_symtab_merge_fn): Likewise.
+       (lto_symtab_prevailing_decl): Adjust.
+       (lto_cgraph_replace_node): New function.
+       (lto_symtab_merge_decls_2): Likewise.
+       (lto_symtab_merge_decls_1): Likewise.
+       (lto_symtab_fixup_var_decls): Likewise.
+       (lto_symtab_resolve_symbols): Likewise.
+       (lto_symtab_merge_decls): Likewise.
+       (lto_symtab_prevailing_decl): Adjust.
+       (lto_symtab_get_symtab_def): Remove.
+       (lto_symtab_get_file_data): Likewise.
+       (lto_symtab_clear_resolution): Adjust.
+       (lto_symtab_clear_resolution): Likewise.
+       * lto-cgraph.c (input_edge): Do not merge cgraph nodes here.
+       (input_cgraph_1): Likewise.
+       * lto-streamer-in.c (get_resolution): Do not provide fake
+       symbol resolutions here.
+       (deferred_global_decls): Remove.
+       (lto_register_deferred_decls_in_symtab): Likewise.
+       (lto_register_var_decl_in_symtab): Change signature, register
+       variable via lto_symtab_register_decl.
+       (lto_register_function_decl_in_symtab): Likewise.
+       (lto_read_tree): Adjust.
+       * lto-streamer.h (lto_register_deferred_decls_in_symtab): Remove.
+       (lto_symtab_merge_var): Likewise.
+       (lto_symtab_merge_fn): Likewise.
+       (lto_symtab_register_decl): Declare.
+       (lto_symtab_merge_decls): Likewise.
+
+2009-10-05  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/23821
+       * tree-vrp.c (vrp_finalize): Do not perform copy propagation.
+       * tree-ssa-dom.c (cprop_operand): Do not propagate copies into
+       simple IV increments.
+
+2009-10-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+        * config/arm/arm.c (arm_override_options): Really initialize
+        flag_dwarf2_cfi_asm to 0.
+
+2009-10-05  Doug Kwan  <dougkwan@google.com>
+
+       PR rtl-optimization/41574
+       * combine.c (distribute_and_simplify_rtx): Quit if RTX mode is
+       floating point and we are not doing unsafe math optimizations.
+
+2009-10-03  Simon Baldwin  <simonb@google.com>
+           Cary Coutant  <ccoutant@google.com>
+           Rafael Espindola  <espindola@google.com>
+           Richard Guenther  <rguenther@suse.de>
+           Jan Hubicka  <jh@suse.cz>
+           Doug Kwan <dougkwan@google.com>
+           H.J. Lu  <hongjiu.lu@intel.com> 
+           Bill Maddox  <maddox@google.com>
+           Ryan Mansfield  <rmansfield@qnx.com>
+           Diego Novillo  <dnovillo@google.com>
+           Ollie Wild  <aaw@google.com>
+           Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       * lto-cgraph.c: New file.
+       * lto-compress.c: New file.
+       * lto-compress.h: New file.
+       * lto-opts.c: New file.
+       * lto-section-in.c: New file.
+       * lto-section-out.c: New file.
+       * lto-streamer-in.c: New file.
+       * lto-streamer-out.c: New file.
+       * lto-streamer.c: New file.
+       * lto-streamer.h: New file.
+       * lto-symtab.c: New file.
+       * lto-wpa-fixup.c: New file.
+       * lto-wrapper.c: New file.
+
+2009-10-03  Simon Baldwin  <baldwin@google.com>
+           Ben Elliston  <bje@au.ibm.com>
+           Rafael Espindola  <espindola@google.com>
+           Nathan Froyd  <froydnj@codesourcery.com>
+           Jan Hubicka  <jh@suse.cz>
+           Doug Kwan  <dougkwan@google.com>
+           Diego Novillo  <dnovillo@google.com>
+           Kenneth Zadeck  <zadeck@naturalbridge.com>
+
+       * Makefile.in (enable_lto): New.
+       (site.exp): If @enable_lto@ is set to 'yes' define
+       ENABLE_LTO.
+       (LINKER_PLUGIN_API_H): Define.
+       (LTO_SYMTAB_H): Define.
+       (LTO_STREAMER_H): Define.
+       (TREE_VECTORIZER_H): Define.
+       (INCLUDES): Add LIBELFINC.
+       (OBJS-common): Add lto-cgraph.o, lto-streamer-in.o,
+       lto-streamer-out.o, lto-section-in.o, lto-section-out.o,
+       lto-symtab.o, lto-opts.o, lto-streamer.o, lto-wpa-fixup.o,
+       lto-compress.o.
+       (MOSTLYCLEANFILES): Add lto-wrapper$(exeext)
+       (native): Add lto-wrapper$(exeext)
+       (lto-compress.o, lto-cgraph.o, lto-streamer-in.o,
+       lto-streamer-out.o, lto-section-in.o, lto-section-out.o,
+       lto-symtab.o, lto-opts.o, lto-streamer.o,
+       lto-wpa-fixup.o): New rules.
+       (gimple.o): Add dependency on LTO_HEADER_H and
+       LTO_SECTION_OUT_H.
+       (varasm.o): Add dependency on tree-iterator.h.
+       (cgraph.o): Add dependency on cif-code.def.
+       (ipa-reference.o): Add dependency on LTO_STREAMER_H.
+       (ipa-pure-const.o): Likewise.
+       (GTFILES): Add lto-symtab.c.
+       (install-lto-wrapper): New.
+       * configure.ac: If 'lto' is in enable_languages, define
+       ENABLE_LTO and enable_lto.
+       If LIBELFLIBS is set, define HAVE_libelf.
+       * config.in: Regenerate.
+
+2009-10-03  Rafael Espindola  <espindola@google.com>
+           Diego Novillo  <dnovillo@google.com>
+
+       * cgraphunit.c (ipa_passes): Prevent lto1 from calling
+       ipa_write_summaries.
+       Call execute_ipa_summary_passes for all_regular_ipa_passes and
+       all_lto_gen_passes.
+       (cgraph_optimize): Make extern.
+
+2009-10-03  Nathan Froyd  <froydnj@codesourcery.com>
+           Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       * toplev.c (in_lto_p): Declare.
+       * collect2.c (scan_prog_file): Read all the output when reading
+       information for LTO.
+       (enum lto_mode_d): Declare.
+
+2009-10-03  Richard Guenther  <rguenther@suse.de>
+           Diego Novillo  <dnovillo@google.com>
+
+       * gimple.c: Include target.h and alias.h.
+       (gimple_types): Declare.
+       (type_hash_cache): Declare.
+       (gimple_alloc_stat): Make extern.
+       (gimple_build_eh_must_not_throw): Call
+       gimple_eh_must_not_throw_set_fndecl.
+       (struct type_pair_d): Declare.
+       (type_pair_t): Declare.
+       (type_pair_hash): New.
+       (type_pair_eq): New.
+       (lookup_type_pair): New.
+       (gimple_force_type_merge): New.
+       (compare_type_names_p): New.
+       (compare_field_offset): New.
+       (gimple_types_compatible_p): New.
+       (struct sccs): Declare.
+       (next_dfs_num): Declare.
+       (iterative_hash_gimple_type): New.
+       (visit): New.
+       (iterative_hash_type_name): New.
+       (iterative_hash_gimple_type): New.
+       (gimple_type_hash): New.
+       (gimple_type_eq): New.
+       (gimple_register_type): New.
+       (print_gimple_types_stats): New.
+       (gimple_signed_or_unsigned_type): New.
+       (gimple_unsigned_type): New.
+       (gimple_signed_type): New.
+       (gimple_get_alias_set): New.
+       (gimple_decl_printable_name): Do not use DMGL_TYPES.
+       * gimple.h (gimple_alloc, gimple_alloc_stat): Declare.
+       (gimple_force_type_merge): Declare.
+       (gimple_types_compatible_p): Declare.
+       (gimple_register_type): Declare.
+       (print_gimple_types_stats): Declare.
+       (gimple_unsigned_type): Declare.
+       (gimple_signed_type): Declare.
+       (gimple_get_alias_set): Declare.
+       (gimple_eh_must_not_throw_set_fndecl): New.
+
+2009-10-03  Jan Hubicka  <jh@suse.cz>
+           Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       * ipa-pure-const.c: Include lto-streamer.h.
+       (register_hooks): Factor out of ...
+       (generate_summary): ... here.
+       (pure_const_write_summary): New.
+       (pure_const_read_summary): New.
+       (pass_ipa_pure_const): Add pure_const_write_summary and
+       pure_const_read_summary.
+       * ipa-reference.c: Include lto-streamer.h.
+       (add_new_function): New.
+       (remove_node_data): New.
+       (duplicate_node_data): New.
+       (ipa_init): Guard against multiple calls.
+       Move hook setup from analyze_function.
+       (write_node_summary_p): New.
+       (ipa_reference_write_summary): New.
+       (ipa_reference_read_summary): New.
+       (pass_ipa_reference): Add ipa_reference_write_summary and
+       ipa_reference_read_summary.
+       * cgraph.h (cgraph_local_info): Add field lto_file_data.
+       (struct cgraph_edge): Add fields lto_stmt_uid and
+       call_stmt_cannot_inline_p.
+       (cgraph_optimize): Declare.
+       (cgraph_decide_is_function_needed): Declare.
+       (reset_inline_failed): Declare.
+       (enum LTO_cgraph_tags): Declare.
+       (LTO_cgraph_tag_names): Declare.
+       (LCC_NOT_FOUND): Define.
+
+2009-10-03  Doug Kwan  <dougkwan@google.com>
+           Rafael Espindola  <espindola@google.com>
+           Jan Hubicka  <jh@suse.cz>
+           Diego Novillo  <dnovillo@google.com>
+           Kenneth Zadeck  <zadeck@naturalbridge.com>
+
+       * passes.c (all_regular_ipa_passes): New.
+       (all_ipa_passes): Rename to all_small_ipa_passes.
+       (init_optimization_passes): Init all_regular_ipa_passes.
+       * tree-pass.h (all_regular_ipa_passes): New.
+       (all_ipa_passes): Rename to all_small_ipa_passes.
+       * passes.c (all_lto_gen_passes): New.
+       (init_optimization_passes): Initialize all_lto_gen_passes.
+       (execute_ipa_summary_passes): Make non-static.
+       (ipa_write_summaries_1): New.
+       (ipa_write_summaries_2): New.
+       (ipa_write_summaries): New.
+       (ipa_write_summaries_of_cgraph_node_set): New.
+       (ipa_read_summaries_1): New.
+       (ipa_read_summaries): New.
+       (execute_ipa_pass_list): Call cgraph_process_new_functions.
+       (execute_regular_ipa_pass_list): Remove.
+       (init_optimization_passes): Schedule
+       pass_rebuild_cgraph_edges and pass_early_inline outside
+       of pass_all_early_optimizations.  Document reason.
+       (pass_ipa_lto_gimple_out, pass_ipa_lto_wpa_fixup,
+       pass_ipa_lto_finish_out): New pass.
+       (pass_ipa_summary_passes): Start and stop timers if the pass
+       has them.
+       (execute_all_ipa_transforms): New.
+       (execute_one_pass): Don't call execute_one_ipa_transform_pass.
+       (dump_properties, debug_properties): New.
+       * tree-optimize.c (gate_all_early_local_passes): Return
+       false if we are in lto1.
+       (tree_rest_of_compilation): Call execute_all_ipa_transforms.
+       * tree-pass.h (execute_all_ipa_transforms): Declare.
+       (pass_ipa_function_and_variable_visibility): Declare.
+       (pass_ipa_early_inline): Declare.
+       (pass_ipa_lto_gimple_out): Declare.
+       (pass_ipa_lto_wpa_fixup): Declare.
+       (pass_ipa_lto_finish_out): Declare.
+       (all_small_ipa_passes, all_regular_ipa_passes,
+       all_lto_gen_passes): Declare.
+       (execute_ipa_summary_passes): Declare.
+       (execute_all_ipa_transforms): Declare.
+       (ipa_write_summaries): Declare
+       (ipa_write_summaries_of_cgraph_node_set): Declare.
+       (ipa_read_summaries): Declare.
+
+2009-10-03  Doug Kwan  <dougkwan@google.com>
+           Ollie Wild  <aaw@google.com>
+
+       * ipa-prop.c (ipa_propagate_indirect_call_infos): Do
+       nothing in WPA.
+
+       * collect2.c (LTO_MODE_NONE, LTO_MODE_LTO, LTO_MODE_WPA): New enums.
+       (lto_mode): New variable.
+       (maybe_run_lto_and_relink): Handle the -fwpa option.
+       (main): Handle the -fwpa option.
+       (maybe_unlink_list): New function.
+       * gcc.c (link_lto_options): Replace -flto with -fwpa.
+       * common.opt (flto): New flag.
+       * toplev.c (flag_generate_lto): Declare.
+
+2009-10-03  Simon Baldwin  <simonb@google.com>
+
+       * common.opt (flto-compression-level): New flag.
+
+       * opts.c: Include lto-opts.h.
+       (handle_option): Call lto_register_user_option for each
+       valid option handled.
+       * (decode_options): Clear registered options before the options
+       handling loop.
+
+2009-10-03  Cary Coutant  <ccoutant@google.com>
+
+       * collect2.c (is_elf): New function.
+       (scan_prog_file): Require LTO object to be in ELF format.
+
+2009-10-03  Rafael Espindola  <espindola@google.com>
+
+       * gcc.c (LINK_COMMAND_SPEC): Use the -pass-through option to pass
+       libgcc to the linker.
+
+       * ipa-cp.c (cgraph_gate_cp): Return false if LTRANS is
+       running.
+
+       * collect2.c (maybe_run_lto_and_relink): Execute lto-wrapper.
+       (collect_execute): Add flags argument. Pass flags to pex_run. Update
+       all callers.
+       * collect2.h (collect_execute): Add flags argument.
+       * tlink.c (tlink_execute): Update call to collect_execute.
+       * gcc.c (main): Set the COLLECT_LTO_WRAPPER environment variable.
+       (use_linker_plugin): New.
+       (use_linker_plugin_spec_function): New.
+       (LINK_COMMAND_SPEC): Pass plugin options to the linker.
+       (linker_plugin_file_spec): New.
+       (lto_wrapper_spec): New.
+       (lto_gcc_spec): New.
+       (static_specs): Add linker_plugin_file, lto_wrapper and lto_gcc.
+       (static_spec_functions): Add use-linker-plugin.
+       (process_command): Handle -use-linker-plugin.
+       (main): Use lto_wrapper_spec instead of lto_wrapper. Set
+       linker_plugin_file_spec and lto_gcc_spec.
+       (use_linker_plugin_spec_function): New.
+
+2009-10-03  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41547
+       PR lto/41548
+       * tree.h (is_lang_specific): Include LANG_TYPE.
+       * tree.c (find_decls_types_r): Manually add interesting parts
+       of TYPE_FIELDS.  Walk BINFO_VIRTUALS.  Do not walk TYPE_METHODS.
+
+       * gimple.c (type_pair_hash): Make symmetric.
+       (type_pair_eq): Likewise.
+       (lookup_type_pair): Increase initial hashtable size.
+       (gimple_force_type_merge): Rely on type-pair symmetry.
+       (visit): Remove excessive checking code.
+       (iterative_hash_type_name): Do not hash TYPE_NAME of
+       anonymous unions.
+       (gimple_register_type): Remove getenv calls, shrink initial
+       hashtable size.
+
+       PR middle-end/41502
+       * cgraphunit.c (ipa_passes): Do not remove bodies of extern
+       inline functions if not generating lto output.
+
+       PR lto/41379
+       * toplev.c (finalize): In WPA mode remove the asm file.
+
+2009-10-03  Doug Kwan  <dougkwan@google.com>
+
+       * ipa-inline.c (cgraph_mark_inline): Check
+       edge->call_stmt_cannot_inline_p instead of calling
+       gimple_call_cannot_inline_p.
+       (cgraph_decide_inlining): Do nothing in WPA and LTRANS.
+       (cgraph_gate_ipa_early_inlining): Return false if
+       in_lto_p is set.
+       (inline_generate_summary): Do nothing in LTRANS.
+       * cgraph.c (initialize_inline_failed): Make sure
+       e->call_stmt exists before calling
+       gimple_call_cannot_inline_p.
+       (cgraph_create_edge): Set edge->call_stmt_cannot_inline_p.
+       (cgraph_clone_edge): Add argument STMT_UID.  Modify all
+       callers.
+       Update new_edge->lto_stmt_uid.
+       * cgraphbuild.c (reset_inline_failed): New.
+
+       * common.opt (fwpa): New flag.
+       (fltrans): New option.
+       * gcc.c (gcc_lto_option_t): New type.
+       (current_lto_option): New variable.
+       (lto_single_spec_function): Remove and is replaced by ..
+       (lto_option_spec_function): New function.
+       (LINK_COMMAND_SPEC): Use link_lto_option spec instead of just
+       passing the -flto flag.
+       (cc1_options): Separate non-LTO related parts into ..
+       (cc1_non_lto_options): Non-LTO related options shared by all FEs.
+       (lto1_options): New spec for lto FE.
+       (link_lto_options): New spec for handling LTO flags in linker.
+       (invoke_lto_single): Re-format to fit in 80 column.  Replace
+       lto-single with lto-option.
+       (static_specs): Add cc1_non_lto_options, lto1_options and
+       link_lto_options.
+       (static_spec_function): Replace lto-single with lto-option.
+       (process_command): Handle -flto, -fwpa and -fltran
+       by setting current_lto_option and not passing it to subprocess
+       unconditionally.
+
+2009-10-03  Bill Maddox  <maddox@google.com>
+
+       Add `gcc' driver support for link-time code generation (LTO).
+
+       * collect2.c (enum pass): Add new literal PASS_LTOINFO.
+       (lto_flag, lto_objects, lto_o_file): New variables.
+       (struct lto_object, struct lto_object_list): New structures.
+       (collect_exit, handler): Remove LTO temporary output file on exit.
+       (add_lto_object): New function.
+       (maybe_run_lto_and_relink): New function. Perform link time code
+       generation and relinking for object files containing LTO information.
+       (main): Invoke maybe_run_lto_and_relink().
+       (dump_argv): New function.  For debugging, currently disabled.
+       (scan_prog_file): Add LTO information pass.
+       * gcc.c (LINK_COMMAND_SPEC): Pass `-flto' switch to linker, i.e.,
+       collect2.
+       * toplev.c (compile_file): Emit assembler directive to create
+       the `gnu_lto_v1' marker symbol when compiling with `-flto'.
+
+2009-10-03  Diego Novillo  <dnovillo@google.com>
+
+       * c.opt: Add LTO to warn_abi and warn_psabi.
+
+       * tree.c (fld_worklist_push): Rename from PUSH.
+       Convert to static inline function.
+       Ignore language-specific nodes.
+       Update all users.
+       (find_decls_types_r): Do not traverse the subtrees of
+       language-specific nodes.
+       Do not traverse DECL_INITIAL for TYPE_DECLs.
+       * tree.h (is_lang_specific): New.
+       * langhooks.h (struct lang_hooks_for_decls): Remove
+       may_need_assembler_name_p.  Update all users.
+
+       * c-common.c (set_builtin_user_assembler_name): Move ...
+       * builtins.c (set_builtin_user_assembler_name): ... here.
+       (is_builtin_name): Add comment
+       (is_builtin_fn): New.
+       * except.c (output_ttype): Only call
+       lookup_type_for_runtime if TYPE is not a runtime type.
+
+       * passes.c (register_pass): Call position_pass on
+       all_small_ipa_passes, all_regular_ipa_passes and
+       all_lto_gen_passes.
+       * timevar.def (TV_IPA_LTO_GIMPLE_IO): Define.
+       (TV_IPA_LTO_DECL_IO): Define.
+       (TV_IPA_LTO_CGRAPH_IO): Define.
+       (TV_LTO): Define.
+       (TV_WHOPR_WPA): Define.
+       (TV_WHOPR_WPA_IO): Define.
+       (TV_WHOPR_LTRANS): Define.
+       (TV_WHOPR_WPA_FIXUP): Define.
+       (TV_WHOPR_WPA_LTRANS_EXEC): Define.
+       * tree-cfg.c (tree_node_can_be_shared): Make extern.
+       * tree-flow.h (tree_node_can_be_shared): Declare.
+       * tree-inline.c (tree_can_inline_p): Check that E has a
+       statement associated with it.
+       * tree.c (free_lang_data_in_binf): Factor out of ...
+       (free_lang_data_in_type): ... here.
+       Call RECORD_OR_UNION_TYPE_P.
+       (need_assembler_name_p): Ignore DECL if it does not have
+       TREE_PUBLIC set.
+       Call lang_hooks.decls.may_need_assembler_name_p if set.
+       (free_lang_data_in_decl): Do not clear DECL_CONTEXT for
+       CONST_DECLs.
+       (free_lang_data): Set debug_info_level to
+       DINFO_LEVEL_NONE.
+       Set write_symbols to NO_DEBUG.
+       Set debug_hooks to do_nothing_debug_hooks.
+       (gate_free_lang_data): Return true if flag_generate_lto
+       is set.
+       (walk_tree_1): Call RECORD_OR_UNION_TYPE_P.
+       * c-common.h (set_builtin_user_assembler_name): Move ...
+       * tree.h (set_builtin_user_assembler_name): ... here.
+
+       * common.opt (flto-report): New flag.
+       * opts.c (complain_wrong_lang): Do not complain if
+       running lto1.
+       * collect2.c (scan_prog_file): Send the error output of
+       'nm' to HOST_BIT_BUCKET.
+
+2009-10-03  Ollie Wild  <aaw@google.com>
+
+       * langhooks-def.h (lhd_begin_section): New function declaration.
+       (lhd_write_section): New function declaration.
+       (lhd_end_section): New function declaration.
+       (LANG_HOOKS_BEGIN_SECTION): New macro.
+       (LANG_HOOKS_WRITE_SECTION_DATA): New macro.
+       (LANG_HOOKS_END_SECTION): New macro.
+       (LANG_HOOKS_LTO): New macro.
+       (LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_LTO.
+       * langhooks.c (output.h): Add include.
+       (saved_section): New static variable.
+       (lhd_begin_section): New function.
+       (lhd_write_section_data): New function.
+       (lhd_end_section): New function.
+       * langhooks.h (struct lang_hooks_for_lto): New structure.
+       (struct lang_hooks): Add member lto.
+       * Makefile.in (langhooks.o): Add dependency on output.h.
+
+       * c-opts.c (c_common_post_options): Handle -flto and -fwhopr.
+
+2009-10-03  Richard Guenther  <rguenther@suse.de>
+
+       * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
+       Handle LTO.
+
+2009-10-03  Simon Baldwin  <simonb@google.com>
+           Richard Guenther  <rguenther@suse.de>
+           Janis Johnson  <janis187@us.ibm.com>
+           Doug Kwan  <dougkwan@google.com>
+           Diego Novillo  <dnovillo@google.com>
+           Ramana Radhakrishnan  <ramana.r@gmail.com>
+           Ollie Wild  <aaw@google.com>
+
+       * doc/install.texi: Add documentation for libelf and --enable-lto.
+       * doc/invoke.texi: Document -fwpa, -flto, -fwhopr,
+       -fltrans, -flto-report, -flto-compression-level and
+       -use-linker-plugin.
+       * doc/sourcebuild.texi: Document use of zlib.
+       Document lto-plugin.
+       Add section for LTO Testing.
+
+2009-10-02  Cary Coutant  <ccoutant@google.com>
+
+       Add support for comdat type sections for DWARF v4.  Merge from dwarf4
+       branch.
+       * dwarf2out.c (DWARF_TYPE_SIGNATURE_SIZE): New constant.
+       (dw_die_ref): Define vector type.
+       (enum dw_val_class): Add dw_val_class_data8.
+       (struct dw_val_struct): Add v.val_data8.
+       (comdat_type_node_ref): New type.
+       (struct die_struct): Move die_symbol into a union; add new field
+       die_type_node.  Change all uses.
+       (comdat_type_node): New type.
+       (skeleton_chain_node): New type.
+       (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): New constant.
+       (comdat_type_list): New variable.
+       (dwarf_tag_name): Add DW_TAG_type_unit.
+       (dwarf_attr_name): Add DW_AT_signature.
+       (add_AT_data8): New function.
+       (replace_child): New function.
+       (move_all_children): New function.
+       (print_signature): New function.
+       (print_die): Print signature information; add dw_val_class_data8.
+       (attr_checksum): Support dw_val_class_data8.
+       (CHECKSUM_STRING): Redefine for DWARF-4 to include
+       trailing NULL byte.
+       (CHECKSUM_SLEB128, CHECKSUM_ULEB128): New macros.
+       (checksum_sleb128, checksum_uleb128): New functions.
+       (checksum_die_context): New function.
+       (loc_checksum_ordered): New function.
+       (attr_checksum_ordered): New function.
+       (struct checksum_attributes): New structure.
+       (collect_checksum_attributes): New function.
+       (die_checksum_ordered): New function.
+       (generate_type_signature): New function.
+       (same_dw_val_p): Add dw_val_class_data8.
+       (is_symbol_die): Use new is_declaration_die function.
+       (is_declaration_die): New function.
+       (should_move_die_to_comdat): New function.
+       (clone_die): New function.
+       (clone_tree): New function.
+       (clone_as_declaration): New function.
+       (copy_declaration_context): New function.
+       (generate_skeleton_ancestor_tree): New function.
+       (generate_skeleton_bottom_up): New function.
+       (generate_skeleton): New function.
+       (remove_child_or_replace_with_skeleton): New function.
+       (break_out_comdat_types): New function.
+       (struct decl_table_entry): New type.
+       (htab_decl_hash): New function.
+       (htab_decl_eq): New function.
+       (htab_decl_del): New function.
+       (copy_ancestor_tree): New function.
+       (copy_decls_walk): New function.
+       (copy_decls_for_unworthy_types): New function.
+       (build_abbrev_table): Don't assert on missing die_symbol when doing
+       comdat type sections.
+       (size_of_die): Use DW_FORM_sig8 for external references; Add
+       dw_val_class_data8.
+       (unmark_dies): Don't assert for unmarked dies when doing comdat
+       type sections.
+       (value_format): Support DW_FORM_sig8 and dw_val_class_data8.
+       (output_signature): New function.
+       (output_die): Likewise.
+       (output_compilation_unit_header): Mark output as DWARF version 3
+       even if generating DWARF 4.
+       (output_comdat_type_unit): New function.
+       (output_line_info): Mark output as DWARF version 3 even if generating
+       DWARF 4.
+       (dwarf2out_start_source_file): Don't do eliminate_dwarf2_dups with
+       DWARF-4.
+       (dwarf2out_end_source_file): Likewise.
+       (prune_unused_types_walk_attribs): Don't follow references into
+       comdat type sections.
+       (prune_unused_types_mark): When generating type units, do not mark
+       children of non-defining declarations of types; do mark children of
+       type entries.
+       (prune_unused_types): Process comdat type sections.
+       (htab_ct_hash): New function.
+       (htab_ct_eq): New function.
+       (dwarf2out_finish): Move types to comdat sections when using DWARF-4.
+       Add a pointer to the line table from type unit entries so
+       DW_AT_decl_file has meaning.
+       * varasm.c (default_elf_asm_named_section): Use identifier name as
+       comdat key instead of lang hook.
+
+2009-10-02  Neil Vachharajani  <nvachhar@google.com>
+
+       * gcov-io.c (gcov_open): Open files read-only when MODE < 0
+
+2009-10-02  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (divmod<mode>4) Macroize expander from
+       divmoddi4, divmodsi4 and divmodhi4 patterns using SWI248 macro.
+       (*divmod<mode>4): Macroize insn_and_split pattern from
+       *divmoddi4_cltd_rex64, *divmodsi4_cltd and divmodhi4 insn patterns
+       and their corresponding splitters usign SWI248 macro.  Split SImode
+       insn to generate cltd and DImode insn to generate cqto instead of
+       move+shift when optimizing for size or TARGET_USE_CLTD is in effect.
+       (*divmoddi4_nocltd_rex64, *divmodsi4_nocltd): Remove insn patterns.
+       (*divmod<mode>4_noext): Macroize insn from *divmoddi_noext_rex64 and
+       *divmodsi_noext patterns using SWI248 macro.
+       (udivmod<mode>4): Macroize expander from udivmoddi4, udivmodsi4 and
+       udivmodhi4 patterns using SWI248 macro.
+       (*udivmod<mode>4): Macroize insn_and_split pattern from
+       *udivmoddi4, udivmodsi4 and udivmodhi4 patterns and their
+       corresponding splitters using SWI248 macro.
+       (*udivmod<mode>4_noext): Macroize insn from *udivmoddi4_noext,
+       *udivmodsi4_noext and *udivmodhi_noext patterns using SWI248 macro.
+
+2009-10-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * stor-layout.c (layout_type) <ARRAY_TYPE>: Make sure that an array
+       of zero-sized element is zero-sized regardless of its extent.
+
+2009-10-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/40521
+       * configure.ac (HAVE_GAS_CFI_SECTIONS_DIRECTIVE): New test.
+       * configure: Regenerated.
+       * config.in: Regenerated.
+       * dwarf2out.c (dwarf2out_do_cfi_asm): Return false if
+       !HAVE_GAS_CFI_SECTIONS_DIRECTIVE and not emitting .eh_frame.
+       (dwarf2out_init): If HAVE_GAS_CFI_SECTIONS_DIRECTIVE and
+       not emitting .eh_frame, emit .cfi_sections .debug_frame
+       directive.
+
+       PR debug/41404
+       PR debug/41353
+       * cfgexpand.c (expand_debug_expr) <case STRING_CST>: Don't create
+       CONST_STRING if STRING_CST contains embedded '\0's or doesn't end with
+       '\0'.
+       (expand_debug_expr) <case VAR_DECL>: For TREE_STATIC !DECL_EXTERNAL
+       vars use DECL_RTL with resetting it back to NULL afterwards.
+       * dwarf2out.c (same_dw_val_p): For dw_val_class_addr compare with
+       rtx_equal_p instead of asserting it is a SYMBOL_REF.
+       (value_format): For dw_val_class_addr only use DW_FORM_addr if
+       the attribute type allows it, otherwise use DW_FORM_dataN.
+       (mem_loc_descriptor): Handle CONST_STRING.
+       (add_const_value_attribute): Handle CONST_STRING using add_AT_addr.
+       Handle MEM with CONST_STRING address using add_AT_string.
+       (rtl_for_decl_init): Return MEM with CONST_STRING address instead of
+       CONST_STRING for const arrays initialized with a string literal.
+       (resolve_one_addr, resolve_addr_in_expr, resolve_addr): New functions.
+       (dwarf2out_finish): Call resolve_addr.
+
+2009-10-02  Andreas Schwab  <schwab@linux-m68k.org>
+           Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+       * config/m68k/lb1sf68.asm (PICCALL): Use variable sized branch.
+
+2009-10-02  Nick Clifton  <nickc@redhat.com>
+
+       * config/mn10300/mn10300.h (USER_LABEL_PREFIX): Define.
+       (ASM_OUTPUT_LABELREF): Use asm_fprintf and %U.
+
+2009-10-01  Jan Hubicka  <jh@suse.cz>
+
+       * cgraph.c (cgraph_clone_node): Add redirect_callers parameter.
+       (cgraph_create_virtual_clone): Just pass redirect_callers
+       around.
+       * cgraph.h (cgraph_clone_node): Update prototype.
+       * ipa-pure-const.c (self_recursive_p): New function.
+       (propagate): Use it.
+       * ipa-inline.c (cgraph_clone_inlined_nodes,
+       cgraph_decide_recursive_inlining): Update.
+
+2009-10-01  David Daney  <ddaney@caviumnetworks.com>
+
+       * gcc/config/mips/mips.c (mips_process_sync_loop) Emit syncw
+       instructions for TARGET_OCTEON.
+
+2009-10-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+       * config/arm/arm.c (arm_override_options): Turn off
+       flag_dwarf2_cfi_asm for AAPCS variants.
+
+2009-10-01  Martin Jambor  <mjambor@suse.cz>
+
+       PR middle-end/12392
+       * tree-sra.c (convert_callers): Do not call
+       compute_inline_parameters on one caller more than once.
+
+2009-10-01  Nick Clifton  <nickc@redhat.com>
+
+       * config/vax/netbsd-elf.h (NETBSD_CC1_AND_CC1PLUS_SPEC): Define as
+       an empty string if not already defined.
+
+2009-10-01  Martin Jambor  <mjambor@suse.cz>
+
+       PR bootstrap/41395
+       * tree-sra.c (is_va_list_type): New function.
+       (find_var_candidates): Call is_va_list_type.
+       (find_param_candidates): Check that the type or the type pointed
+       to are not va_list types.
+
+2009-10-01  Martin Jambor  <mjambor@suse.cz>
+
+       PR c++/41503
+       * cp/pt.c (function_parameter_expanded_from_pack_p): Return false if
+       DECL_ARTIFICIAL (param_decl) is true.
+
+2009-09-30  Gabriel Dos Reis  <gdr@cs.tamu.edu>
+
+       * tree.h (tree_decl_common::lang_flag_8): New.
+       * c-common.c (c_common_reswords): Include "constexpr" as C++0x
+       keyword.
+       * c-common.h (RID_CONSTEXPR): New.
+
+2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/alpha/alpha.c (alpha_gimplify_va_arg_1):
+       Use ref-all pointers.
+       (alpha_gimplify_va_arg): Ditto.
+
+2009-09-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/41279
+       * cfgloopanal.c (num_loop_insns): Don't increment ninsns for each bb
+       before insn counting loop now that BB_END (bb) is counted.  Ensure
+       the return value isn't zero.
+
+2009-09-30  Nick Clifton  <nickc@redhat.com>
+
+       * config.gcc (sh-symbianelf): Replace definition of extra_objs
+       with separate definitions of c_target_objs and cxx_target_objs.
+       * config/sh/t-sh: Add rules to build symbian-cxx.o, symbian-c.o
+       and symbian-base.o.
+       * config/sh/sh.c (TARGET_CXX_INPUT_EXPORT_CLASS): Use
+       sh_symbian_import_export_class.
+       * config/sh/sh-protos.h: Fix names of exported symbian functions.
+       * config/sh/symbian.c: Delete, moving code into...
+       * config/sh/symbian-base.c: ... here
+       * config/sh/symbian-c.c: ... and here
+       * config/sh/symbian-cxx.c: ... and here.
+
+2009-09-30  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/22093
+       * config/alpha/alpha.md (unaligned_storehi_be): Force operand
+       of plus RTX into register.
+
+2009-09-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * doc/install.texi: Linguistic and markup fixes.
+       (Configuration) <--disable-cpp>: Remove description.
+       <--enable-maintainer-mode>: Autotools files are affected, too.
+       <--with-sysroot>: Improve description.
+       (Building): Bump required GNU make version.
+
 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
 
        * config.gcc (i[34567]86-*-*): Include fma4intrin.h.
        (x86_64-*-*): Ditto.
-       
+
        * config/i386/fma4intrin.h: New file, provide common x86 compiler
        intrinisics for FMA4.
        * config/i386/cpuid.h (bit_FMA4): Define FMA4 bit.
        * config/i386/x86intrin.h: Fix typo to SSE4A instead of SSE4a.
        Add FMA4 check and fma4intrin.h.
        * config/i386/i386-c.c(ix86_target_macros_internal): Check
-       ISA_FLAG for FMA4. 
+       ISA_FLAG for FMA4.
        * config/i386/i386.h(TARGET_FMA4): New macro for FMA4.
        * config/i386/i386.md (UNSPEC_FMA4_INTRINSIC): Add new UNSPEC
        constant for FMA4 support.
        (UNSPEC_FMA4_FMADDSUB): Ditto.
        (UNSPEC_FMA4_FMSUBADD): Ditto.
        * config/i386/i386.opt (-mfma4): New switch for FMA4 support.
-       * config/i386/i386-protos.h (ix86_fma4_valid_op_p): Add
-       declaration.
+       * config/i386/i386-protos.h (ix86_fma4_valid_op_p): Add declaration.
        (ix86_expand_fma4_multiple_memory): Ditto.
        * config/i386/i386.c (OPTION_MASK_ISA_FMA4_SET): New.
-       (OPTION_MASK_ISA_FMA4_UNSET): New.      
-       (OPTION_MASK_ISA_SSE4A_UNSET): Change definition to
-       depend on FMA4.
-       (OPTION_MASK_ISA_AVX_UNSET): Change definition to
-       depend on FMA4.
+       (OPTION_MASK_ISA_FMA4_UNSET): New.
+       (OPTION_MASK_ISA_SSE4A_UNSET): Change definition to depend on FMA4.
+       (OPTION_MASK_ISA_AVX_UNSET): Change definition to depend on FMA4.
        (ix86_handle_option): Handle -mfma4.
        (isa_opts): Handle -mfma4.
        (enum pta_flags): Add PTA_FMA4.
-       (override_options): Add FMA4 support.   
+       (override_options): Add FMA4 support.
        (IX86_BUILTIN_VFMADDSS): New for FMA4 intrinsic.
        (IX86_BUILTIN_VFMADDSD): Ditto.
        (IX86_BUILTIN_VFMADDPS): Ditto.
 2009-09-29  Steve Ellcey  <sje@cup.hp.com>
            Alexander Monakov  <amonakov@ispras.ru>
 
-       PR target/41365 
+       PR target/41365
        * config/ia64/predicates.md (not_postinc_destination_operand): New.
        (not_postinc_memory_operand): New.
        (not_postinc_move_operand): New.
 2009-09-29  Harsha Jagasia  <harsha.jagasia@amd.com>
 
        * config.gcc (i[34567]86-*-*): Remove mmintrin-common.h.
-       (x86_64-*-*): Ditto.    
+       (x86_64-*-*): Ditto.
        * config/i386/smmintrin.h: Move instructions in mmintrin-common.h
        back to smmintrin.h.
        * config/i386/cpuid.h: (bit_SSE5): Remove SSE5 bit.
        * config/i386/x86intrin.h: Remove SSE5.
-       * config/i386/mmintrin-common.h: Delete file.   
-       * doc/extend.texi (x86 intrinsics): Remove SSE5 flags
-       and builtins.
+       * config/i386/mmintrin-common.h: Delete file.
+       * doc/extend.texi (x86 intrinsics): Remove SSE5 flags and builtins.
 
 2009-09-29  Richard Guenther  <rguenther@suse.de>
 
 
 2009-09-28  Sriraman Tallam  <tmsriram@google.com>
 
-       * tree-pass.h (register_pass_info): New structure.      
+       * tree-pass.h (register_pass_info): New structure.
        (pass_positioning_ops): Move enum from gcc-plugin.h.
        (register_pass): New function.
        * gcc-plugin.h (plugin_pass): Delete structure.
        multiple instructions).
        * tree-ssa-dom.c (optimize_stmt): Resolve __builtin_constant_p
        calls into zero at this time.
-       * tree-ssa-propagate.c (substitute_and_fold): Ignore multiple 
+       * tree-ssa-propagate.c (substitute_and_fold): Ignore multiple
        statements generated by builtin folding.
 
 2009-09-28  Nick Clifton  <nickc@redhat.com>