2011-01-26 Han Shen Add a new option "-fstack-protector-strong". * cfgexpand.c (expand_used_vars): Add logic handling stack-protector-strong. (record_or_union_type_has_array): New, tests if a record or union type contains an array. * common.opt (fstack-protector-strong): New option. 2011-07-11 DeLesley Hutchins * cp/gc.class (cp_get_virtual_function_decl.c handle_call_gs): Changes function to return null if the method cannot be found. 2011-06-30 DeLesley Hutchins * tree-threadsafe-analyze.c (handle_call_gs): Fixes case where the virtual method callee has unknown type. 2011-06-27 Doug Kwan Google ref 41164-p2 Backport upstream patch under review. 2011-01-19 NNick Clifton Matthias Klose * configure.ac (gcc_cv_gold_srcdir): New cached variable - contains the location of the gold sources. (ORIGINAL_GOLD_FOR_TARGET): New substituted variable - contains the name of the locally built gold executable. * configure: Regenerate. * collect2.c (main): Detect the -use-gold and -use-ld switches and select the appropriate linker, if found. If a linker cannot be found and collect2 is executing in verbose mode then report the search paths examined. * exec-tool.in: Detect the -use-gold and -use-ld switches and select the appropriate linker, if found. Add support for -v switch. Report problems locating linker executable. * gcc.c (LINK_COMMAND_SPEC): Translate -fuse-ld=gold into -use-gold and -fuse-ld=bfd into -use-ld. * common.opt: Add fuse-ld=gold and fuse-ld=bfd. * opts.c (comman_handle_option): Ignore -fuse-ld=gold and -fuse-ld=bfd. * doc/invoke.texi: Document the new options. 2011-06-23 Sharad Singhai * gcc/doc/invoke.texi: Document new pmu profile related options. * gcc/doc/gcov.texi: Document new options -m and -q. * gcc/gcc.c: Link libgcov for -fpmu-profile-generate option. * gcc/gcov.c (filter_pmu_data_lines): New function. (output_pmu_data_header): Ditto. (output_pmu_data): Ditto. (output_load_latency_line): Ditto. (output_branch_mispredict_line): Ditto. (static void process_pmu_profile): Ditto. * gcc/gcov-io.c (gcov_canonical_filename): New function. (gcov_read_pmu_load_latency_info): Ditto. (gcov_read_pmu_branch_mispredict_info): Ditto. (gcov_read_pmu_tool_header): Ditto. (gcov_string_length): Ditto. (convert_unsigned_to_pct): Ditto. (print_load_latency_line): Ditto. (print_branch_mispredict_line): Ditto. (print_pmu_tool_header): Ditto. (destroy_pmu_tool_header): Ditto. (gcov_read_string): Make it unconditionally available. * gcc/gcov-io.h (struct gcov_pmu_info): New structure. * gcc/opts.c: New option -fpmu-profile-generate. * gcc/pmu-profile.c (enum pmu_tool_type): New structure. (enum pmu_event_type): Ditto. (enum pmu_state): Ditto. (enum cpu_vendor_signature): Ditto. (struct pmu_tool_info): Ditto. (get_x86cpu_vendor): New function. (parse_pmu_profile_options): Ditto. (start_addr2line_symbolizer): Ditto. (reset_symbolizer_parent_pipes): Ditto. (reset_symbolizer_child_pipes): Ditto. (end_addr2line_symbolizer): Ditto. (symbolize_addr2line): Ditto. (start_pfmon_module): Ditto. (convert_pct_to_unsigned): Ditto. (parse_load_latency_line): Ditto. (parse_branch_mispredict_line): Ditto. (destroy_load_latency_infos): Ditto. (destroy_branch_mispredict_infos): Ditto. (parse_pfmon_load_latency): Ditto. (parse_pfmon_tool_header): Ditto. (parse_pfmon_branch_mispredicts): Ditto. (pmu_start): Ditto. (init_pmu_load_latency): Ditto. (init_pmu_branch_mispredict): Ditto. (init_pmu_tool): Ditto. (__gcov_init_pmu_profiler): Ditto. (__gcov_start_pmu_profiler): Ditto. (__gcov_stop_pmu_profiler): Ditto. (gcov_write_ll_line): Ditto. (gcov_write_branch_mispredict_line): Ditto. (gcov_write_load_latency_infos): Ditto. (gcov_write_branch_mispredict_infos): Ditto. (gcov_tag_pmu_tool_header_length): Ditto. (gcov_write_tool_header): Ditto. (__gcov_end_pmu_profiler): Ditto. * gcc/coverage.c (get_const_string_type): New function. (create_coverage): Do the coverage processing even if only flag_pmu_profile_generate is specified. (coverage_init): Call gimple_init_instrumentation_sampling from here instead from tree-profile.c:gimple_init_edge_profiler. (profiling_enabled_p): New function. (init_pmu_profiling): Ditto. (check_pmu_profile_options): Ditto. * gcc/coverage.h (check_pmu_profile_options): Declaration. (tree_init_instrumentation_sampling): Declaration. * gcc/common.opt: Add new options -fpmu-profile-generate and -fpmu-profile-use. * gcc/tree-profile.c (gimple_init_instrumentation_sampling): Make extern. Move the call from gimple_init_edge_profiler to coverage.c:coverage_init. * gcc/libgcov.c (gcov_alloc_filename) [__GCOV_KERNEL__]: Moved earlier. (gcov_alloc_filename) [!__GCOV_KERNEL__]: Initialize gi_filename_up. (pmu_profile_stop): New function. (gcov_dump_module_info): Replace gcov_strip_leading_dirs with a macro. (__gcov_init): Add initialization of PMU profiler. (gcov_exit): Add finalization of PMU profiler. (gcov_get_filename): Cleanup whitespaces. * gcc/params.def: New parameter pmu_profile_n_addresses. * gcc/gcov-dump.c (tag_pmu_load_latency_info): New function. (tag_pmu_branch_mispredict_info): Ditto. (tag_pmu_tool_header): Ditto. 2011-06-22 Rong Xu * gcc/libgcov.c: (TARGET_VTABLE_USES_DESCRIPTORS): Remove. 2011-06-21 Diego Novillo Merge from google/integration rev 175221. 2011-06-16 Sharad Singhai Google Ref 39999 * doc/gcov.texi: Document gcov intermediate format. * gcov.c (get_gcov_file_intermediate_name): New function. (output_intermediate_file): New function. 2011-06-14 Le-Chun Wu * tree-threadsafe-analyze.c (build_fully_qualified_lock): Handle IPA-SRA cloned methods. (get_canonical_lock_expr): Fold expressions that are INDIRECT_REF on top of ADDR_EXPR. (check_lock_required): Handle IPA-SRA cloned methods. (check_func_lock_excluded): Likewise. (process_function_attrs): Likewise. 2011-06-10 David Li Backport 174930 * cgraphunit.c (cgraph_finalize_compilation_unit): Pass dump. * passes.c (passr_eq): New function. (create_pass_tab): New function. (pass_traverse): New function. (dump_one_pass): New function. (dump_pass_list): New function. (dump_passes): New function. 2011-06-14 David Li * cp/semantics.c (emit_associated_thunks): Do not omit thunk emission for aux modules. 2011-06-10 Rong Xu * gcc/tree-ssa-loop-im.c (maxmimu_lsm): New define. (find_refs_for_sm): Limit excessive lsm. * gcc/gcse.c (cfgloop.h): New include. (maximum_lsm_limit): New define. (struct loop_lsm_limit_map): Ditto. (loop_lsm_limit_map_htab): Ditto. (loops_lsm): Ditto. (dominator_info_avail_before_lsm_limit): Ditto. (compute_ld_motion_mems): Limit execssive lsm. (find_loop_lsm_limit): New functions. (adjust_loop_lsm_limit): Ditto. (init_loop_lsm_limit): Ditto. (fini_loop_lsm_limit): Ditto. (estimate_reg_pressure_before_lsm): Ditto. (loop_lsm_limit_map_hash): Ditto. (loop_lsm_limit_map_eq): Ditto. (free_loop_lsm_limit_map): Ditto. 2011-06-09 Chris Demetriou * doc/install.texi (--with-warn-frame-larger-than-extra-text): New. * configure.ac (--with-warn-frame-larger-than-extra-text): New. (WARN_FRAME_LARGER_THAN_EXTRA_TEXT): Define. * final.c (final_start_function): Use WARN_FRAME_LARGER_THAN_EXTRA_TEXT. * configure: Regenerate. * config.in: Regenerate. 2011-06-09 David Li Revert temporarily * gcse.c (gate_rtl_cprop): Gate cleanup (execute_rtl_cprop): Gate cleanup 2011-06-09 David Li Revert temporarily Backport trunk 174849 * cgraphunit.c (cgraph_finalize_compilation_unit): Pass dump. * passes.c (passr_eq): New function. (create_pass_tab): New function. (pass_traverse): New function. (dump_one_pass): New function. (dump_pass_list): New function. (dump_passes): New function. 2011-06-09 David Li * gcse.c (gate_rtl_cprop): Gate cleanup (execute_rtl_cprop): Gate cleanup 2011-06-09 David Li Backport trunk 174849 * cgraphunit.c (cgraph_finalize_compilation_unit): Pass dump. * passes.c (passr_eq): New function. (create_pass_tab): New function. (pass_traverse): New function. (dump_one_pass): New function. (dump_pass_list): New function. (dump_passes): New function. 2011-06-09 David Li Backport trunk 174848 * tree-complex.c (tree_lower_complex): Gate cleanup. * tree-stdarg.c (check_all_va_list_escapes): Ditto. (execute_optimize_stdarg): Ditto. * tree-eh.c (execute_lower_eh_dispatch): Ditto. (execute_cleanup_eh_1): Ditto. (execute_cleanup_eh): Ditto. * gcse.c (gate_rtl_pre): Ditto. (execute_rtl_pre): Ditto. * except.c (finish_eh_generation): Ditto. (convert_to_eh_region_ranges): Ditto. * cprop.c (one_cprop_pass): Ditto. 2011-06-08 Sriraman Tallam * doc/invoke.texi: document option -fcallgraph-profiles-sections. * final.c (dump_cgraph_profiles): New function. (rest_of_handle_final): Create new section '.note.callgraph.text' with compiler flag -fcallgraph-profiles-sections * common.opt: New option -fcallgraph-profiles-sections. * params.def (DEFPARAM): New param PARAM_NOTE_CGRAPH_SECTION_EDGE_THRESHOLD. 2011-06-07 Mark Heffernan * cgraph.h (cgraph_global_info): Remove field. * ipa-inline.c (cgraph_clone_inlined_nodes): Change stack frame computation. (cgraph_check_inline_limits): Change stack frame computation. (compute_inline_parameters): Remove dead initialization. 2011-06-07 David Li * tree-pretty-print.c (revision 174779) (dump_function_header): dump module id. 2011-06-07 David Li Backport trunk r174536,174537,174762,174698 * passes.c (enable_disable_pass): Handle assembler name. (is_pass_explicitly_enabled_or_disabled): Ditto. * predict.c : Change pass name * ipa.c: Ditto. * dce.c: Ditto. * tree-profile.c: Ditto. * except.c: Ditto. * tree-pretty-print.c (dump_function_header): New function. * final.c (rest_of_clean_state): Use header dumper. * tree-cfg.c (gimple_dump_cfg): Use header dumper. * passes.c (pass_init_dump_file): Use header dumper. * tree-pretty-print.c (dump_function_header): Add flags. Don't dump decl_uid with nouid. * tree-pretty-print.h (dump_function_header): Adjust. * final.c (rest_of_clean_state): Pass dump_flags on, with nouid. * passes.c (pass_init_dump_file): Pass dump_flags on. * tree-cfg.c (gimple_dump_cfg): Pass flags on. 2011-06-06 Diego Novillo Merge from google/integration rev 174705. 2011-06-02 Neil Vachharajani Dehao Chen * gcc/doc/invoke.texi (min-mcf-cancel-iters): Document. * gcc/mcf.c (MAX_ITER): Use new param PARAM_MIN_MCF_CANCEL_ITERS. (edge_type): Add SINK_SOURCE_EDGE. (dump_fixup_edge): Handle SINK_SOURCE_EDGE. (create_fixup_graph): Make problem miminum cost circulation. (cancel_negative_cycle): Update handling of infinite capacity. (compute_residual_flow): Update handling of infinite capacity. (find_max_flow): Update handling of infinite capacity. (modify_sink_source_capacity): New function. (find_minimum_cost_flow): Make problem miminum cost circulation. Use param PARAM_MIN_MCF_CANCEL_ITERS. * gcc/params.def (PARAM_MIN_MCF_CANCEL_ITERS): Define. 2011-05-30 Xinliang David Li Backport trunk r174423, r174424 * opts-global.c (handle_common_deferred_options): Handle new options. * passes.c (register_one_dump_file): Call register_pass_name. (execute_one_pass): Check explicit enable/disable flag. (passr_hash): New function. (passr_eq): Ditto. (register_pass_name): Ditto. (get_pass_by_name): Ditto. (pass_hash): Ditto. (pass_eq): Ditto. (enable_pass): Ditto. (disable_pass): Ditto. (is_pass_explicitly_enabled_or_disabled): Ditto. 2011-05-30 David Li * cgraphunit.c (cgraph_optimize): Remove call to static promotion funciton. * cp/decl2.c (cp_process_pending_declarations): Do not remove body of __static_init functions for aux modules. * ipa-inline.c (leaf_node_p): Filter indirect callsite to make sure profile gen and profile use consistency (cgraph_decide_inlining_incrementally): Remove LIPO specific inline rule used to workaround size estimation problem for static functions. * tree-profile.c (tree_profiling): Do static promotion here. * l-ipo.c (cgraph_is_aux_decl_external): Handle non-promoted static function. (create_unique_name): New function. (promote_static_var_func): Do not promote non addr taken statics. 2011-05-23 Rong Xu * gcc/libgcov.c (gcov_merge_gcda_file): initialize eof_pos for every invocation. 2011-05-21 David Li * function.h: Give funcdef_no 18 bits in label name. 2011-05-18 Mark Heffernan * opts.c (finish_options): Increase inlining limits with profile generate and use. 2011-05-17 Mark Heffernan * ipa-inline.c (estimate_function_body_sizes): Parameterize static function static overhead. * params.def (PARAM_INLINE_FUNCTION_OVERHEAD_SIZE): New parameter. 2011-05-12 Rong Xu * gcc/coverage.c (coverage_note_define): set is_kernel_build if building for Linux kernel. * gcc/tree-profile.c (is_kernel_build): New declare. (init_ic_make_global_vars): don't emit TLS declarations for Linux kernel builds. (direct_call_profiling): Ditto. * gcc/gcov-io.h (__GCOV_KERNEL__): Set if __KERNEL__ is defined. (BTIS_PER_UNIT): Set the vaule under __GCOV_KERNEL__. (LONG_LONG_TYPE_SIZE): Ditto. (_GCOV_FILE, _GCOV_fclose, _GCOV_ftell, _GCOV_fseek, _GCOV_ftruncate, _GCOV_fread, _GCOV_fwrite, _GCOV_fread, _GCOV_fileno): Wrapper macros. (gcov_kernel_vfile): New type declare under __GCOV_KERNEL__. (gcc_assert): New function under __GCOV_KERNEL__. (gcov_var): Move the definition to gcov-io.c under __GCOV_KERNEL__. (gcov_rewrite): Change fseek to _GCOV_fseek. * gcc/gcov-io.c (gcov_var): Add declare under __GCOV_KERNEL__. (gcov_open): New implementation under __GCOV_KERNEL__. (gcov_sync): Ditto. (gcov_truncate): Ditto. (gcov_close): Replace calls to libc functions to macros. (gcov_write_block): Ditto. (gcov_read_words): Ditto. (gcov_sync): Ditto. (gcov_seek): Ditto. (kernel_file_fclose): New functions under __GCOV_KERNEL__. (kernel_file_ftell): Ditto. (kernel_file_fseek): Ditto. (kernel_file_ftruncate): Ditto. (kernel_file_fread): Ditto. (kernel_file_fwrite): Ditto. (kernel_file_fileno): Ditto. * gcc/libgcov.c (L_gcov, L_gcov_interval_profiler, L_gcov_pow2_profiler, L_gcov_one_value_profiler, L_gcov_indirect_call_profiler, L_gcov_average_profiler, L_gcov_ior_profiler, TARGET_VTABLE_USES_DESCRIPTORS, HAVE_CC_TLS, __GCOV_KERNEL__, IN_LIBGCOV, IN_GCOV): Set the value under __KERNEL__ for Linux kernel FDO build support. (tconfig.h, tsystem.h, coretypes.h, tm.h): Do not inlude for kernel builds (i.e. include under #ifndef __KERNELL__). (string.h, fcntl.h, errno,h, sys/stat.h) Ditto. (gcov_error): New function for error reporting. (all, this_program, this_object, program, object, summary_pos, eof_pos, gcov_prefix_strip, prefix_length gi_filename, gi_filename_up): New declares. (gcov_exit): Refactored. (gcov_open_by_filename): New function. (gcov_counter_active): Ditto. (gcov_alloc_filename): Ditto. (gcov_dump_module_info): Ditto. (gcov_counter_array): Ditto. (gcov_object_summary): Ditto. (gcov_merge_gcda_file): Ditto. (gcov_compute_fi_stride): Ditto. (gcov_gcda_file_size): Ditto. (gcov_write_gcda_file): Ditto. (gcov_exit_init): Ditto. (gcov_dump_one_gcov): Ditto. (gcov_get_filename): New implementation under __GCOV_KERNEL__. (gcov_sort_icall_topn_counter): Ditto. (gcov_alloc_filename): Ditto. (gcov_current_file): Ditto. (gcov_set_vfile): Ditto. (gcov_kernel_dump_one_gcov): Ditto. (__gcov_merge_add): New dummy functions under __GCOV_KERNEL__. (__gcov_merge_single): Ditto. (__gcov_merge_delta): Ditto. (__gcov_merge_ior): Ditto. (__gcov_merge_icall_topn): Ditto. (__gcov_merge_dc): Ditto. (__gcov_merge_reusedist): Ditto. (__gcov_merge_add): Export kernel symbol under __GCOV_KERNEL__. (__gcov_merge_single): Ditto. (__gcov_merge_delta): Ditto. (__gcov_merge_ior): Ditto. (__gcov_merge_icall_topn): Ditto. (__gcov_merge_dc): Ditto. (__gcov_merge_reusedist): Ditto. (__gcov_average_profiler): Ditto. (__gcov_indirect_call_profiler): Ditto. (__gcov_interval_profiler): Ditto. (__gcov_ior_profiler): Ditto. (__gcov_one_value_profiler): Ditto. (__gcov_pow2_profiler): Ditto. 2011-05-10 David Li * cgraphunit.c (verify_cgraph_node): Disable checking in LIPO mode temporarily. (cgraph_mark_functions_to_output): Ditto. * tree-cfg.c (verify_stmt): Ditto. 2011-05-06 David Li Revert r173158. * doc/invoke.texi (fno-strict-enum-precision): Document. * gimplify.c (gimplify_switch_expr): If -fno-strict-enum-precision is given, do not consider enum types. * tree-vrp.c (stmt_interesting_for_vrp): If -fno-strict-enum-precision is given, do not look at enum types. 2011-05-09 Silvius Rus * value-prof.c (interesting_stringop_to_profile_p): Disbale stringop profiling if reuse distance profiling is turned on. * value-prof.h (gimple_gen_reusedist, optimize_reusedist): Declare. * gcov-io.h: (GCOV_COUNTER_REUSE_DIST): New counter. (GCOV_COUNTERS): Update. (GCOV_COUNTER_NAMES): Add reuse_distance. (GCOV_MERGE_FUNCTIONS): Add __gcov_merge_reusedist. (__gcov_merge_reusedist): New declaration. * profile.c (branch_prob): Enable reuse distance profiling and optimization. * common.opt (fprofile-reusedist, foptimize-locality): New options. * tree-profile.c: Include params.h. (stringop_subst, reusedist_t): New structures. (stringop_subst_t, reusedist_t): New typedefs. (stringop_decl): New global array. (RD_NUM_COUNTERS): New constant. (get_stringop_subst, reusedist_is_interesting_call) (reusedist_instr_func_name, reusedist_get_instr_decl) (reusedist_make_instr_call, reusedist_from_counters) (gimple_gen_reusedist, nt_op_name, reusedist_get_size_threshold) (reusedist_get_distance_large_threshold) (reusedist_get_distance_small_threshold) (reusedist_get_count_threshold, reusedist_nt_is_worth_it) (reusedist_get_nt_decl, maybe_issue_profile_use_note) (reusedist_maybe_replace_with_nt_version, optimize_reusedist): New functions. (gate_tree_profile_ipa): Return true if reuse distance instrumentation or use is turned on. * Makefile.in (LIBGCOV): Add _gcov_merge_reusedist. * libgcov.c (__gcov_weighted_mean2, __gcov_merge_reusedist): New functions. * params.def (PARAM_REUSEDIST_MEAN_DIST_LARGE_THRESH) (PARAM_REUSEDIST_MEAN_DIST_SMALL_THRESH) (PARAM_REUSEDIST_CALL_COUNT_THRESH, PARAM_REUSEDIST_MEMCPY_SIZE_THRESH) (PARAM_REUSEDIST_MEMSET_SIZE_THRESH): New params. 2011-05-06 Lawrence Crowl * timevar.h (timevar_cond_start): Remove unused POP_TIMEVAR_AND_RETURN. (timevar_cond_start): New for starting a timer only when it is not already running. (timevar_cond_stop): New for stopping a timer when it was not already running. * timevar.c (timevar_stop): Enable start/stop timers to start again. (timevar_cond_start): New as above. (timevar_cond_stop): New as above. * timevar.def: Add start/stop timers for compiler phases, TV_PHASE_SETUP, TV_PHASE_PARSING, TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO (C), TV_PHASE_CHECK_DBGINFO (C++), TV_PHASE_GENERATE, and TV_PHASE_FINALIZE. Change push/pop timer TV_PARSE to TV_PARSE_GLOBAL. Add push/pop timers TV_PARSE_STRUCT, TV_PARSE_ENUM, TV_PARSE_FUNC, TV_PARSE_INLINE, TV_PARSE_INMETH, TV_TEMPLATE_INST. Change push/pop timer TV_NAME_LOOKUP into a start/stop timer. Make unused TV_OVERLOAD into a start/stop timer. Remove unused timers TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION. Mark the strings for TV_NAME_LOOKUP and TV_OVERLOAD with a "|" to indicate that they are start/stop timers. * toplev.c (compile_file): Change TV_PARSE to TV_PARSE_GLOBAL. Add start/stop timers TV_PHASE_PARSING and TV_PHASE_GENERATE. Move initialization to do_compile. (do_compile): Add initialization from above. Add start/stop timers TV_PHASE_SETUP and TV_PHASE_FINALIZE. * c-decl.c (c_write_global_declarations): Add start/stop of TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO. * c-parser.c (c_parser_declaration_or_fndef): Push/pop TV_PARSE_FUNC or TV_PARSE_INLINE, as appropriate. (c_parser_enum_specifier): Push/pop TV_PARSE_ENUM. (c_parser_struct_or_union_specifier): Push/pop TV_PARSE_STRUCT. 2011-05-06 Easwaran Raman Backport r172837: * cfgexpand.c (stack_var): Remove OFFSET... (add_stack_var): ...and its reference here... (expand_stack_vars): ...and here. (stack_var_cmp): Sort by descending order of size. (partition_stack_vars): Change heuristic. (union_stack_vars): Fix to reflect changes in partition_stack_vars. (dump_stack_var_partition): Add newline after each partition. 2011-05-06 Easwaran Raman Backport r172788: * cfgexpand.c (add_alias_set_conflicts): Add conflicts with a variable containing union type only with -fstrict-aliasing. 2011-05-04 David Li * coverage.c (incompatible_cl_args): Better handling of option mismatch. 2011-05-04 Sriraman Tallam * tree-pass.h (pass_tree_convert_builtin_dispatch): New pass. (pass_ipa_multiversion_dispatch): New pass. * builtin-types.def (BT_PTR_FN_INT): New pointer type. (BT_FN_INT_PTR_FN_INT_PTR_PTR_VAR): New function type for __builtin_dispatch. * builtins.def (BUILT_IN_DISPATCH): New builtin to support multi-version calls. * mversn-dispatch.c: New file. * timevar.def (TV_MVERSN_DISPATCH): New time var. * common.opt (fclone-hot-version-paths): New flag. * Makefile.in (mversn-dispatch.o): New rule. * passes.c (init_optimization_passes): Add the new multi-version and dispatch passes to the pass list. * params.def (PARAM_NUMBER_OF_MVERSN_CLONES): Define. (PARAM_MVERSN_CLONE_CGRAPH_DEPTH): Define. * doc/invoke.texi (mversn-clone-depth): Document. (num-mversn-clones): Document. (fclone-hot-version-paths): Document. 2011-05-04 Silvius Rus * doc/invoke.texi: Document -fprofile-generate-sampling option. * gcov-io.h (__gcov_set_sampling_rate): New declaration. * profile.c (branch_prob): Add support for sampled profile collection. * profile.h (add_sampling_to_edge_counters): New declaration. * common.opt (fprofile-generate-sampling): New option. * tree-profile: Include header files; define EDGE_COUNTER_STMT_COUNT. (instrumentation_to_be_sampled, gcov_sample_counter_decl) (gcov_sampling_rate_decl): New globals. (insert_if_then, add_sampling_wrapper, is_instrumentation_to_be_sampled) (add_sampling_to_edge_counters, gimple_init_instrumentation_sampling): New functions. (gimple_init_edge_profiler): Call gimple_init_instrumentation_sampling. (gimple_gen_edge_profiler): Mark start of instrumentation block. * libgcov.c (__gcov_sampling_rate): New extern declaration. (gcov_sampling_rate_initialized, __gcov_sample_counter): New globals. (gcov_exit): Set sampling rate; minor coding style fixes. (__gcov_init): Initialize __gcov_sampling_rate. * params.def (PARAM_PROFILE_GENERATE_SAMPLING_RATE): New parameter. 2011-05-03 David Li Backport r173177: * tree-profile.c (init_ic_make_global_vars): Set tls attribute on ic vars. * coverage.c (coverage_end_function): Initialize function_list with zero. 2011-05-03 David Li Backport r173147: * tree.c (crc32_string): Use crc32_byte. (crc32_byte): New function. * tree.h (crc32_byte): New function. * gcov.c (read_graph_file): Handle new cfg_cksum. (read_count_file): Ditto. * profile.c (instrument_values): Ditto. (get_exec_counts): Ditto. (read_profile_edge_counts): Ditto. (compute_branch_probabilities): Ditto. (compute_value_histograms): Ditto. (branch_prob): Ditto. (end_branch_prob): Ditto. * coverage.c (read_counts_file): Ditto. (get_coverage_counts): Ditto. (tree_coverage_counter_addr): Ditto. (coverage_checksum_string): Ditto. (coverage_begin_output): Ditto. (coverage_end_function): Ditto. (build_fn_info_type): Ditto. (build_fn_info_value): Ditto. * libgcov.c (gcov_exit): Ditto. * gcov-dump.c (tag_function): Ditto. (compute_checksum): Remove. 2011-05-03 David Li * l-ipo.c (promote_static_var_or_func): Keep initializer for externalized aux module variables. (process_module_scope_static_var): Keep initializer for promoted static vars to allow ccp. 2011-05-02 Sriraman Tallam Revert : 2011-05-02 Sriraman Tallam * c-family/c-common.c (revision 173122) (handle_version_selector_attribute): New function. (c_common_attribute_table): New attribute "version_selector". * tree-pass.h (revision 173122) (pass_tree_convert_builtin_dispatch): New pass. (pass_ipa_multiversion_dispatch): New pass. * testsuite/gcc.dg/mversn7.c (revision 0): New test case. * testsuite/gcc.dg/mversn4.c (revision 0): New test case. * testsuite/gcc.dg/mversn4.h (revision 0): New test case. * testsuite/gcc.dg/mversn4a.c (revision 0): New test case. * testsuite/gcc.dg/torture/mversn1.c (revision 0): New test case. * testsuite/gcc.dg/mversn2.c (revision 0): New test case. * testsuite/gcc.dg/mversn6.c (revision 0): New test case. * testsuite/gcc.dg/mversn3.c (revision 0): New test case. * testsuite/g++.dg/mversn8.C (revision 0): New test case. * testsuite/g++.dg/mversn10a.C (revision 0): New test case. * testsuite/g++.dg/mversn14a.C (revision 0): New test case. * testsuite/g++.dg/tree-prof/mversn13.C (revision 0): New test case. * testsuite/g++.dg/tree-prof/mversn15.C (revision 0): New test case. * testsuite/g++.dg/tree-prof/mversn15a.C (revision 0): New test case. * testsuite/g++.dg/mversn9.C (revision 0): New test case. * testsuite/g++.dg/mversn10.C (revision 0): New test case. * testsuite/g++.dg/mversn12.C (revision 0): New test case. * testsuite/g++.dg/mversn14.C (revision 0): New test case. * testsuite/g++.dg/mversn16.C (revision 0): New test case. * testsuite/g++.dg/torture/mversn11.C (revision 0): New test case. * testsuite/g++.dg/torture/mversn5.C (revision 0): New test case. * testsuite/g++.dg/torture/mversn5.h (revision 0): New test case. * testsuite/g++.dg/torture/mversn5a.C (revision 0): New test case. * builtin-types.def (revision 173122) (BT_PTR_FN_INT): New pointer type. (BT_FN_INT_PTR_FN_INT_PTR_PTR_VAR): New function type for __builtin_dispatch. * builtins.def (revision 173122) (BUILT_IN_DISPATCH): New builtin to support multi-version calls. * mversn-dispatch.c (revision 0): New file. * timevar.def (revision 173122) (TV_MVERSN_DISPATCH): New time var. * common.opt (revision 173122) (fclone-hot-version-paths): New flag. * Makefile.in (revision 173122) (mversn-dispatch.o): New rule. * passes.c (revision 173122) (init_optimization_passes): Add the new multi-version and dispatch passes to the pass list. * params.def (revision 173122) (PARAM_NUMBER_OF_MVERSN_CLONES): Define. (PARAM_MVERSN_CLONE_CGRAPH_DEPTH): Define. * doc/invoke.texi (revision 173122) (mversn-clone-depth): Document. (num-mversn-clones): Document. (fclone-hot-version-paths): Document. 2011-05-02 Diego Novillo Merge from google/integration rev 173255. 2011-05-02 Chris Demetriou * config/i386/i386.c (get_pc_thunk_name): Make 32-bit thunk prefix be __x86.get_pc_thunk. 2011-05-01 David Li * l-ipo.c (clear_module_scope_bindings): Clear name binding for assembler name. (pop_module_scope): Clear name bindings for the last module. (lipo_cmp_type): Handle template arg type. 2011-04-30 Guozhi Wei PR target/43129 * hooks.c (hook_rtx_void_null): New function. * hooks.h (hook_rtx_void_null): New prototype. * target.def (got_access): New hook vector declaration. * tree-pass.h (pass_simplify_got): New pass. * timevar.def (TV_SIMPLIFY_GOT): New TV id. * simplify-got.c: New source file. * Makefile.in (simplify-got.o): Add a new file. * passes.c (init_optimization_passes): Add a new pass. * config/arm/arm.c (arm_output_addr_const_extra): Output GOT_PREL relocation. (arm_get_pic_reg): New function. (arm_clear_pic_reg): New function. (arm_can_simplify_got_access): New function. (arm_loaded_global_var): New function. (arm_load_global_address): New function. * config/arm/arm.md (UNSPEC_GOT_PREL_SYM): New UNSPEC symbol. 2011-04-29 Cary Coutant * common.opt (generate_debug_line_table): New global var. (gmlt): New option * dwarf2out.c (GENERATE_MINIMUM_LINE_TABLE): New macro. (add_pubname_string): Test for -gmlt. (add_pubname): Likewise. (add_src_coords_attributes): Likewise. (decls_for_scope): Likewise. (dwarf2out_source_line): Likewise. (dwarf2out_finish): Likewise. * opts.c (finish_options): Force debug info to at least level 1 if -gmlt specified. (common_handle_option): Add OPT_gmlt. (set_debug_level): Set generate_debug_line_table flag. * tree-ssa-live.c (remove_unused_scope_block_p): Test for -gmlt. * doc/invoke.texi (-gmlt): New options 2011-04-29 Cary Coutant * basic-block.h (struct basic_block_def): Remove discriminator field. * cfghooks.c (split_block): Remove discriminator field. * cfglayout.c (insn_discriminator): New function. * final.c (discriminator): Remove. (override_discriminator): New file-scope variable. (final_start_function): Remove tracking of discriminator by basic block. (final_scan_insn): Track discriminator by instruction. (notice_source_line): Check for discriminator override. Get discriminator from instruction. * gimple-pretty-print.c (dump_gimple_stmt): Print discriminator. (dump_bb_header): Don't print discriminator. * input.c: Include vecprim.h. (discriminator_location_locations): New variable. (discriminator_location_discriminators): New variable. (min_discriminator_location): New variable. (expand_location): Use map_discriminator_location. (location_with_discriminator): New function. (has_discriminator): New function. (map_discriminator_location): New function. (get_discriminator_from_locus): New function. * input.h (location_with_discriminator): New function. (has_discriminator): New function. (map_discriminator_location): New function. (get_discriminator_from_locus): New function. * print-rtl.c (print_rtx): Print discriminator. * rtl.h (insn_discriminator): New function. * tree-cfg.c: Include input.h. (assign_discriminator): Assign discriminators to instructions rather than to the basic block. * tree-pretty-print.c (dump_location): Print discriminator. 2011-04-28 Sharad Singhai * params.def: Add new parameters to control peeling. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Use different peeling parameters when profile feedback is available. * loop-unroll.c (decide_peel_once_rolling): Ditto. (decide_peel_completely): Ditto. * doc/invoke.texi: Document new peeling parameters. 2011-04-28 Sharad Singhai Google Ref 40087 * opts.c (common_handle_option): Disable -ftracer for profile use. * doc/invoke.texi: Update doc that -ftracer is no longer enabled for FDO. 2011-04-28 Xinliang David Li * final.c (profile_function): Use FUNC_LABEL_ID. * dwarf2out.c (dwarf2out_vms_end_prologue): Ditto. (dwarf2out_vms_begin_epilogue): Ditto. (dwarf2out_vms_debug_main_pointer): Ditto. * cgraphunit.c (cgraph_finalize_compilation_unit): Remove eq type alias set computation. * tree-profile.c (gimple_gen_ic_func_topn_profiler): Do not skip any functions. (tree_profiling): Add type alias merging. * l-ipo.c (restore_post_parsing_states): Use max funcdef_no. (pop_module_scope): Use max funcdef_no. * gcov-dump.c (tag_function): Fix a bug in function read. 2011-04-27 Xinliang David Li * value-prof.c (init_node_map): Disable for lipo mode. (del_node_map): Disable for lipo mode. 2011-04-27 Le-Chun Wu Google ref 42718. * doc/extend.texi (Wnonnull): Add documentation for C++. * doc/invoke.texi (Wnonnull): Add documentation for C++. 2011-04-27 Le-Chun Wu * opts.c (common_handle_option): Do not enable Wshadow-local nor Wshadow-compatible-local if Wshadow is disabled. 2011-04-27 Le-Chun Wu Google ref 39127. * c-decl.c (warn_if_shadowing): Use the warning code corresponding to the given -Wshadow- variant. * common.opt (Wshadow-local): New option. (Wshadow-compatible-local): New option. * invoke.texi: Document Wshadow-local and Wshadow-compatible-local. * opts.c (common_handle_option): Handle OPT_Wshadow and OPT_Wshadow_local. 2011-04-27 Silvius Rus Google ref 39984. * doc/invoke.texi (fno-strict-enum-precision): Document. * gimplify.c (gimplify_switch_expr): If -fno-strict-enum-precision is given, do not consider enum types. * tree-vrp.c (stmt_interesting_for_vrp): If -fno-strict-enum-precision is given, do not look at enum types. 2011-04-26 Xinliang David Li * tree-ssa-uninit.c (warn_uninitialized_phi): Pass warning code. * opts.c (common_handle_option): Ditto. * common.opt: New option. * tree-ssa.c (warn_uninit): Add one more parameter. (warn_uninitialized_var): Pass warning code. * tree-flow.h: Interface change. 2011-04-26 Xinliang David Li * toplev.c (process_options): Enable -Werror=coverage-mismatch by default when -Wno-error is not specified. * opts-global.c (decode_options): Remove call to control_warning_options. 2011-04-26 Xinliang David Li * cgraph.h: Remove pid. * cgraph.c: Remove pid. * value-prof.c (init_node_map): New function. (del_node_map): New function. (find_func_by_funcdef_no): New function. (gimple_ic_transform): Call new function. * cgraphunit.c (cgraph_finalize_function): Remove pid. * function.c (get_last_funcdef_no): New function. * function.h (get_last_funcdef_no): New function. * tree-profile.c (gimple_gen_ic_func_profiler): Pass funcdef_no to libgcov function. (tree-profiling): Call node map init and delete function. 2011-04-26 Le-Chun Wu * common.opt: New option. * doc/invoke.texi: Documentation for new options. * fold-const.c (operand_equal_p): Allow operands without typres to compare. (fold_unary_loc_1): Renamed from fold_unary_loc. (fold_unary_loc): New wrapper function. (fold_binary_loc_1): Renamed from fold_binary_loc. (fold_binary_loc): New wrapper function. (fold_ternary_loc_1): Renamed from fold_ternary_loc. (fold_ternary_loc): New wrapper function. * tree.h (struct tree_base): New flag for folded expr. (enum operand_equal_flag): New flags. 2011-04-25 David Li * cgraphbuild.c (rebuild_cgraph_edges): Create edges based using resolved nodes in LIPO mode after ipa_tree_profiling. * dyn-ipa.c: New file. * dbgcnt.def: New debug counters. * cgraph.c (cgraph_mark_reachable_node): Handle aux module nodes. (cgraph_clone_node): New field initialization. (cgraph_create_virtual_clone): New field initialization. * value-prof.c (dump_histogram_value): New hist kind. (check_counter): New function. (gimple_value_profile_transformations): New ic kind. (gimple_ic_transform): Changed interface. (gimple_indirect_call_to_profile): New vpt kind. (gimple_find_values_to_profile): New vpt kind. * cgraphunit.c (cgraph_finalize_function): Handle LIPO mode. (verify_edge_count_and_frequency): Ditto. (verify_cgraph_node): Ditto. (cgraph_finalize_compilation_unit): Ditto. (cgraph_mark_functions_to_output): Ditto. (cgraph_expand_function): Ditto. (cgraph_output_in_order): Ditto. (cgraph_optimize): Ditto. (cgraph_copy_node_for_versioning): Ditto. (cgraph_materialize_clone): Ditto. (cgraph_redirect_edge_call_stmt_to_callee): Ditto. * gcov-io.c (gcov_read_summary): Ditto. * tree-ssa-alias.c (same_type_for_tbaa): Ditto. (refs_may_alias_p_1): Ditto. (walk_aliased_vdefs): Ditto. * ipa-inline.c (cgraph_mark_inline_edge): Ditto. (cgraph_recursive_inlining_p): Ditto. (cgraph_edge_badness): Ditto. (update_caller_keys): Ditto. (cgraph_decide_recursive_inlining): Ditto. (cgraph_decide_inlining_of_small_function): Ditto. (cgraph_decide_inlining): Ditto. (cgraph_decide_inlining_incrementally): Ditto. (estimate_function_body_sizes): Ditto. * dwarf2out.c (dwarf2out_do_cfi_startproc): Ditto. (dwarf2out_begin_prologue): Ditto. (dwarf2out_end_epilogue): Ditto. (dw_loc_list): Ditto. (gen_subprogram_die): Ditto. (dwarf2out_source_line): Ditto. * c-decl.c (bind): Ditto. (pop_scope): Ditto. Ditto. (push_file_scope): Ditto. (pop_file_scope): Ditto. (finish_decl): Ditto. (c_write_global_declarations): Ditto. * langhooks.c (lhd_do_nothing_f): Ditto. (lhd_do_nothing_t_t_return_null_tree): Ditto. (lhd_return_null_tree_v): Ditto. (lhd_builtin_function): Ditto. * function.c (pop_cfun): Ditto. (allocate_struct_function): Ditto. * profile.c (instrument_values): Ditto. (is_edge_inconsistent): Ditto. * ipa.c (process_references): Ditto. (cgraph_remove_unreachable_nodes): Ditto. (function_and_variable_visibility): * c-typeck.c (tagged_types_tu_compatible_p): Ditto. * gimplify.c (gimplify_addr_expr): Ditto. * except.c (sjlj_emit_function_enter): Ditto. (output_one_function_exception_table): Ditto. * coverage.c (get_gcov_type): Ditto. (htab_counts_entry_del): Ditto. (read_counts_file): Ditto. (get_coverage_counts): Ditto. (coverage_checksum_string): Ditto. (coverage_begin_output): Ditto. (coverage_end_function): Ditto. (build_fn_info_type): Ditto. (build_fn_info_value): Ditto. (build_ctr_info_value): Ditto. (build_gcov_info): Ditto. (create_coverage): Ditto. (coverage_finish): Ditto. * tree-sra.c (convert_callers): Ditto. (modify_function): Ditto. (ipa_early_sra): Ditto. * varasm.c (notice_global_symbol): Ditto. (assemble_external): Ditto. (mark_decl_referenced): Ditto. (find_decl_and_mark_needed): Ditto. (finish_aliases_1): Ditto. (assemble_alias): Ditto. * tree-ssa.c (useless_type_conversion_p): Ditto. * tree-inline.c (copy_bb): Ditto. (copy_edges_for_bb): Ditto. (initialize_cfun): Ditto. (copy_cfg_body): Ditto. (tree_inlinable_function_p): Ditto. (optimize_inline_calls): Ditto. (copy_tree_r): Ditto. * tree-profile.c (init_ic_make_global_vars): Ditto. (gimple_init_edge_profiler): Ditto. (gimple_gen_ic_profiler): Ditto. (gimple_gen_ic_func_profiler): Ditto. (tree_profiling): Ditto. * opts-global.c (lang_handle_option): Ditto. (add_input_filename): Ditto. (read_cmdline_options): Ditto. * l-ipo.c: Ditto. * libgcov.c (gcov_version): Ditto. (gcov_exit): Ditto. (__gcov_init): Ditto. (__gcov_flush): Ditto. (__gcov_merge_ior): Ditto. (__gcov_one_value_profiler_body): Ditto. (__gcov_indirect_call_profiler): Ditto. * l-ipo.h: Ditto. * tree-cfg.c: (verify_types_in_gimple_reference): Ditto. (verify_gimple_call): Ditto. (verify_gimple_assign_single): Ditto. (verify_gimple_return): Ditto. (gimple_verify_flow_info): Ditto. * passes.c: (rest_of_decl_compilation): Ditto. (init_optimization_passes): Ditto. (pass_init_dump_file): Ditto. * varpool.c (varpool_node): Ditto. (debug_varpool): Ditto. (varpool_node_for_asm): Ditto. (varpool_enqueue_needed_node): Ditto. * stmt.c (expand_asm_operands): Ditto. * gcov-dump.c (main): Ditto. (print_usage): Ditto. (print_prefix): Ditto. (dump_file): Ditto. (tag_summary): Ditto. 2011-04-19 Guozhi Wei * config/arm/arm.c (SHORTEST_FAR_JUMP_LENGTH): New constant. (estimate_function_length): New function. (thumb_far_jump_used_p): No far jump is needed in short function. 2011-04-20 Easwaran Raman * gcc.c (asm_options): Pass --save-temps to assembler. 2011-04-19 Martin Thuresson * libgcov.c (gcov_version): Do not access filename in struct generated from different version. 2011-04-19 Xinliang David Li * ipa-inline.c (cgraph_decide_recursive_inlining): Fix div by zero error with insane profile. 2011-04-17 Diego Novillo Merge from google/integration rev 172609. 2011-04-11 Xinliang David Li * value-profile.c (check_ic_target): New function. (gimple_ic_transform): Sanity check indirect call target. * gimple-low.c (gimple_check_call_args): Interface change. (gimple_check_call_matching_types): New function. * tree-inline.c (tree_can_inline_p): Call new function. 2011-04-08 Xinliang David Li * ipa-cp.c (ipcp_update_profiling): Correct negative scale factor due to insane profile data. 2011-04-08 Xinliang David Li * final.c (dump_basic_block_info): New function. (final): Dump basic block. (final_scan_insn): Remove old dump. 2011-03-29 Le-Chun Wu Merge from branches/annotalysis at r171529. Port annotalysis (lock annotations and analysis) from GCC-4.4.3 to GCC-4.6 tree. 2011-03-28 Martin Thuresson * doc/invoke.texi: Document support for relative profile paths. * libgcov.c (gcov_exit): Support relative profile paths. 2011-03-15 Diego Novillo Merge from google/integration rev 170988 (gcc-4_6-branch). 2011-03-14 Diego Novillo Merge from google/integration rev 170957. 2011-02-26 Diego Novillo Merge from google/integration rev 170499. 2011-02-07 Diego Novillo Merge from google/integration. 2011-02-04 Diego Novillo Merge from google/integration. * BASE-VER: Fix. Copyright (C) 2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.