1. 07 Nov, 2018 12 commits
    • tree.c (free_lang_data_in_type): Add fld parameter; simplify return and… · 36b56cd3
      tree.c (free_lang_data_in_type): Add fld parameter; simplify return and parameter types of function and method types.
      
      
      	* tree.c (free_lang_data_in_type): Add fld parameter; simplify
      	return and parameter types of function and method types.
      	(free_lang_data_in_cgraph): Update.
      
      From-SVN: r265870
      Jan Hubicka committed
    • Fix UBSAN in postreload-gcse.c (PR rtl-optimization/87868). · 907050e3
      2018-11-07  Martin Liska  <mliska@suse.cz>
      
      	PR rtl-optimization/87868
      	* postreload-gcse.c (eliminate_partially_redundant_load): Set
      	threshold to max_count if we would overflow.
      	* profile-count.h: Make max_count a public constant.
      
      From-SVN: r265869
      Martin Liska committed
    • Fix GNU coding style (V2). · 9cfc08c0
      2018-11-07  Martin Liska  <mliska@suse.cz>
      
      	* mem-stats.h: Fix GNU coding style.
      
      From-SVN: r265868
      Martin Liska committed
    • Add support for Loongson 2K1000 processor. · 8fa1acc7
      gcc/
      	* config/mips/gs264e.md: New.
      	* config/mips/mips-cpus.def: Define gs264e.
      	* config/mips/mips-tables.opt: Regenerate.
      	* config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
      	gs264e.
      	(mips_issue_rate): Add support for gs264e.
      	(mips_multipass_dfa_lookahead): Likewise.
      	* config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
      	(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
      	(MIPS_ASE_MSA_SPEC): New.
      	(BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
      	(ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
      	(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
      	* config/mips/mips.md: Include gs264e.md.
      	(processor): Add gs264e.
      	* config/mips/mips.opt (MSA): Use Mask instead of Var.
      	* doc/invoke.texi: Add gs264e to supported architectures.
      
      From-SVN: r265867
      Chenghua Xu committed
    • Add support for Loongson 3A2000/3A3000 processor. · 659ce7cb
      gcc/
      	* config/mips/gs464e.md: New.
      	* config/mips/mips-cpus.def: Define gs464e.
      	* config/mips/mips-tables.opt: Regenerate.
      	* config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
      	gs464e.
      	(mips_issue_rate): Add support for gs464e.
      	(mips_multipass_dfa_lookahead): Likewise.
      	(mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
      	* config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
      	(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
      	(ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
      	(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
      	* config/mips/mips.md: Include gs464e.md.
      	(processor): Add gs464e.
      	* doc/invoke.texi: Add gs464e to supported architectures.
      
      From-SVN: r265866
      Chenghua Xu committed
    • Add support for Loongson 3A1000 processor. · 2b94a36d
      gcc/
      	* config/mips/loongson3a.md: Rename to ...
      	* config/mips/gs464.md: ... here.
      	* config/mips/mips-cpus.def: Define gs464; Add loongson3a
      	as an alias of gs464 processor.
      	* config/mips/mips-tables.opt: Regenerate.
      	* config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
      	instead of PROCESSOR_LOONGSON_3A.
      	(mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
      	TUNE_LOONGSON_3A.
      	(mips_option_override): Enable MMI and EXT for gs464.
      	* config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
      	Rename TUNE_LOONGSON_3A to TUNE_GS464.
      	(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
      	(ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
      	ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
      	TARGET_LOONGSON_3A.
      	* config/mips/mips.md: Include gs464.md instead of loongson3a.md.
      	(processor): Add gs464;
      	* doc/invoke.texi: Add gs464 to supported architectures.
      
      From-SVN: r265865
      Chenghua Xu committed
    • Add support for Loongson EXT2 instructions. · d6319811
      gcc/
      	* config/mips/mips-protos.h
      	(mips_loongson_ext2_prefetch_cookie): New prototype.
      	* config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
      	(mips_option_override): Enable TARGET_LOONGSON_EXT when
      	TARGET_LOONGSON_EXT2 is true.
      	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
      	__mips_loongson_ext2, __mips_loongson_ext_rev=2.
      	(ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
      	(ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
      	TARGET_LOONGSON_EXT2.
      	(ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
      	(define_insn "ctz<mode>2"): New insn pattern.
      	(define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
      	(define_insn "prefetch_indexed_<mode>"): Include
      	TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
      	* config/mips/mips.opt (-mloongson-ext2): Add option.
      	* gcc/doc/invoke.texi (-mloongson-ext2): Document.
      
      gcc/testsuite/
      	* gcc.target/mips/loongson-ctz.c: New test.
      	* gcc.target/mips/loongson-dctz.c: Likewise.
      	* gcc.target/mips/mips.exp (mips_option_groups): Add
      	-mloongson-ext2 option.
      
      From-SVN: r265864
      Chenghua Xu committed
    • Add support for Loongson EXT instructions. · 375899d9
      gcc/
      	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
      	__mips_loongson_ext.
      	(MIPS_ASE_LOONGSON_EXT_SPEC): New.
      	(BASE_DRIVER_SELF_SPECS): march=loongson3a implies
      	-mloongson-ext.
      	(ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
      	* config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
      	<u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
      	instead of TARGET_LOONGSON_3A.
      	* config/mips/mips.opt (-mloongson-ext): Add option.
      	* gcc/doc/invoke.texi (-mloongson-ext): Document.
      
      gcc/testsuite/
      	* gcc.target/mips/mips.exp (mips_option_groups): Add
      	-mloongson-ext option.
      	(mips-dg-options): Add mips_option_dependency options
      	"-mmicromips" vs "-mno-loongson-ext",
      
      From-SVN: r265863
      Chenghua Xu committed
    • Add support for Loongson MMI instructions. · 8ae8bad7
      gcc/
      	* config.gcc (extra_headers): Add loongson-mmiintrin.h.
      	* config/mips/loongson.md: Move to ...
      	* config/mips/loongson-mmi.md: here; Adjustment.
      	* config/mips/loongson.h: Move to ...
      	State as deprecated. Include loongson-mmiintrin.h for back
      	compatibility and warning.
      	* config/mips/loongson-mmiintrin.h: ... here.
      	* config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
      	mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
      	TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
      	(mips_option_override): Make sure MMI use hard float;
      	(mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
      	mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
      	mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
      	TARGET_LOONGSON_VECTORS.
      	* gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
      	(TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
      	(MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
      	(BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
      	-mloongson-mmi.
      	(SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
      	TARGET_LOONGSON_VECTORS.
      	* gcc/config/mips/mips.md (MOVE64, MOVE128): Use
      	TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
      	(Loongson MMI patterns): Include loongson-mmi.md instead of
      	loongson.md.
      	* gcc/config/mips/mips.opt (-mloongson-mmi): New option.
      	* gcc/doc/invoke.texi (-mloongson-mmi): Document.
      
      gcc/testsuite/
      	* gcc.target/mips/loongson-shift-count-truncated-1.c
      	(dg-options): Run under -mloongson-mmi option.
      	Include loongson-mmiintrin.h instead of loongson.h.
      	* gcc.target/mips/loongson-simd.c: Likewise.
      	* gcc.target/mips/mips.exp (mips_option_groups): Add
      	-mloongson-mmi option.
      	(mips-dg-options): Add mips_option_dependency options "-mips16" vs
      	"-mno-loongson-mmi", "-mmicromips" vs "-mno-loongson-mmi",
      	"-msoft-float" vs "-mno-loongson-mmi".
      	(mips-dg-init): Add -mloongson-mmi option.
      	* lib/target-supports.exp: Rename check_mips_loongson_hw_available
      	to check_mips_loongson_mmi_hw_available.
      	Rename check_effective_target_mips_loongson_runtime to
      	check_effective_target_mips_loongson_mmi_runtime.
      	(check_effective_target_vect_int): Use mips_loongson_mmi instead
      	of mips_loongson when check et-is-effective-target.
      	(add_options_for_mips_loongson_mmi): New proc.
      	Rename check_effective_target_mips_loongson to
      	check_effective_target_mips_loongson_mmi.
      	(check_effective_target_vect_shift,
      	check_effective_target_whole_vector_shift,
      	check_effective_target_vect_no_int_min_max,
      	check_effective_target_vect_no_align,
      	check_effective_target_vect_short_mult,
      	check_vect_support_and_set_flags):Use mips_loongson_mmi instead
      	of mips_loongson when check et-is-effective-target.
      
      From-SVN: r265862
      Chenghua Xu committed
    • re PR lto/87906 (ICE in tree check: expected block, have function_decl in… · 50258c4d
      re PR lto/87906 (ICE in tree check: expected block, have function_decl in block_ultimate_origin, at tree.c:12326 since r264734)
      
      2018-11-07  Richard Biener  <rguenther@suse.de>
      
      	PR lto/87906
      	* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
      	BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
      
      	* g++.dg/lto/pr87906_0.C: New testcase.
      	* g++.dg/lto/pr87906_1.C: Likewise.
      
      From-SVN: r265861
      Richard Biener committed
    • [PR87874] avoid const-wide-int subreg in LRA · 59193b1b
      Just like CONST_INT, CONST_WIDE_INT is VOIDmode, so LRA might be
      tempted to build a SUBREG to "convert" it to the wanted mode.  That's
      no use.  Test for CONST_SCALAR_INT_P instead of CONST_INT_P so that we
      skip the subreg creation for both.
      
      for  gcc/ChangeLog
      
      	PR rtl-optimization/87874
      	* lra.c (lra_substitute_pseudo): Do not create a subreg for
      	const wide ints.
      
      for  gcc/testsuite/ChangeLog
      
      	PR rtl-optimization/87874
      	* gcc.dg/pr87874.c: New.
      
      From-SVN: r265860
      Alexandre Oliva committed
    • Daily bump. · 513c1106
      From-SVN: r265856
      GCC Administrator committed
  2. 06 Nov, 2018 26 commits
    • Implement std::pmr::unsynchronized_pool_resource · 852a971c
      	Implement std::pmr::unsynchronized_pool_resource
      	* config/abi/pre/gnu.ver: Add new symbols.
      	* include/std/memory_resource (std::pmr::__pool_resource): New class.
      	(std::pmr::unsynchronized_pool_resource): New class.
      	* src/c++17/Makefile.am: Add -fimplicit-templates to flags for
      	memory_resource.cc
      	* src/c++17/Makefile.in: Regenerate.
      	* src/c++17/memory_resource.cc (bitset, chunk, big_block): New
      	internal classes.
      	(__pool_resource::_Pool): Define new class.
      	(munge_options, pool_index, select_num_pools): New internal functions.
      	(__pool_resource::__pool_resource, __pool_resource::~__pool_resource)
      	(__pool_resource::allocate, __pool_resource::deallocate)
      	(__pool_resource::_M_alloc_pools): Define member functions.
      	(unsynchronized_pool_resource::unsynchronized_pool_resource)
      	(unsynchronized_pool_resource::~unsynchronized_pool_resource)
      	(unsynchronized_pool_resource::release)
      	(unsynchronized_pool_resource::_M_find_pool)
      	(unsynchronized_pool_resource::do_allocate)
      	(unsynchronized_pool_resource::do_deallocate): Define member
      	functions.
      	* testsuite/20_util/unsynchronized_pool_resource/allocate.cc: New
      	test.
      	* testsuite/20_util/unsynchronized_pool_resource/is_equal.cc: New
      	test.
      	* testsuite/20_util/unsynchronized_pool_resource/options.cc: New
      	test.
      	* testsuite/20_util/unsynchronized_pool_resource/release.cc: New
      	test.
      
      From-SVN: r265853
      Jonathan Wakely committed
    • rs6000.md (bswap<mode>2): Force address into register if not in indexed or indirect form. · dd1501c5
      2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
      
      	* config/rs6000/rs6000.md (bswap<mode>2): Force address into register
      	if not in indexed or indirect form.
      	(bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
      	(bswap<mode>2_store): Ditto.
      
      From-SVN: r265852
      Aaron Sawdey committed
    • re PR libstdc++/87872 (debug list::splice should not call _M_transfer_from_if on self-splices) · cdc71993
      2018-11-06  John Bytheway  <jbytheway@gmail.com>
      
      	PR libstdc++/87872
      	* include/debug/safe_sequence.tcc
      	(_Safe_sequence<>::_M_transfer_from_if): Skip transfer to self.
      
      From-SVN: r265851
      John Bytheway committed
    • aarch64 - Set the mode for the unspec in speculation_tracker insn. · 996bea89
      The speculation tracker insn in my recent patch set for CVE-2017-5753
      was missing a mode on the UNSPEC.  Although this didn't break the
      build, it did cause an unnecessary warning from the MD parsing
      mechanism that I missed at the time.  It's a trivial fix, as follows:
      
      	* config/aarch64/aarch64.md (speculation_tracker): Set the mode for
      	the UNSPEC.
      
      From-SVN: r265849
      Richard Earnshaw committed
    • re PR tree-optimization/86850 (ubsan: runtime error: member call on null pointer) · 3eb63272
      2018-11-06  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/86850
      	* vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
      	instead of src.m_vec.
      
      From-SVN: r265848
      Richard Biener committed
    • tree.c (fld_simplified_type_name): Break out form ... · 1b62186c
      
      	* tree.c (fld_simplified_type_name): Break out form ...
      	(free_lang_data_in_type): ... here.
      	(fld_type_variant_equal_p): Use it.
      
      From-SVN: r265847
      Jan Hubicka committed
    • Fix D compilation on Solaris · cdb3f2f4
      	* config/default-d.c: Include memmodel.h.
      
      	* config/sol2-d.c: New file.
      	* config/t-sol2 (sol2-d.o): New rule.
      	* config.gcc <*-*-solaris2*>: Set d_target_objs,
      	target_has_targetdm.
      
      From-SVN: r265846
      Rainer Orth committed
    • tree.c (fld_type_variant): Also copy alignment; be sure that new variant is equal. · f8d69798
      
      	* tree.c (fld_type_variant): Also copy alignment; be sure that
      	new variant is equal.
      
      From-SVN: r265845
      Jan Hubicka committed
    • S/390: Introduce relative_long attribute · 14cfceb7
      In order to properly fix PR87762, we need to distinguish between
      instructions which support relative addressing and instructions which
      don't.  We could check whether the existing "type" attribute is equal to
      "larl", but there are notable exceptions (lrl, for example), and
      changing them makes scheduling worse on z10.  We could also check
      whether the existing "op_type" attribute is equal to "RIL-b" or "RIL-c".
      However, adding a new attribute provides more flexibility, since we
      don't depend idiosyncrasies which might be introduced into PoP in the
      future.
      
      gcc/ChangeLog:
      
      2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	PR target/87762
      	* config/s390/s390.md: Add relative_long attribute.
      
      From-SVN: r265844
      Ilya Leoshkevich committed
    • S/390: Accept cdb in load-and-test-fp-1 testcase · 7307cd25
      The compiler now generates cdb instead of cdbr for comparison with 0.0,
      which looks like an improvement to me.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* gcc.target/s390/load-and-test-fp-1.c: Accept cdb.
      
      From-SVN: r265843
      Ilya Leoshkevich committed
    • 2018-11-06 Chung-Lin Tang <cltang@codesourcery.com> · 58168bbf
      	Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
      
      	libgomp/
      	* oacc-mem.c (memcpy_tofrom_device): New function, combined from
      	acc_memcpy_to/from_device functions, now with async parameter.
      	(acc_memcpy_to_device): Modify to use memcpy_tofrom_device.
      	(acc_memcpy_from_device): Likewise.
      	(acc_memcpy_to_device_async): New API function.
      	(acc_memcpy_from_device_async): Likewise.
      	(present_create_copy): Add async parameter and async setting/unsetting.
      	(acc_create): Adjust present_create_copy call.
      	(acc_copyin): Likewise.
      	(acc_present_or_create): Likewise.
      	(acc_present_or_copyin): Likewise.
      	(acc_create_async): New API function.
      	(acc_copyin_async): New API function.
      	(delete_copyout): Add async parameter and async setting/unsetting.
      	(acc_delete): Adjust delete_copyout call.
      	(acc_copyout): Likewise.
      	(acc_delete_async): New API function.
      	(acc_copyout_async): Likewise.
      	(update_dev_host): Add async parameter and async setting/unsetting.
      	(acc_update_device): Adjust update_dev_host call.
      	(acc_update_self): Likewise.
      	(acc_update_device_async): New API function.
      	(acc_update_self_async): Likewise.
      	* openacc.h (acc_copyin_async): Declare new API function.
      	(acc_create_async): Likewise.
      	(acc_copyout_async): Likewise.
      	(acc_delete_async): Likewise.
      	(acc_update_device_async): Likewise.
      	(acc_update_self_async): Likewise.
      	(acc_memcpy_to_device_async): Likewise.
      	(acc_memcpy_from_device_async): Likewise.
      	* openacc_lib.h (acc_copyin_async_32_h): New subroutine.
      	(acc_copyin_async_64_h): New subroutine.
      	(acc_copyin_async_array_h): New subroutine.
      	(acc_create_async_32_h): New subroutine.
      	(acc_create_async_64_h): New subroutine.
      	(acc_create_async_array_h): New subroutine.
      	(acc_copyout_async_32_h): New subroutine.
      	(acc_copyout_async_64_h): New subroutine.
      	(acc_copyout_async_array_h): New subroutine.
      	(acc_delete_async_32_h): New subroutine.
      	(acc_delete_async_64_h): New subroutine.
      	(acc_delete_async_array_h): New subroutine.
      	(acc_update_device_async_32_h): New subroutine.
      	(acc_update_device_async_64_h): New subroutine.
      	(acc_update_device_async_array_h): New subroutine.
      	(acc_update_self_async_32_h): New subroutine.
      	(acc_update_self_async_64_h): New subroutine.
      	(acc_update_self_async_array_h): New subroutine.
      	* openacc.f90 (acc_copyin_async_32_h): New subroutine.
      	(acc_copyin_async_64_h): New subroutine.
      	(acc_copyin_async_array_h): New subroutine.
      	(acc_create_async_32_h): New subroutine.
      	(acc_create_async_64_h): New subroutine.
      	(acc_create_async_array_h): New subroutine.
      	(acc_copyout_async_32_h): New subroutine.
      	(acc_copyout_async_64_h): New subroutine.
      	(acc_copyout_async_array_h): New subroutine.
      	(acc_delete_async_32_h): New subroutine.
      	(acc_delete_async_64_h): New subroutine.
      	(acc_delete_async_array_h): New subroutine.
      	(acc_update_device_async_32_h): New subroutine.
      	(acc_update_device_async_64_h): New subroutine.
      	(acc_update_device_async_array_h): New subroutine.
      	(acc_update_self_async_32_h): New subroutine.
      	(acc_update_self_async_64_h): New subroutine.
      	(acc_update_self_async_array_h): New subroutine.
      	* libgomp.map (OACC_2.5): Add acc_copyin_async*, acc_copyout_async*,
      	acc_copyout_finalize_async*, acc_create_async*, acc_delete_async*,
      	acc_delete_finalize_async*, acc_memcpy_from_device_async*,
      	acc_memcpy_to_device_async*, acc_update_device_async*, and
      	acc_update_self_async* entries.
      	* testsuite/libgomp.oacc-c-c++-common/lib-94.c: New test.
      	* testsuite/libgomp.oacc-c-c++-common/lib-95.c: New test.
      	* testsuite/libgomp.oacc-fortran/lib-16.f90: New test.
      
      From-SVN: r265842
      Chung-Lin Tang committed
    • ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING. · bd78c6d5
      
      	* ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
      	* lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
      	* tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
      	stream TYPE_NEEDS_CONSTRUCTING.
      	* tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
      	* tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
      
      From-SVN: r265841
      Jan Hubicka committed
    • tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb dump-scope ... · bfb9d798
      2018-11-06  Richard Biener  <rguenther@suse.de>
      
      	* tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
      	dump-scope ...
      	(vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
      
      From-SVN: r265840
      Richard Biener committed
    • msp430.h (REG_CLASS_CONTENTS): Add R0 to REG_CLASS_CONTENTS[GEN_REGS]. · f1b0a1dd
      2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
      
      	* gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
      	REG_CLASS_CONTENTS[GEN_REGS].
      	(REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
      
      	* gcc/testsuite/gcc.target/msp430/special-regs.c: New test.
      
      From-SVN: r265839
      Jozef Lawrynowicz committed
    • Enable libsanitizer on Solaris (PR sanitizer/80953) · aaabfd71
      	gcc:
      	PR sanitizer/80953
      	* config/sol2.h (ASAN_CC1_SPEC): Define.
      	(LD_WHOLE_ARCHIVE_OPTION): Define.
      	(LD_NO_WHOLE_ARCHIVE_OPTION): Define.
      	(ASAN_REJECT_SPEC): Provide default.
      	(LIBASAN_EARLY_SPEC): Define.
      	(LIBTSAN_EARLY_SPEC): Define.
      	(LIBLSAN_EARLY_SPEC): Define.
      	* config/i386/sol2.h (CC1_SPEC): Redefine.
      	(ASAN_REJECT_SPEC): Define.
      
      	* config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
      	(TARGET_ASAN_SHADOW_OFFSET): Define.
      	(sparc_asan_shadow_offset): New function.
      	* config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
      	(ASAN_REJECT_SPEC): Define.
      
      	gcc/testsuite:
      	PR sanitizer/80953
      	* c-c++-common/asan/alloca_loop_unpoisoning.c: Require alloca
      	support.
      	(foo): Use __builtin_alloca.
      
      	libsanitizer:
      	PR sanitizer/80953
      	* configure.tgt (sparc*-*-solaris2.11*): Enable.
      	(x86_64-*-solaris2.11* | i?86-*-solaris2.11*): Enable.
      
      From-SVN: r265837
      Rainer Orth committed
    • Cherry-pick Solaris sanitizer fixes (PR sanitizer/80953) · 0b5ccc80
      	PR sanitizer/80953
      	* sanitizer_common/sanitizer_internal_defs.h,
      	sanitizer_common/sanitizer_platform_limits_solaris.h,
      	sanitizer_common/sanitizer_procmaps_solaris.cc,
      	sanitizer_common/sanitizer_solaris.cc: Cherry-pick compiler-rt
      	revision 346153.
      	* sanitizer_common/sanitizer_stacktrace.h,
      	sanitizer_common/sanitizer_stacktrace_sparc.cc: Cherry-pick
      	compiler-rt revision 346155.
      
      From-SVN: r265836
      Rainer Orth committed
    • tbaa-1.c: New testcase. · 2a98b4bf
      
      	* gcc.dg/lto/tbaa-1.c: New testcase.
      
      	* tree.c (fld_type_variant): Copy canonical type.
      	(fld_incomplete_type_of): Check that canonical types looks sane;
      	copy canonical type.
      	(verify_type): Accept when incomplete type has complete canonical type.
      
      From-SVN: r265835
      Jan Hubicka committed
    • tree.c (free_lang_data): Reset overwite_assembler_name... · 23cab40d
      	* tree.c (free_lang_data): Reset overwite_assembler_name,
      	print_xnode, print_decl, print_type and print_identifier of
      	langhooks.
      
      From-SVN: r265834
      Jan Hubicka committed
    • re PR tree-optimization/87889 (CPU2000 177.mesa failed to build) · d8564d45
      2018-11-06  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/87889
      	* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
      	Do nothing if old and new arg are the same
      
      	* gcc.dg/pr87894.c: New testcase.
      
      From-SVN: r265833
      Richard Biener committed
    • S/390: Fix PR87723 · 8c21b0d1
      gcc/ChangeLog:
      
      2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/87723
      	* config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
      	attributes for operands 3 and 4.
      
      gcc/testsuite/ChangeLog:
      
      2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/87723
      	* gcc.target/s390/pr87723.c: New test.
      
      From-SVN: r265832
      Andreas Krebbel committed
    • re PR ada/81878 (--disable-bootstrap --enable-languages=ada fails) · d24c3ef2
      	PR ada/81878
      	Revert
      	2018-10-29  Tamar Christina  <tamar.christina@arm.com>
      
      	PR ada/81878
      	* Makefile.in (TOOLS_FLAGS_TO_PASS_NATIVE): Add -B ../../.
      
      	2017-08-17  Richard Biener  <rguenther@suse.de>
      
      	PR ada/81878
      	* Makefile.in (CXX_LFLAGS): Remove.
      	(TOOLS_FLAGS_TO_PASS_NATIVE): Pass $(CXX) as CXX.
      	(TOOLS_FLAGS_TO_PASS_RE): Likewise.
      
      From-SVN: r265830
      Eric Botcazou committed
    • re PR middle-end/18041 (OR of two single-bit bitfields is inefficient) · ffe5a586
      2018-11-06  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/18041
      	* simplify-rtx.c (simplify_binary_operation_1): Add pattern
      	matching bitfield insertion.
      
      	* gcc.target/i386/pr18041-1.c: New testcase.
      	* gcc.target/i386/pr18041-2.c: Likewise.
      
      From-SVN: r265829
      Richard Biener committed
    • gOlogy: fix debug binds in auto-inc-dec · 91c03124
      As auto_inc_dec pass combines incs and mems from different insns, it
      often causes regs to temporarily hold a value different from the one
      it would before the transformation.  Debug insns within that range
      would therefore end up binding to the wrong expression after the
      transformation.
      
      This patch adjusts debug binds in the affected range.
      
      for  gcc/ChangeLog
      
      	* auto-inc-dec.c: Include valtrack.h.  Improve comments.
      	(reg_next_debug_use): New.
      	(attempt_change): Propagate adjusted expression into affected
      	debug insns.
      	(merge_in_block): Track uses in debug insns.
      	(pass_inc_dec::execute): Allocate and release
      	reg_next_debug_use.
      
      From-SVN: r265828
      Alexandre Oliva committed
    • avx512fintrin.h: Update VFIXUPIMM* intrinsics. · ce2ad8cc
      gcc/
      2018-11-06 Wei Xiao <wei3.xiao@intel.com>
      
      	* config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
      	(_mm512_fixupimm_round_pd): Update parameters and builtin.
      	(_mm512_maskz_fixupimm_round_pd): Ditto.
      	(_mm512_fixupimm_round_ps): Ditto.
      	(_mm512_maskz_fixupimm_round_ps): Ditto.
      	(_mm_fixupimm_round_sd): Ditto.
      	(_mm_maskz_fixupimm_round_sd): Ditto.
      	(_mm_fixupimm_round_ss): Ditto.
      	(_mm_maskz_fixupimm_round_ss): Ditto.
      	(_mm512_fixupimm_pd): Ditto.
      	(_mm512_maskz_fixupimm_pd): Ditto.
      	(_mm512_fixupimm_ps): Ditto.
      	(_mm512_maskz_fixupimm_ps): Ditto.
      	(_mm_fixupimm_sd): Ditto.
      	(_mm_maskz_fixupimm_sd): Ditto.
      	(_mm_fixupimm_ss): Ditto.
      	(_mm_maskz_fixupimm_ss): Ditto.
      	(_mm512_mask_fixupimm_round_pd): Update builtin.
      	(_mm512_mask_fixupimm_round_ps): Ditto.
      	(_mm_mask_fixupimm_round_sd): Ditto.
      	(_mm_mask_fixupimm_round_ss): Ditto.
      	(_mm512_mask_fixupimm_pd): Ditto.
      	(_mm512_mask_fixupimm_ps): Ditto.
      	(_mm_mask_fixupimm_sd): Ditto.
      	(_mm_mask_fixupimm_ss): Ditto.
      	* config/i386/avx512vlintrin.h:
      	(_mm256_fixupimm_pd): Update parameters and builtin.
      	(_mm256_maskz_fixupimm_pd): Ditto.
      	(_mm256_fixupimm_ps): Ditto.
      	(_mm256_maskz_fixupimm_ps): Ditto.
      	(_mm_fixupimm_pd): Ditto.
      	(_mm_maskz_fixupimm_pd): Ditto.
      	(_mm_fixupimm_ps): Ditto.
      	(_mm_maskz_fixupimm_ps): Ditto.
      	(_mm256_mask_fixupimm_pd): Update builtin.
      	(_mm256_mask_fixupimm_ps): Ditto.
      	(_mm_mask_fixupimm_pd): Ditto.
      	(_mm_mask_fixupimm_ps): Ditto.
      	* config/i386/i386-builtin-types.def: Add new types and remove useless ones.
      	* config/i386/i386-builtin.def: Update builtin definitions.
      	* config/i386/i386.c: Handle new builtin types and remove useless ones.
      	* config/i386/sse.md: Update VFIXUPIMM* patterns.
      	(<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
      	(<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
      	(<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
      	(avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
      	(avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
      	(avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
      	* config/i386/subst.md:
      	(round_saeonly_sd_mask_operand4): Add new subst_attr.
      	(round_saeonly_sd_mask_op4): Ditto.
      	(round_saeonly_expand_operand5): Ditto.
      	(round_saeonly_expand): Update.
      
      gcc/testsuite/
      2018-11-06 Wei Xiao <wei3.xiao@intel.com>
      
      	* gcc.target/i386/avx-1.c: Update tests for VFIXUPIMM* intrinsics.
      	* gcc.target/i386/avx512f-vfixupimmpd-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmpd-2.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmps-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmsd-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmss-1.c: Ditto.
      	* gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto.
      	* gcc.target/i386/avx512vl-vfixupimmpd-1.c: Ditto.
      	* gcc.target/i386/avx512vl-vfixupimmps-1.c: Ditto.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-14.c: Ditto.
      	* gcc.target/i386/sse-22.c: Ditto.
      	* gcc.target/i386/sse-23.c: Ditto.
      	* gcc.target/i386/testimm-10.c: Ditto.
      	* gcc.target/i386/testround-1.c: Ditto.
      
      From-SVN: r265827
      Wei Xiao committed
    • Daily bump. · 40228b24
      From-SVN: r265826
      GCC Administrator committed
  3. 05 Nov, 2018 2 commits
    • gcc: xtensa: don't force PIC for uclinux target · 3cd732e5
      xtensa-uclinux uses bFLT executable file format that cannot relocate
      fields representing offsets from data to code. C++ objects built as PIC
      use offsets to encode FDE structures. As a result C++ exception handling
      doesn't work correctly on xtensa-uclinux. Don't use PIC by default on
      xtensa-uclinux.
      
      gcc/
      2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
      
      	* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
      
      From-SVN: r265823
      Max Filippov committed
    • Update most of libquadmath/math/ from glibc, automate update (PR libquadmath/68686). · 4239f144
      libquadmath sources are mostly based on glibc sources at present, but
      derived from them by a manual editing / substitution process and with
      subsequent manual merges.  The manual effort involved in merges means
      they are sometimes incomplete and long-delayed.
      
      Since libquadmath was first created, glibc's support for this format
      has undergone significant changes so that it can also be used in glibc
      to provide *f128 functions for the _Float128 type from TS 18661-3.
      This makes it significantly easier to use it for libquadmath in a more
      automated fashion, since glibc has a float128_private.h header that
      redefines many identifiers as macros as needed for building *f128
      functions.
      
      Simply using float128_private.h directly in libquadmath, with
      unmodified glibc sources except for changing function names in that
      one header to be *q instead of *f128, would be tricky, given its
      dependence on lots of other glibc-internal headers (whereas
      libquadmath supports non-glibc systems), and also given how some libm
      functions in glibc are built from type-generic templates using a
      further set of macros rather than from separate function
      implementations for each type.
      
      So instead this patch adds a script update-quadmath.py to convert
      glibc sources into libquadmath ones, and the script reads
      float128_private.h to identify many of the substitutions it should
      make.  quadmath-imp.h is updated with various new internal
      definitions, taken from glibc as needed; this is the main place
      expected to need updating manually when subsequent merges from glibc
      are done using the script.  No attempt is made to make the script
      output match the details of existing formatting, although the
      differences are of a size that makes a rough comparison (ignoring
      whitespace) possible.
      
      Two new public interfaces are added to libquadmath, exp2q and
      issignalingq, at a new QUADMATH_1.2 symbol version, since those
      interfaces are used internally by some of the glibc sources being
      merged into libquadmath; although there is a new symbol version, no
      change however is made to the libtool version in the libtool-version
      file.  Although there are various other interfaces now in glibc libm
      but not in libquadmath, this patch does nothing to add such interfaces
      (although adding many of them would in fact be easy to do, given the
      script).
      
      One internal file (not providing any public interfaces),
      math/isinf_nsq.c, is removed, as no longer used by anything in
      libquadmath after the merge.
      
      Conditionals in individual source files on <fenv.h> availability or
      features are moved into quadmath-imp.h (providing trivial macro
      versions of the functions if real implementations aren't available),
      to simplify the substitutions in individual source files.  Note
      however that I haven't tested for any configurations lacking <fenv.h>,
      so further changes could well be needed there.
      
      Two files in libquadmath/math/ are based on glibc sources but not
      updated in this patch: fmaq.c and rem_pio2q.c.  Both could be updated
      after further changes to the script (and quadmath-imp.h as needed); in
      the case of rem_pio2q.c, based on two separate glibc source files,
      those separate files would naturally be split out into separate
      libquadmath source files in the process (as done in this patch with
      expq_table.h and tanq_kernel.c, where previously two glibc source
      files had been merged into one libquadmath source file).  complex.c,
      nanq.c and sqrtq.c are not based on glibc sources (though four of the
      (trivial) functions in complex.c could readily be replaced by instead
      using the four corresponding files from glibc, if desired).
      
      libquadmath also has printf/ and strtod/ sources based on glibc, also
      mostly not updated for a long time.  Again the script could no doubt
      be made to generate those automatically, although that would be a
      larger change (effectively some completely separate logic in the
      script, not sharing much if anything with the existing code).
      
      Bootstrapped with no regressions on x86_64-pc-linux-gnu.
      
      	PR libquadmath/68686
      	* Makefile.am: (libquadmath_la_SOURCES): Remove math/isinf_nsq.c.
      	Add math/exp2q.c math/issignalingq.c math/lgammaq_neg.c
      	math/lgammaq_product.c math/tanq_kernel.c math/tgammaq_product.c
      	math/casinhq_kernel.c.
      	* Makefile.in: Regenerate.
      	* libquadmath.texi (exp2q, issignalingq): Document.
      	* quadmath-imp.h: Include <errno.h>, <limits.h>, <stdbool.h> and
      	<fenv.h>.
      	(HIGH_ORDER_BIT_IS_SET_FOR_SNAN, FIX_FLT128_LONG_CONVERT_OVERFLOW)
      	(FIX_FLT128_LLONG_CONVERT_OVERFLOW, __quadmath_kernel_tanq)
      	(__quadmath_gamma_productq, __quadmath_gammaq_r)
      	(__quadmath_lgamma_negq, __quadmath_lgamma_productq)
      	(__quadmath_lgammaq_r, __quadmath_kernel_casinhq, mul_splitq)
      	(math_check_force_underflow_complex, __glibc_likely)
      	(__glibc_unlikely, struct rm_ctx, SET_RESTORE_ROUNDF128)
      	(libc_feholdsetround_ctx, libc_feresetround_ctx): New.
      	(feraiseexcept, fenv_t, feholdexcept, fesetround, feupdateenv)
      	(fesetenv, fetestexcept, feclearexcept): Define if not supported
      	through <fenv.h>.
      	(__quadmath_isinf_nsq): Remove.
      	* quadmath.h (exp2q, issignalingq): New.
      	* quadmath.map (QUADMATH_1.2): New.
      	* quadmath_weak.h (exp2q, issignalingq): New.
      	* update-quadmath.py: New file.
      	* math/isinf_nsq.c: Remove file.
      	* math/casinhq_kernel.c, math/exp2q.c, math/expq_table.h,
      	math/issignalingq.c, math/lgammaq_neg.c, math/lgammaq_product.c,
      	math/tanq_kernel.c, math/tgammaq_product.c: New files.  Generated
      	from glibc sources with update-quadmath.py.
      	* math/acoshq.c, math/acosq.c, math/asinhq.c, math/asinq.c,
      	math/atan2q.c, math/atanhq.c, math/atanq.c, math/cacoshq.c,
      	math/cacosq.c, math/casinhq.c, math/casinq.c, math/catanhq.c,
      	math/catanq.c, math/cbrtq.c, math/ccoshq.c, math/ceilq.c,
      	math/cexpq.c, math/cimagq.c, math/clog10q.c, math/clogq.c,
      	math/conjq.c, math/copysignq.c, math/coshq.c, math/cosq.c,
      	math/cosq_kernel.c, math/cprojq.c, math/crealq.c, math/csinhq.c,
      	math/csinq.c, math/csqrtq.c, math/ctanhq.c, math/ctanq.c,
      	math/erfq.c, math/expm1q.c, math/expq.c, math/fabsq.c,
      	math/fdimq.c, math/finiteq.c, math/floorq.c, math/fmaxq.c,
      	math/fminq.c, math/fmodq.c, math/frexpq.c, math/hypotq.c,
      	math/ilogbq.c, math/isinfq.c, math/isnanq.c, math/j0q.c,
      	math/j1q.c, math/jnq.c, math/ldexpq.c, math/lgammaq.c,
      	math/llrintq.c, math/llroundq.c, math/log10q.c, math/log1pq.c,
      	math/log2q.c, math/logbq.c, math/logq.c, math/lrintq.c,
      	math/lroundq.c, math/modfq.c, math/nearbyintq.c,
      	math/nextafterq.c, math/powq.c, math/remainderq.c, math/remquoq.c,
      	math/rintq.c, math/roundq.c, math/scalblnq.c, math/scalbnq.c,
      	math/signbitq.c, math/sincos_table.c, math/sincosq.c,
      	math/sincosq_kernel.c, math/sinhq.c, math/sinq.c,
      	math/sinq_kernel.c, math/tanhq.c, math/tanq.c, math/tgammaq.c,
      	math/truncq.c, math/x2y2m1q.c: Regenerate from glibc sources with
      	update-quadmath.py.
      
      From-SVN: r265822
      Joseph Myers committed