1. 14 Feb, 2017 1 commit
  2. 23 Jan, 2017 1 commit
  3. 19 Jan, 2017 1 commit
    • Make LTO's implementation of LANG_HOOKS_TYPE_FOR_SIZE the default · 8a3a6ab4
      gcc/jit/ChangeLog:
      	* dummy-frontend.c (jit_langhook_type_for_size): Delete.
      	(LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
      
      gcc/ChangeLog:
      	* langhooks-def.h (lhd_type_for_size): New decl.
      	(LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
      	* langhooks.c (lhd_type_for_size): New function, taken from
      	lto_type_for_size.
      
      gcc/lto/ChangeLog:
      	* lto-lang.c (builtin_type_for_size): Convert call to
      	lto_type_for_size to one through the langhook.
      	(lto_type_for_size): Move to langhooks.c and rename to
      	lhd_type_for_size.
      	(LANG_HOOKS_TYPE_FOR_SIZE): Don't redefine.
      
      From-SVN: r244646
      David Malcolm committed
  4. 18 Jan, 2017 1 commit
    • re PR lto/79061 ([LTO][ASAN] LTO plus ASAN fails with "AddressSanitizer:… · 5807fb91
      re PR lto/79061 ([LTO][ASAN] LTO plus ASAN fails with "AddressSanitizer: initialization-order-fiasco")
      
      	PR lto/79061
      gcc/
      
      	* asan.c (get_translation_unit_decl): New function.
      	(asan_add_global): Extract modules file name from globals
      	TRANSLATION_UNIT_DECL in lto mode.
      	* tree.c (build_translation_unit_decl): Add source location for newly
      	built TRANSLATION_UNIT_DECL.
      
      gcc/lto/
      
      	* lto.c (lto_read_decls): accept location cache for
      	TRANSLATION_UNIT_DECL.
      	
      gcc/testsuite/
      
      	* gcc.dg/cpp/mi1.c: Adjust testcase.
      	* gcc.dg/pch/cpp-3.c: Likewise.
      
      From-SVN: r244581
      Maxim Ostapenko committed
  5. 11 Jan, 2017 1 commit
  6. 09 Jan, 2017 1 commit
    • re PR translation/79019 (translatable string typo in cif-code.def:141) · bd2c6270
      	PR translation/79019
      	PR translation/79020
      	* params.def (PARAM_INLINE_MIN_SPEEDUP,
      	PARAM_IPA_CP_SINGLE_CALL_PENALTY,
      	PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
      	in descriptions.
      	* config/avr/avr.opt (maccumulate-args): Likewise.
      	* config/msp430/msp430.opt (mwarn-mcu): Likewise.
      	* common.opt (freport-bug): Likewise.
      	* cif-code.def (CIF_FINAL_ERROR): Likewise.
      	* doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
      	* config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
      	translatable string.
      	* config/i386/i386.c (function_value_32): Likewise.
      	* config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
      	* config/msp430/msp430.c (msp430_option_override, msp430_attr):
      	Likewise.
      	* config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
      	* common/config/msp430/msp430-common.c (msp430_handle_option):
      	Likewise.
      	* symtab.c (symtab_node::verify_base): Likewise.
      	* opts.c (set_debug_level): Likewise.
      	* tree.c (verify_type_variant): Likewise.  Fix typo in comment.
      	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
      	missing whitespace to translatable strings.
      	* config/avr/avr.md (bswapsi2): Fix typo in comment.
      	* config/sh/superh.h: Likewise.
      	* config/i386/xopintrin.h: Likewise.
      	* config/i386/znver1.md: Likewise.
      	* config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
      	* ipa-inline-analysis.c (compute_inline_parameters): Likewise.
      	* double-int.h (struct double_int): Likewise.
      	* double-int.c (div_and_round_double): Likewise.
      	* wide-int.cc: Likewise.
      	* tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
      	* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
      	* cfgcleanup.c (crossjumps_occured): Renamed to ...
      	(crossjumps_occurred): ... this.
      	(try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
      	Adjust all uses.
      cp/
      	* semantics.c (finish_omp_clauses): Add missing whitespace to
      	translatable strings.
      	* cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
      lto/
      	* lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
      fortran/
      	* decl.c (attr_decl1): Fix spelling in translatable string.
      	* intrinsic.texi: Fix spelling - invokation -> invocation.
      	* lang.opt (faggressive-function-elimination, gfc_convert): Fix
      	typos in descriptions.
      	* openmp.c (resolve_omp_clauses): Add missing whitespace to
      	translatable strings.
      c-family/
      	* c.opt (Wnormalized=): Fix typo in description.
      testsuite/
      	* c-c++-common/goacc/host_data-2.c (f): Adjust expected spelling of
      	diagnostics.
      	* gfortran.dg/initialization_17.f90: Likewise.
      
      From-SVN: r244245
      Jakub Jelinek committed
  7. 06 Jan, 2017 2 commits
  8. 01 Jan, 2017 1 commit
  9. 30 Nov, 2016 1 commit
  10. 26 Nov, 2016 1 commit
  11. 23 Nov, 2016 1 commit
  12. 21 Nov, 2016 1 commit
    • re PR c++/71973 (c++ handles built-in functions inconsistently) · 48330c93
      gcc:
      2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR c++/71973
      	* doc/invoke.texi (-Wno-builtin-declaration-mismatch): Document the
      	new default-enabled warning..
      	* builtin-types.def (BT_CONST_TM_PTR): New primitive type.
      	(BT_PTR_CONST_STRING): Updated.
      	(BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR): Removed.
      	(BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_TM_PTR): New function type.
      	* builtins.def (DEF_TM_BUILTIN): Disable BOTH_P for TM builtins.
      	(strftime): Update builtin function.
      	* tree-core.h (TI_CONST_TM_PTR_TYPE): New enum value.
      	* tree.h (const_tm_ptr_type_node): New type node.
      	* tree.c (free_lang_data, build_common_tree_nodes): Initialize
      	const_tm_ptr_type_node.
      
      c-family:
      2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR c++/71973
      	* c.opt (-Wbuiltin-declaration-mismatch): New warning.
      	* c-common.c (c_common_nodes_and_builtins): Initialize
      	const_tm_ptr_type_node.
      
      c:
      2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR c++/71973
      	* c-decl.c (diagnose_mismatched_decls): Use
      	OPT_Wbuiltin_declaration_mismatch here too.
      
      cp:
      2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR c++/71973
      	* decl.c (duplicate_decls): Warn when a built-in function is redefined.
      	Don't overload builtin functions with C++ functions.
      	Handle const_tm_ptr_type_node like file_ptr_node.
      	Copy the TREE_NOTHROW flag unmodified to the old decl.
      
      lto:
      2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR c++/71973
      	* lto-lang.c (lto_init): Assert const_tm_ptr_type_node is sane.
      
      testsuite:
      2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR c++/71973
      	* g++.dg/pr71973-1.C: New test.
      	* g++.dg/pr71973-2.C: New test.
      	* g++.dg/pr71973-3.C: New test.
      	* g++.dg/lto/pr68811_0.C: Add -w to first lto-options.
      	* g++.dg/lookup/extern-c-redecl4.C: Adjust test expectations.
      	* g++.old-deja/g++.mike/p700.C: Add -Wno-builtin-declaration-mismatch
      	to dg-options.
      	* g++.old-deja/g++.other/realloc.C: Likewise.
      	* g++.old-deja/g++.other/builtins10.C: Adjust test expectations.
      
      From-SVN: r242662
      Bernd Edlinger committed
  13. 18 Nov, 2016 1 commit
    • Add SET_DECL_MODE · 899ca90e
      This may no longer be necessary with the current version
      of the SVE patches, but it does at least make things consistent
      with the TYPE_MODE/SET_TYPE_MODE split.
      
      gcc/ada/
      2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
       	    Alan Hayward  <alan.hayward@arm.com>
       	    David Sherwood  <david.sherwood@arm.com>
      
      	* gcc-interface/utils.c (create_label_decl): Use SET_DECL_MODE.
      
      gcc/c/
      2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
       	    Alan Hayward  <alan.hayward@arm.com>
       	    David Sherwood  <david.sherwood@arm.com>
      
      	* c-decl.c (merge_decls): Use SET_DECL_MODE.
      	(make_label, finish_struct): Likewise.
      
      gcc/cp/
      2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
       	    Alan Hayward  <alan.hayward@arm.com>
       	    David Sherwood  <david.sherwood@arm.com>
      
      	* class.c (finish_struct_bits): Use SET_DECL_MODE.
      	(build_base_field_1, layout_class_type, finish_struct_1): Likewise.
      	* decl.c (make_label_decl): Likewise.
      	* pt.c (tsubst_decl): Likewise.
      
      gcc/fortran/
      2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
       	    Alan Hayward  <alan.hayward@arm.com>
       	    David Sherwood  <david.sherwood@arm.com>
      
      	* trans-common.c (build_common_decl): Use SET_DECL_MODE.
      	* trans-decl.c (gfc_build_label_decl): Likewise.
      	* trans-types.c (gfc_get_array_descr_info): Likewise.
      
      gcc/lto/
      2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
       	    Alan Hayward  <alan.hayward@arm.com>
       	    David Sherwood  <david.sherwood@arm.com>
      
      	* lto.c (offload_handle_link_vars): Use SET_DECL_MODE.
      
      gcc/
      2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
       	    Alan Hayward  <alan.hayward@arm.com>
       	    David Sherwood  <david.sherwood@arm.com>
      
      	* tree.h (SET_DECL_MODE): New macro.
      	* cfgexpand.c (avoid_deep_ter_for_debug): Use SET_DECL_MODE.
      	(expand_gimple_basic_block): Likewise.
      	* function.c (split_complex_args): Likeise.
      	* ipa-prop.c (ipa_modify_call_arguments): Likewise.
      	* omp-simd-clone.c (ipa_simd_modify_stmt_ops): Likewise.
      	* stor-layout.c (layout_decl, relayout_decl): Likewise.
      	(finish_bitfield_representative): Likewise.
      	* tree.c (make_node_stat): Likewise.
      	* tree-inline.c (remap_ssa_name): Likewise.
      	(tree_function_versioning): Likewise.
      	* tree-into-ssa.c (rewrite_debug_stmt_uses): Likewise.
      	* tree-sra.c (sra_ipa_reset_debug_stmts): Likewise.
      	* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
      	* tree-ssa-loop-ivopts.c (remove_unused_ivs): Likewise.
      	* tree-ssa.c (insert_debug_temp_for_var_def): Likewise.
      	* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Likewise.
      	* varasm.c (make_debug_expr_from_rtl): Likewise.
      
      libcc1/
      2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
       	    Alan Hayward  <alan.hayward@arm.com>
       	    David Sherwood  <david.sherwood@arm.com>
      
      	* plugin.cc (plugin_build_add_field): Use SET_DECL_MODE.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r242585
      Richard Sandiford committed
  14. 31 Oct, 2016 1 commit
  15. 20 Sep, 2016 2 commits
    • Add IPA VRP · 8bc5448f
      gcc/lto/ChangeLog:
      2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>
      
      	* lto-partition.c: Include tree-vrp.h.
      	* lto.c: Likewise.
      
      gcc/testsuite/ChangeLog:
      
      2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>
      
      	* g++.dg/ipa/pure-const-3.C: Add -fno-ipa-vrp. Else constant arguments
      	will be optimized away.
      	* gcc.dg/ipa/vrp1.c: New test.
      	* gcc.dg/ipa/vrp2.c: New test.
      	* gcc.dg/ipa/vrp3.c: New test.
      
      gcc/ChangeLog:
      
      2016-09-21  Kugan Vivekanandarajah  <kuganv@linaro.org>
      
      	* common.opt: New option -fipa-vrp.
      	* ipa-cp.c (ipa_get_vr_lat): New.
      	(ipcp_vr_lattice::print): Likewise.
      	(print_all_lattices): Call ipcp_vr_lattice::print.
      	(ipcp_vr_lattice::meet_with): New.
      	(ipcp_vr_lattice::meet_with_1): Likewise.
      	(ipcp_vr_lattice::top_p): Likewise.
      	(ipcp_vr_lattice::bottom_p): Likewsie.
      	(ipcp_vr_lattice::set_to_bottom): Likewise.
      	(set_all_contains_variable): Call VR set_to_bottom.
      	(initialize_node_lattices): Init VR lattices.
      	(propagate_vr_accross_jump_function): New.
      	(propagate_constants_accross_call): Call
      	propagate_vr_accross_jump_function.
      	(ipcp_store_vr_results): New.
      	(ipcp_driver): Handle VR.
      	* ipa-prop.c (ipa_print_node_jump_functions_for_edge): Handle VR.
      	(ipa_set_jf_unknown): Likewise.
      	(ipa_compute_jump_functions_for_edge): Likewise.
      	(ipa_node_params_t::duplicate): Likewise.
      	(ipa_write_jump_function): Likewise.
      	(ipa_read_jump_function): Likewise.
      	(write_ipcp_transformation_info): Likewise.
      	(read_ipcp_transformation_info): Likewise.
      	(ipcp_update_vr): New.
      	(ipcp_transform_function): Handle VR.
      	* ipa-prop.h (struct ipa_vr): New.
      	* cgraph.c: Include tree-vrp.h.
      	* cgraphunit.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* ipa.c: Likewise.
      
      From-SVN: r240292
      Kugan Vivekanandarajah committed
    • debug.h (gcc_debug_hooks): Add filename parameter to early_finish hook. · 68317985
      2016-09-20  Richard Biener  <rguenther@suse.de>
      
      	* debug.h (gcc_debug_hooks): Add filename parameter to early_finish
      	hook.
      	* debug.c (do_nothing_debug_hooks): Adjust.
      	* dbxout.c (dbx_debug_hooks): Likewise.
      	* sdbout.c (sdb_debug_hooks): Likewise.
      	* dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
      	(dwarf2out_finish): Move producer, filename and
      	path annotation ...
      	(dwarf2out_early_finish): ... here.  Remove in_lto_p special-casing.
      	* cgraphunit.c (symbol_table::finalize_compilation_unit): Adjust.
      
      	lto/
      	* lto.c (lto_main): Call early_finish with "<artificial>" as
      	filename.
      
      From-SVN: r240255
      Richard Biener committed
  16. 19 Sep, 2016 1 commit
    • dwarf2out.c (early_dwarf_finished): New global. · 321e76fb
      2016-09-16  Richard Biener  <rguenther@suse.de>
      
      	* dwarf2out.c (early_dwarf_finished): New global.
      	(set_early_dwarf::set_early_dwarf): Assert early_dwarf_finished
      	is false.
      	(dwarf2out_early_finish): Set early_dwarf_finished at the end,
      	if called from LTO exit early.
      	(dwarf2out_late_global_decl): When being during the early
      	debug phase do not add locations but only const value attributes.
      	Adjust the way we generate early DIEs for LTO.
      
      	lto/
      	* lto.c (lto_main): Invoke early_finish debug hook.
      
      From-SVN: r240228
      Richard Biener committed
  17. 05 Sep, 2016 1 commit
  18. 25 Jul, 2016 1 commit
    • cgraph.c (cgraph_node::verify_node): Compare against builtin by using… · ea6e17d5
      cgraph.c (cgraph_node::verify_node): Compare against builtin by using DECL_BUILT_IN_CLASS and DECL_FUNCTION_CODE.
      
      2016-07-25  Richard Biener  <rguenther@suse.de>
      
      	* cgraph.c (cgraph_node::verify_node): Compare against builtin
      	by using DECL_BUILT_IN_CLASS and DECL_FUNCTION_CODE.
      	* tree-chkp.c (chkp_gimple_call_builtin_p): Likewise.
      	* tree-streamer.h (streamer_handle_as_builtin_p): Remove.
      	(streamer_get_builtin_tree): Likewise.
      	(streamer_write_builtin): Likewise.
      	* lto-streamer.h (LTO_builtin_decl): Remove.
      	* lto-streamer-in.c (lto_read_tree_1): Remove assert.
      	(lto_input_scc): Remove LTO_builtin_decl handling.
      	(lto_input_tree_1): Liekwise.
      	* lto-streamer-out.c (lto_output_tree_1): Remove special
      	handling of builtins.
      	(DFS::DFS): Likewise.
      	* tree-streamer-in.c (streamer_get_builtin_tree): Remove.
      	* tree-streamer-out.c (pack_ts_function_decl_value_fields): Remove
      	assert.
      	(streamer_write_builtin): Remove.
      
      	lto/
      	* lto.c (compare_tree_sccs_1): Remove streamer_handle_as_builtin_p uses.
      	(unify_scc): Likewise.
      	(lto_read_decls): Likewise.
      
      From-SVN: r238709
      Richard Biener committed
  19. 28 Jun, 2016 1 commit
  20. 23 Jun, 2016 1 commit
    • Add make autoprofiledbootstrap · 277d7ee0
      Add support for profiledbootstrap with autofdo. Will be useful
      to get better testing coverage of autofdo.
      
      This requires Linux perf and autofdo to be installed, only
      really for x86_64 linux on Intel so far.
      
      Profile the whole build process with perf, then convert the file,
      and pass it back to the compiler in the feedback stage.
      
      The conversion has to be done per language, as only that knows
      the name of the binary. Currently we only do it for C and C++,
      as the other languages don't have enough coverage during a normal
      bootstrap.
      
      For lto1 it is also disabled, because it would only be useful during a LTO
      bootstrap, but right now autofdo and LTO are not working together due to
      PR66229
      
      For common backend files always the profile output of the C++ compiler
      is used. In theory multiple inputs could be merged here, but so far
      that is not implemented.
      
      The method is not friendly to partial rebuilds, as only the profile
      information from the current rebuild is used. So if an error
      occurs it is best to clean and restart, otherwise the code
      quality may be worse.
      
      This patch is fairly large, but most of it is auto generated from
      autogen in Makefile.in. for the new stage targets.
      
      Passes profiledbootstrap and normal bootstrap on x86_64-linux.
      autoprofiledbootstrap is currently not working due to
      PR70427 (but it finishes with that worked around)
      
      The autofdo'ed compiler is ~7% faster on insn-recog.i (vs ~11% for
      profiledfeedback), and ~4% faster for tramp3d-v4 (vs 10% for
      profiledfeedback) on a Sandy Bridge system.
      
      gcc/lto/:
      
      2016-06-23  Andi Kleen  <ak@linux.intel.com>
      
      	* Make-lang.in: Add support for autofdo (disabled for now)
      
      gcc/cp/:
      
      2016-06-23  Andi Kleen  <ak@linux.intel.com>
      
      	* Make-lang.in: Add support for autofdo.
      
      gcc/:
      
      2016-06-23  Andi Kleen  <ak@linux.intel.com>
      
      	* Makefile.in: Regenerate.
      	* doc/install.texi: Document autoprofiledbootstrap.
      
      /:
      2016-06-23  Andi Kleen  <ak@linux.intel.com>
      
      	* Makefile.def: Add autoprofiledbootstrap.
      	* Makefile.tpl: Dito.
      	* Makefile.in: Regenerate.
      
      gcc/c/:
      
      2016-06-23  Andi Kleen  <ak@linux.intel.com>
      
      	* Make-lang.in: Add support for autofdo.
      
      From-SVN: r237733
      Andi Kleen committed
  21. 10 Jun, 2016 1 commit
    • PR c/71392 - SEGV calling integer overflow built-ins with a null pointer · 4d926e34
      gcc/ChangeLog:
      2016-06-10  Martin Sebor  <msebor@redhat.com>
      
      	PR c/71392
      	* builtin-attrs.def (ATTR_NOTHROW_NONNULL_LEAF_LIST): New macro.
      	(ATTR_NOTHROW_NONNULL_TYPEGENERIC_LEAF): Same.
      	* builtins.def (BUILT_IN_SADD_OVERFLOW, BUILT_IN_SADDL_OVERFLOW): Use
      	them.
      	(BUILT_IN_SADDLL_OVERFLOW, BUILT_IN_SSUB_OVERFLOW): Same.
      	(BUILT_IN_SSUBL_OVERFLOW, BUILT_IN_SSUBLL_OVERFLOW): Same.
      	(BUILT_IN_SMUL_OVERFLOW, BUILT_IN_SMULL_OVERFLOW): Same.
      	(BUILT_IN_SMULLL_OVERFLOW, BUILT_IN_UADD_OVERFLOW): Same.
      	(BUILT_IN_UADDL_OVERFLOW, BUILT_IN_UADDLL_OVERFLOW): Same.
      	(BUILT_IN_USUB_OVERFLOW, BUILT_IN_USUBL_OVERFLOW): Same.
      	(BUILT_IN_USUBLL_OVERFLOW, BUILT_IN_UMUL_OVERFLOW): Same.
      	(BUILT_IN_UMULL_OVERFLOW, BUILT_IN_UMULLL_OVERFLOW):
      
      gcc/ada/ChangeLog:
      2016-06-10  Martin Sebor  <msebor@redhat.com>
      
      	PR c/71392
      	* gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
      	the nonnull attribute in type-generic builtins.
      
      gcc/c-family/ChangeLog:
      2016-06-10  Martin Sebor  <msebor@redhat.com>
      
      	PR c/71392
      	* gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
      	the nonnull attribute in type-generic builtins.
      
      gcc/lto/ChangeLog:
      2016-06-10  Martin Sebor  <msebor@redhat.com>
      
      	PR c/71392
      	* gcc/lto/lto-lang.c (handle_nonnull_attribute): Accept the nonnull
      	attribute in type-generic builtins.
      
      gcc/testsuite/ChangeLog:
      2016-06-10  Martin Sebor  <msebor@redhat.com>
      
      	PR c/71392
      	* c-c++-common/builtin-arith-overflow-1.c: Add test cases.
      
      From-SVN: r237314
      Martin Sebor committed
  22. 16 May, 2016 1 commit
  23. 03 May, 2016 1 commit
    • cgraph.c (symbol_table::create_edge): Set inline_failed. · 1a0bf5e1
      	* cgraph.c (symbol_table::create_edge): Set inline_failed.
      	(cgraph_edge::make_direct): Likewise.
      	(cgraph_edge::dump_edge_flags): Dump call_stmt_cannot_inline_p.
      	* cgraphclones.c (duplicate_thunk_for_node): Set inline_failed.
      	* cif-code.def (CIF_LTO_MISMATCHED_DECLARATIONS): New code
      	(CIF_THUNK): New code.
      	* ipa-inline-analysis.c (initialize_inline_failed): Preserve
      	CIF_FINAL_ERROR codes; do not deal with call_stmt_cannot_inline_p.
      	(compute_inline_parameters): Set inline_failed for thunks.
      	(inline_analyze_function): Cleanup.
      	* ipa-inline.c (can_inline_edge_p): Do not deal with
      	call_stmt_cannot_inline_p.
      	(can_early_inline_edge_p): Likewise.
      	(early_inliner): Initialize inline_failed.
      	* lto-cgraph.c (lto_output_edge): Sanity check inline_failed.
      
      	* lto-symtab.c (lto_cgraph_replace_node): Initialize inline_failed.
      
      From-SVN: r235839
      Jan Hubicka committed
  24. 27 Apr, 2016 1 commit
    • params.def (MAX_PARTITION_SIZE): New param. · a2e76867
      2016-04-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
      
      	* params.def (MAX_PARTITION_SIZE): New param.
      	* invoke.texi: Document lto-max-partition.
      lto/
      	* lto-partition.h (lto_balanced_map): New parameter.
      	* lto-partition.c (lto_balanced_map): New parameter
      	max_partition_size.
      	Check if partition size is greater than max_partition_size.
      	* lto.c (do_whole_program_analysis): Adjust calls to
      	lto_balanced_map() to pass 2nd argument.
      
      From-SVN: r235478
      Prathamesh Kulkarni committed
  25. 17 Mar, 2016 1 commit
  26. 08 Mar, 2016 1 commit
    • ipa-polymorphic-call.c (walk_ssa_copies): Fix spelling - becuase -> because. · 56aae4b7
      	* ipa-polymorphic-call.c (walk_ssa_copies): Fix spelling
      	- becuase -> because.
      	* ipa-reference.c (ignore_module_statics): Likewise.
      	* cgraph.c (cgraph_node::get_body): Likewise.
      	* ipa-inline.c (early_inliner): Likewise.
      	* ipa-devirt.c (types_same_for_odr): Likewise.
      	* tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
      	* config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Likewise.
      cp/
      	* decl.c (duplicate_decls): Fix spelling - becuase -> because.
      lto/
      	* lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
      	- becuase -> because.
      
      From-SVN: r234061
      Jakub Jelinek committed
  27. 15 Feb, 2016 1 commit
  28. 08 Feb, 2016 1 commit
    • Remove -fshort-double · a011cd92
      	PR target/60410
      	* tree.c (build_common_tree_nodes): Remove short_double argument.
      	All callers changed.
      	* tree.h (build_common_tree_nodes): Adjust declaration.
      	* doc/invoke.texi (-fshort-double): Remove documentation.
      	* config/mips/t-img-elf (MULTILIB_OPTIONS, MULTILIB_DIRNAMES,
      	MULTILIB_EXCEPTIONS): Remove -fshort-double variant.
      	* lto-wrapper.c (merge_and_complain, append_compiler_options,
      	append_linker_options): Don't handle OPT_fshort_double.
      	
      c-family/
      	PR target/60410
      	* c.opt (fshort-double): Remove.
      
      testsuite/
      	PR target/60410
      	* gcc.dg/lto/pr55113_0.c: Remove test.
      
      From-SVN: r233218
      Bernd Schmidt committed
  29. 27 Jan, 2016 1 commit
  30. 19 Jan, 2016 2 commits
    • re PR lto/69136 (ICE in lto_symtab_prevailing_virtual_decl, at lto/lto-symtab.c:991) · e49d321f
      	PR lto/69136
      	* lto-symtab.c (lto_symtab_prevailing_virtual_decl): Abstract
      	decls have no assemblernames.
      	* g++.dg/torture/pr69136.C: New testcase.
      
      From-SVN: r232553
      Jan Hubicka committed
    • Merge of HSA · b2b40051
      2016-01-19  Martin Jambor  <mjambor@suse.cz>
      	    Martin Liska  <mliska@suse.cz>
      	    Michael Matz <matz@suse.de>
      
      libgomp/
      	* plugin/Makefrag.am: Add HSA plugin requirements.
      	* plugin/configfrag.ac (HSA_RUNTIME_INCLUDE): New variable.
      	(HSA_RUNTIME_LIB): Likewise.
      	(HSA_RUNTIME_CPPFLAGS): Likewise.
      	(HSA_RUNTIME_INCLUDE): New substitution.
      	(HSA_RUNTIME_LIB): Likewise.
      	(HSA_RUNTIME_LDFLAGS): Likewise.
      	(hsa-runtime): New configure option.
      	(hsa-runtime-include): Likewise.
      	(hsa-runtime-lib): Likewise.
      	(PLUGIN_HSA): New substitution variable.
      	Fill HSA_RUNTIME_INCLUDE and HSA_RUNTIME_LIB according to the new
      	configure options.
      	(PLUGIN_HSA_CPPFLAGS): Likewise.
      	(PLUGIN_HSA_LDFLAGS): Likewise.
      	(PLUGIN_HSA_LIBS): Likewise.
      	Check that we have access to HSA run-time.
      	* libgomp-plugin.h (offload_target_type): New element
      	OFFLOAD_TARGET_TYPE_HSA.
      	* libgomp.h (gomp_target_task): New fields firstprivate_copies and
      	args.
      	(bool gomp_create_target_task): Updated.
      	(gomp_device_descr): Extra parameter of run_func and async_run_func,
      	new field can_run_func.
      	* libgomp_g.h (GOMP_target_ext): Update prototype.
      	* oacc-host.c (host_run): Added a new parameter args.
      	* target.c (calculate_firstprivate_requirements): New function.
      	(copy_firstprivate_data): Likewise.
      	(gomp_target_fallback_firstprivate): Use them.
      	(gomp_target_unshare_firstprivate): New function.
      	(gomp_get_target_fn_addr): Allow returning NULL for shared memory
      	devices.
      	(GOMP_target): Do host fallback for all shared memory devices.  Do not
      	pass any args to plugins.
      	(GOMP_target_ext): Introduce device-specific argument parameter args.
      	Allow host fallback if device shares memory.  Do not remap data if
      	device has shared memory.
      	(gomp_target_task_fn): Likewise.  Also treat shared memory devices
      	like host fallback for mappings.
      	(GOMP_target_data): Treat shared memory devices like host fallback.
      	(GOMP_target_data_ext): Likewise.
      	(GOMP_target_update): Likewise.
      	(GOMP_target_update_ext): Likewise.  Also pass NULL as args to
      	gomp_create_target_task.
      	(GOMP_target_enter_exit_data): Likewise.
      	(omp_target_alloc): Treat shared memory devices like host fallback.
      	(omp_target_free): Likewise.
      	(omp_target_is_present): Likewise.
      	(omp_target_memcpy): Likewise.
      	(omp_target_memcpy_rect): Likewise.
      	(omp_target_associate_ptr): Likewise.
      	(gomp_load_plugin_for_device): Also load can_run.
      	* task.c (GOMP_PLUGIN_target_task_completion): Free
      	firstprivate_copies.
      	(gomp_create_target_task): Accept new argument args and store it to
      	ttask.
      	* plugin/plugin-hsa.c: New file.
      
      gcc/
      	* Makefile.in (OBJS): Add new source files.
      	(GTFILES): Add hsa.c.
      	* common.opt (disable_hsa): New variable.
      	(-Whsa): New warning.
      	* config.in (ENABLE_HSA): New.
      	* configure.ac: Treat hsa differently from other accelerators.
      	(OFFLOAD_TARGETS): Define ENABLE_OFFLOADING according to
      	$enable_offloading.
      	(ENABLE_HSA): Define ENABLE_HSA according to $enable_hsa.
      	* doc/install.texi (Configuration): Document --with-hsa-runtime,
      	--with-hsa-runtime-include, --with-hsa-runtime-lib and
      	--with-hsa-kmt-lib.
      	* doc/invoke.texi (-Whsa): Document.
      	(hsa-gen-debug-stores): Likewise.
      	* lto-wrapper.c (compile_images_for_offload_targets): Do not attempt
      	to invoke offload compiler for hsa acclerator.
      	* opts.c (common_handle_option): Determine whether HSA offloading
      	should be performed.
      	* params.def (PARAM_HSA_GEN_DEBUG_STORES): New parameter.
      	* builtin-types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
      	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
      	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
      	* gimple-low.c (lower_stmt): Also handle GIMPLE_OMP_GRID_BODY.
      	* gimple-pretty-print.c (dump_gimple_omp_for): Also handle
      	GF_OMP_FOR_KIND_GRID_LOOP.
      	(dump_gimple_omp_block): Also handle GIMPLE_OMP_GRID_BODY.
      	(pp_gimple_stmt_1): Likewise.
      	* gimple-walk.c (walk_gimple_stmt): Likewise.
      	* gimple.c (gimple_build_omp_grid_body): New function.
      	(gimple_copy): Also handle GIMPLE_OMP_GRID_BODY.
      	* gimple.def (GIMPLE_OMP_GRID_BODY): New.
      	* gimple.h (enum gf_mask): Added GF_OMP_PARALLEL_GRID_PHONY,
      	GF_OMP_FOR_KIND_GRID_LOOP, GF_OMP_FOR_GRID_PHONY and
      	GF_OMP_TEAMS_GRID_PHONY.
      	(gimple_statement_omp_single_layout): Updated comments.
      	(gimple_build_omp_grid_body): New function.
      	(gimple_has_substatements): Also handle GIMPLE_OMP_GRID_BODY.
      	(gimple_omp_for_grid_phony): New function.
      	(gimple_omp_for_set_grid_phony): Likewise.
      	(gimple_omp_parallel_grid_phony): Likewise.
      	(gimple_omp_parallel_set_grid_phony): Likewise.
      	(gimple_omp_teams_grid_phony): Likewise.
      	(gimple_omp_teams_set_grid_phony): Likewise.
      	(gimple_return_set_retbnd): Also handle GIMPLE_OMP_GRID_BODY.
      	* omp-builtins.def (BUILT_IN_GOMP_OFFLOAD_REGISTER): New.
      	(BUILT_IN_GOMP_OFFLOAD_UNREGISTER): Likewise.
      	(BUILT_IN_GOMP_TARGET): Updated type.
      	* omp-low.c: Include symbol-summary.h, hsa.h and params.h.
      	(adjust_for_condition): New function.
      	(get_omp_for_step_from_incr): Likewise.
      	(extract_omp_for_data): Moved parts to adjust_for_condition and
      	get_omp_for_step_from_incr.
      	(build_outer_var_ref): Handle GIMPLE_OMP_GRID_BODY.
      	(fixup_child_record_type): Bail out if receiver_decl is NULL.
      	(scan_sharing_clauses): Handle OMP_CLAUSE__GRIDDIM_.
      	(scan_omp_parallel): Do not create child functions for phony
      	constructs.
      	(check_omp_nesting_restrictions): Handle GIMPLE_OMP_GRID_BODY.
      	(scan_omp_1_op): Checking assert we are not remapping to
      	ERROR_MARK.  Also also handle GIMPLE_OMP_GRID_BODY.
      	(parallel_needs_hsa_kernel_p): New function.
      	(expand_parallel_call): Register apprpriate parallel child
      	functions as HSA kernels.
      	(grid_launch_attributes_trees): New type.
      	(grid_attr_trees): New variable.
      	(grid_create_kernel_launch_attr_types): New function.
      	(grid_insert_store_range_dim): Likewise.
      	(grid_get_kernel_launch_attributes): Likewise.
      	(get_target_argument_identifier_1): Likewise.
      	(get_target_argument_identifier): Likewise.
      	(get_target_argument_value): Likewise.
      	(push_target_argument_according_to_value): Likewise.
      	(get_target_arguments): Likewise.
      	(expand_omp_target): Call get_target_arguments instead of looking
      	up for teams and thread limit.
      	(grid_expand_omp_for_loop): New function.
      	(grid_arg_decl_map): New type.
      	(grid_remap_kernel_arg_accesses): New function.
      	(grid_expand_target_kernel_body): New function.
      	(expand_omp): Call it.
      	(lower_omp_for): Do not emit phony constructs.
      	(lower_omp_taskreg): Do not emit phony constructs but create for them
      	a temporary variable receiver_decl.
      	(lower_omp_taskreg): Do not emit phony constructs.
      	(lower_omp_teams): Likewise.
      	(lower_omp_grid_body): New function.
      	(lower_omp_1): Call it.
      	(grid_reg_assignment_to_local_var_p): New function.
      	(grid_seq_only_contains_local_assignments): Likewise.
      	(grid_find_single_omp_among_assignments_1): Likewise.
      	(grid_find_single_omp_among_assignments): Likewise.
      	(grid_find_ungridifiable_statement): Likewise.
      	(grid_target_follows_gridifiable_pattern): Likewise.
      	(grid_remap_prebody_decls): Likewise.
      	(grid_copy_leading_local_assignments): Likewise.
      	(grid_process_kernel_body_copy): Likewise.
      	(grid_attempt_target_gridification): Likewise.
      	(grid_gridify_all_targets_stmt): Likewise.
      	(grid_gridify_all_targets): Likewise.
      	(execute_lower_omp): Call grid_gridify_all_targets.
      	(make_gimple_omp_edges): Handle GIMPLE_OMP_GRID_BODY.
      	* tree-core.h (omp_clause_code): Added OMP_CLAUSE__GRIDDIM_.
      	(tree_omp_clause): Added union field dimension.
      	* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__GRIDDIM_.
      	* tree.c (omp_clause_num_ops): Added number of arguments of
      	OMP_CLAUSE__GRIDDIM_.
      	(omp_clause_code_name): Added name of OMP_CLAUSE__GRIDDIM_.
      	(walk_tree_1): Handle OMP_CLAUSE__GRIDDIM_.
      	* tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): New.
      	(OMP_CLAUSE_SET_GRIDDIM_DIMENSION): Likewise.
      	(OMP_CLAUSE_GRIDDIM_SIZE): Likewise.
      	(OMP_CLAUSE_GRIDDIM_GROUP): Likewise.
      	* passes.def: Schedule pass_ipa_hsa and pass_gen_hsail.
      	* tree-pass.h (make_pass_gen_hsail): Declare.
      	(make_pass_ipa_hsa): Likewise.
      	* ipa-hsa.c: New file.
      	* lto-section-in.c (lto_section_name): Add hsa section name.
      	* lto-streamer.h (lto_section_type): Add hsa section.
      	* timevar.def (TV_IPA_HSA): New.
              * hsa-brig-format.h: New file.
      	* hsa-brig.c: New file.
      	* hsa-dump.c: Likewise.
      	* hsa-gen.c: Likewise.
      	* hsa.c: Likewise.
      	* hsa.h: Likewise.
      	* toplev.c (compile_file): Call hsa_output_brig.
      	* hsa-regalloc.c: New file.
      
      gcc/fortran/
      	* types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
      	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
      	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
      
      gcc/lto/
      	* lto-partition.c: Include "hsa.h"
      	(add_symbol_to_partition_1): Put hsa implementations into the
      	same partition as host implementations.
      
      liboffloadmic/
      	* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_async_run): New
      	unused parameter.
      	(GOMP_OFFLOAD_run): Likewise.
      
      include/
      	* gomp-constants.h (GOMP_DEVICE_HSA): New macro.
      	(GOMP_VERSION_HSA): Likewise.
      	(GOMP_TARGET_ARG_DEVICE_MASK): Likewise.
      	(GOMP_TARGET_ARG_DEVICE_ALL): Likewise.
      	(GOMP_TARGET_ARG_SUBSEQUENT_PARAM): Likewise.
      	(GOMP_TARGET_ARG_ID_MASK): Likewise.
      	(GOMP_TARGET_ARG_NUM_TEAMS): Likewise.
      	(GOMP_TARGET_ARG_THREAD_LIMIT): Likewise.
      	(GOMP_TARGET_ARG_VALUE_SHIFT): Likewise.
      	(GOMP_TARGET_ARG_HSA_KERNEL_ATTRIBUTES): Likewise.
      
      From-SVN: r232549
      Martin Jambor committed
  31. 18 Jan, 2016 2 commits
  32. 12 Jan, 2016 1 commit
  33. 04 Jan, 2016 1 commit
  34. 16 Dec, 2015 1 commit
  35. 15 Dec, 2015 1 commit
    • c-common.c (c_common_attribute_table): Handle "omp declare target link" attribute. · 4a38b02b
      gcc/c-family/
      	* c-common.c (c_common_attribute_table): Handle "omp declare target
      	link" attribute.
      gcc/
      	* cgraphunit.c (output_in_order): Do not assemble "omp declare target
      	link" variables in ACCEL_COMPILER.
      	* gimplify.c (gimplify_adjust_omp_clauses): Do not remove mapping of
      	"omp declare target link" variables.
      	* omp-low.c (scan_sharing_clauses): Do not remove mapping of "omp
      	declare target link" variables.
      	(add_decls_addresses_to_decl_constructor): For "omp declare target link"
      	variables output address of the artificial pointer instead of address of
      	the variable.  Set most significant bit of the size to mark them.
      	(pass_data_omp_target_link): New pass_data.
      	(pass_omp_target_link): New class.
      	(find_link_var_op): New static function.
      	(make_pass_omp_target_link): New function.
      	* passes.def: Add pass_omp_target_link.
      	* tree-pass.h (make_pass_omp_target_link): Declare.
      	* varpool.c (symbol_table::output_variables): Do not assemble "omp
      	declare target link" variables in ACCEL_COMPILER.
      gcc/lto/
      	* lto.c: Include stringpool.h and fold-const.h.
      	(offload_handle_link_vars): New static function.
      	(lto_main): Call offload_handle_link_vars.
      libgomp/
      	* libgomp.h (REFCOUNT_LINK): Define.
      	(struct splay_tree_key_s): Add link_key.
      	* target.c (gomp_map_vars): Treat REFCOUNT_LINK objects as not mapped.
      	Replace target address of the pointer with target address of newly
      	mapped object in the splay tree.  Set link pointer on target to the
      	device address of the mapped object.
      	(gomp_unmap_vars): Restore target address of the pointer in the splay
      	tree for REFCOUNT_LINK objects after unmapping.
      	(gomp_load_image_to_device): Set refcount to REFCOUNT_LINK for "omp
      	declare target link" objects.
      	(gomp_unload_image_from_device): Replace j with i.  Force unmap of all
      	"omp declare target link" objects, which were mapped for the image.
      	(gomp_exit_data): Restore target address of the pointer in the splay
      	tree for REFCOUNT_LINK objects after unmapping.
      	* testsuite/libgomp.c/target-link-1.c: New file.
      
      From-SVN: r231655
      Ilya Verbin committed
  36. 13 Dec, 2015 1 commit
    • cgraph.c (cgraph_node::get_untransformed_body): Pass compressed flag to lto_get_section_data. · ca834876
      	* cgraph.c (cgraph_node::get_untransformed_body): Pass compressed
      	flag to lto_get_section_data.
      	* varpool.c (varpool_node::get_constructor): Likewise.
      	* lto-section-in.c (lto_get_section_data): Add new flag decompress.
      	(lto_free_section_data): Likewise.
      	(lto_get_raw_section_data): New function.
      	(lto_free_raw_section_data): New function.
      	(copy_function_or_variable): Copy sections w/o decompressing.
      	(lto_output_decl_state_refs): Picke compressed bit.
      	* lto-streamer.h (lto_in_decl_state): New flag compressed.
      	(lto_out_decl_state): Likewise.
      	(lto_get_section_data, lto_free_section_data): Update prototypes
      	(lto_get_raw_section_data, lto_free_raw_section_data): Declare.
      	(lto_write_raw_data): Declare.
      	(lto_begin_section): Remove FIXME.
      	(lto_write_raw_data): New function.
      	(lto_write_stream): Remove FIXME.
      	(lto_new_out_decl_state): Set compressed flag.
      
      	* lto.c (lto_read_in_decl_state): Unpickle compressed bit.
      
      From-SVN: r231593
      Jan Hubicka committed