Commit Graph

135768 Commits

Author SHA1 Message Date
Jonathan Wakely
d31b87976f re PR libstdc++/60940 (general operations on atomic types do not work with atomic integral typedefs)
PR libstdc++/60940
	* include/bits/atomic_base.h: Remove atomic integral typedefs as
	synonyms for __atomic_base<int> etc.
	* include/std/atomic: Make atomic_int a synonym for atomic<int> and
	likewise for all atomic integral types.
	* testsuite/29_atomics/atomic_integral/cons/copy_list.cc: New.
	* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.

From-SVN: r219790
2015-01-17 01:23:28 +00:00
Maxim Kuvyrkov
340c79045e Model cache auto-prefetcher in scheduler
* config/arm/arm-protos.h (struct tune_params): New field
	sched_autopref_queue_depth.
	* config/arm/arm.c (sched-int.h): Include header.
	(arm_first_cycle_multipass_dfa_lookahead_guard,)
	(TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD): Define hook.
	(arm_slowmul_tune, arm_fastmul_tune, arm_strongarm_tune,)
	(arm_xscale_tune, arm_9e_tune, arm_v6t2_tune, arm_cortex_tune,)
	(arm_cortex_a8_tune, arm_cortex_a7_tune, arm_cortex_a15_tune,)
	(arm_cortex_a53_tune, arm_cortex_a57_tune, arm_xgene1_tune,)
	(arm_cortex_a5_tune, arm_cortex_a9_tune, arm_cortex_a12_tune,)
	(arm_v7m_tune, arm_cortex_m7_tune, arm_v6m_tune, arm_fa726te_tune):
	Specify sched_autopref_queue_depth value.  Enabled for A15 and A57.
	* config/arm/t-arm (arm.o): Update.
	* haifa-sched.c (update_insn_after_change): Update.
	(rank_for_schedule): Use auto-prefetcher model, if requested.
	(autopref_multipass_init): New static function.
	(autopref_rank_for_schedule): New rank_for_schedule heuristic.
	(autopref_multipass_dfa_lookahead_guard_started_dump_p): New static
	variable for debug dumps.
	(autopref_multipass_dfa_lookahead_guard_1): New static helper function.
	(autopref_multipass_dfa_lookahead_guard): New global function that
	implements TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD hook.
	(init_h_i_d): Update.
	* params.def (PARAM_SCHED_AUTOPREF_QUEUE_DEPTH): New tuning knob.
	* sched-int.h (enum autopref_multipass_data_status): New const enum.
	(autopref_multipass_data_): Structure for auto-prefetcher data.
	(autopref_multipass_data_def, autopref_multipass_data_t): New typedefs.
	(struct _haifa_insn_data:autopref_multipass_data): New field.
	(INSN_AUTOPREF_MULTIPASS_DATA): New access macro.
	(autopref_multipass_dfa_lookahead_guard): Declare.

From-SVN: r219789
2015-01-17 01:06:43 +00:00
Maxim Kuvyrkov
71acd4776f Handle SCRATCH in decompose_address
* rtlanal.c (get_base_term): Handle SCRATCH.

From-SVN: r219788
2015-01-17 01:06:29 +00:00
Maxim Kuvyrkov
d03f7e440b Enable max_issue for AArch32 and AArch64
Enable max_issue for AArch32 and AArch64
	* config/aarch64/aarch64.c
	(aarch64_sched_first_cycle_multipass_dfa_lookahead): Implement hook.
	(TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD): Define.
	* config/arm/arm.c
	(arm_first_cycle_multipass_dfa_lookahead): Implement hook.
	(TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD): Define.

From-SVN: r219787
2015-01-17 01:06:17 +00:00
Alan Modra
25d1a5a74d cprop.c (do_local_cprop): Disallow replacement of fixed hard registers.
* cprop.c (do_local_cprop): Disallow replacement of fixed
	hard registers.

From-SVN: r219786
2015-01-17 11:11:52 +10:30
Jonathan Wakely
3ecec1eff7 re PR libstdc++/56785 (std::tuple of two elements does not apply empty base class optimization when one of its elements is a std::tuple with two elements)
PR libstdc++/56785
	* include/std/tuple (_Tuple_impl): Remove zero-element specialization
	and define one-element specialization.
	* testsuite/20_util/tuple/56785.cc: New.

From-SVN: r219785
2015-01-17 00:21:41 +00:00
GCC Administrator
3c16c4238b Daily bump.
From-SVN: r219784
2015-01-17 00:16:37 +00:00
Jonathan Wakely
c23ccace5c 1.cc: Remove unused header.
* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
	Remove unused header.
	* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
	Likewise.
	* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
	Likewise.

From-SVN: r219781
2015-01-17 00:12:50 +00:00
Jonathan Wakely
96d8c147aa locale_conv.h (wstring_convert, [...]): New.
* include/bits/locale_conv.h (wstring_convert, wbuffer_convert): New.
	* include/std/locale: Include new header.
	* include/Makefile.am: Add it.
	* include/Makefile.in: Regenerate.
	* testsuite/22_locale/conversions/buffer/requirements/typedefs.cc: New.
	* testsuite/22_locale/conversions/string/1.cc: New.
	* testsuite/22_locale/conversions/string/2.cc: New.
	* testsuite/22_locale/conversions/string/requirements/typedefs.cc: New.
	* testsuite/22_locale/conversions/string/requirements/typedefs-2.cc:
	New.

From-SVN: r219780
2015-01-16 23:38:48 +00:00
Jonathan Wakely
28af1fb39d Implement C++11 <codecvt> header.
* config/abi/pre/gnu.ver: Export new symbols.
	* include/Makefile.am: Add codecvt.
	* include/Makefile.in: Regenerate.
	* include/std/codecvt: New header.
	* src/c++11/codecvt.cc (__codecvt_utf8_base, __codecvt_utf16_base,
	__codecvt_utf8_utf16_base): Define specializations.
	* testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc: New.
	* testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc: New.
	* testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
	New.

From-SVN: r219779
2015-01-16 23:38:35 +00:00
Ian Lance Taylor
0f59f5c120 runtime: Add __sparc__ case for SETCONTEXT_CLOBBERS_TLS.
The glibc setcontext incorrectly modifies %g7 on SPARC.

From Richard Henderson.

From-SVN: r219778
2015-01-16 23:23:31 +00:00
Ian Lance Taylor
20780a006f testing/quick: Revert Alpha specific change.
No longer needed now that libffi supports complex types.

From-SVN: r219777
2015-01-16 23:19:20 +00:00
Richard Henderson
38bf819a5f compiler, reflect, runtime: Use static chain for closures.
Change from using __go_set_closure to passing the closure
value in the static chain field.  Uses new backend support for
setting the closure chain in a call from C via
__builtin_call_with_static_chain.  Uses new support in libffi
for Go closures.

The old architecture specific support for reflect.MakeFunc is
removed, replaced by the libffi support.

All work done by Richard Henderson.

	* go-gcc.cc (Gcc_backend::call_expression): Add chain_expr argument.
	(Gcc_backend::static_chain_variable): New method.

From-SVN: r219776
2015-01-16 22:58:53 +00:00
Jan Hubicka
21cb351825 invoke.texi (--param early-inlining-insns): Update default value.
* doc/invoke.texi (--param early-inlining-insns): Update default value.
	* params.def (PARAM_EARLY_INLINING_INSNS): Set to 14.

From-SVN: r219775
2015-01-16 22:21:50 +00:00
David Malcolm
499de348e9 Parallelize the jit testsuite
gcc/jit/ChangeLog:
	* Make-lang.in (lang_checks_parallelized): Add "check-jit".
	(check_jit_parallelize): Set this to an arbitrary value (10).

From-SVN: r219774
2015-01-16 21:30:26 +00:00
Dominique d'Humieres
109c4a7c0a re PR libffi/64607 (Multilib test stops working in libffi)
PR libffi/64607

 * Makefile.am (AM_MAKEFLAGS): Use double quotes on subvariables.
 * Makefile.in: Rebuilt.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r219772
2015-01-16 12:51:14 -08:00
Thomas Schwinge
6e36114cdf libgomp: Don't use <alloca.h>.
libgomp/
	* oacc-parallel.c: Don't include <alloca.h>.
	(GOACC_parallel): Use gomp_alloca instead of alloca.

From-SVN: r219771
2015-01-16 21:05:21 +01:00
Torvald Riegel
eae801bacc libstdc++: Optimize synchronization in std::future if futexes are available.
* src/c++11/futex.cc: New file.
	* include/bits/atomic_futex.h: New file.
	* include/std/future (__future_base::_State_baseV2): Use
	atomic_futex_unsigned instead of mutex+condvar.
	* src/c++11/futex.cc: Likewise.
	* include/Makefile.am: Add atomic_futex.h.
	* include/Makefile.in: Likewise.
	* src/c++11/Makefile.am: Add futex.cc.
	* src/c++11/Makefile.in: Likewise.

From-SVN: r219770
2015-01-16 19:50:43 +00:00
Christophe Lyon
1175297f6e [ARM/AArch64][testsuite] Add vld1_lane tests.
* gcc.target/aarch64/advsimd-intrinsics/vld1_lane.c: New file.

From-SVN: r219767
2015-01-16 19:26:57 +01:00
Paolo Carlini
68e2914e6a re PR c++/62134 ([C++11] ICE with template alias)
2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/62134
	* g++.dg/cpp0x/alias-decl-46.C: New.

From-SVN: r219766
2015-01-16 18:24:52 +00:00
Christophe Lyon
1005e83717 [ARM/AArch64][testsuite] Be more verbose, and actually confirm that a
test was checked.

	* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h (CHECK):
	Add trace.
        (CHECK_FP): Likewise.
        (CHECK_CUMULATIVE_SAT): Likewise.

From-SVN: r219765
2015-01-16 19:21:53 +01:00
Christophe Lyon
0619d58c81 [ARM/AArch64][testsuite] Add explicit dependency on Neon Cumulative Saturation flag
* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
        (Set_Neon_Cumulative_Sat): Add parameter.
        (__set_neon_cumulative_sat): Support new parameter.
        * gcc.target/aarch64/advsimd-intrinsics/binary_sat_op.inc
        (TEST_BINARY_SAT_OP1): Call Set_Neon_Cumulative_Sat with new
        argument.
        * gcc.target/aarch64/advsimd-intrinsics/unary_sat_op.inc
        (TEST_UNARY_SAT_OP1): Call Set_Neon_Cumulative_Sat with new
        argument.

From-SVN: r219764
2015-01-16 19:19:42 +01:00
Kyrylo Tkachov
a220c9da9e [ARM] PR 62066: Call va_end on early return from va_list processing function
PR target/62066
	* config/arm/arm-builtins.c (arm_expand_neon_args): Call va_end before
	early return 0.

From-SVN: r219763
2015-01-16 18:14:37 +00:00
Bernd Edlinger
55d9ceab20 oops.. fixed typo in ChangeLog
From-SVN: r219762
2015-01-16 18:02:25 +00:00
Bernd Edlinger
cbf9a56669 sanititer.def (BUILT_IN_TSAN_VPTR_UPDATE): Fixed parameters.
2015-01-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * sanititer.def (BUILT_IN_TSAN_VPTR_UPDATE): Fixed parameters.
        * tsan.c (instrument_expr): Fixed parameters of __tsan_vptr_update.

gcc/testsuite/ChangeLog
2015-01-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * g++.dg/tsan/vptr_benign_race.C: New testcase.
        * g++.dg/tsan/vptr_harmful_race.C: New testcase.

From-SVN: r219761
2015-01-16 17:49:56 +00:00
Paolo Carlini
39dac19e28 re PR c++/60056 ([C++11] ICE in var_defined_without_dynamic_init, at cp/decl2.c:2876 with TLS static)
2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60056
	* g++.dg/tls/thread_local-ice4.C: New.

From-SVN: r219760
2015-01-16 17:47:43 +00:00
Jakub Jelinek
6e6cb47146 expr.c (cpp_classify_number): Add N_() around ?...
* expr.c (cpp_classify_number): Add N_() around ?: string
	literals used in cpp_error_with_line call as format string.

From-SVN: r219759
2015-01-16 18:40:15 +01:00
James Greenhalgh
35912f1687 [Obvious, ARM Testsuite] mangle-arm-crypto.C needs arm_crypto arguments added
gcc/testsuite/

	* g++.dg/abi/mangle-abi-crypto.C: Add crypto options, rather
	than Neon options.

From-SVN: r219758
2015-01-16 17:36:18 +00:00
David Malcolm
d486ec105e Add missing testcase accidentally omitted from r219681
From-SVN: r219757
2015-01-16 17:26:08 +00:00
Paolo Carlini
0dc240a4ab re PR c++/62276 (ICE when non-variadic template template parameter is default argument of variadic template template parameter)
2014-01-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/62276
	* g++.dg/cpp0x/vt-62276.C: New.

From-SVN: r219756
2015-01-16 17:10:20 +00:00
Kyrylo Tkachov
2a37d9d0e6 [ARM] Move comment about splitting Thumb1 patterns to thumb1.md
* config/arm/arm.md: Move comment about splitting Thumb1 patterns to...
	* config/arm/thumb1.md: ... Here.

From-SVN: r219755
2015-01-16 16:58:58 +00:00
Segher Boessenkool
325df0eb7f rs6000.c (rs6000_scalar_mode_supported_p): Disallow TImode for TARGET_32BIT.
* config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Disallow
	TImode for TARGET_32BIT.

From-SVN: r219754
2015-01-16 17:46:32 +01:00
Segher Boessenkool
77688d7059 rs6000.c (TARGET_LIBGCC_CMP_RETURN_MODE, [...]): Implement as ...
* config/rs6000/rs6000.c (TARGET_LIBGCC_CMP_RETURN_MODE,
	TARGET_LIBGCC_SHIFT_COUNT_MODE, TARGET_UNWIND_WORD_MODE): Implement
	as ...
	(rs6000_abi_word_mode): New function.

From-SVN: r219753
2015-01-16 17:36:16 +01:00
Segher Boessenkool
ed821220ca rs6000.c (rs6000_va_start): Use MIN_UNITS_PER_WORD instead of UNITS_PER_WORD to describe the size of stack...
* config/rs6000/rs6000.c (rs6000_va_start): Use MIN_UNITS_PER_WORD
	instead of UNITS_PER_WORD to describe the size of stack slots.

From-SVN: r219752
2015-01-16 17:34:31 +01:00
Segher Boessenkool
42373118cf rs6000.c (TARGET_PROMOTE_FUNCTION_MODE): Implement as rs6000_promote_function_mode.
* config/rs6000/rs6000.c (TARGET_PROMOTE_FUNCTION_MODE): Implement
	as rs6000_promote_function_mode.  Move comment to there.
	(rs6000_promote_function_mode): New function.

From-SVN: r219751
2015-01-16 17:32:51 +01:00
Segher Boessenkool
96922e4c58 rs6000.h (PROMOTE_MODE): Correct test for when -m32 -mpowerpc64 is active.
* config/rs6000/rs6000.h (PROMOTE_MODE): Correct test for when -m32
	-mpowerpc64 is active.

From-SVN: r219750
2015-01-16 17:31:37 +01:00
Ian Lance Taylor
72d7151a72 net: Restore earlier Solaris-specific version of setKeepAlivePeriod.
The version from the master repository seems to be appropriate
for OpenSolaris but not for Solaris itself.  Solaris 11.2
proper does not define TCP_KEEPIDLE or TCP_KEEPINTVL.

From-SVN: r219749
2015-01-16 15:57:32 +00:00
Ilya Enkovich
ed22611ae5 re PR middle-end/64353 (ICE: in execute_todo, at passes.c:1986)
gcc/

	PR middle-end/64353
	* tree-cfg.c (pass_data_fixup_cfg): Update SSA for
	virtuals on start.

gcc/testsuite/

	PR middle-end/64353
	* g++.dg/pr64353.C: New.

From-SVN: r219748
2015-01-16 15:38:21 +00:00
Jonathan Wakely
bb93f35da1 acinclude.m4: Fix typo in comment.
* acinclude.m4: Fix typo in comment.
	* configure: Regenerate.
	* include/bits/codecvt.h (codecvt<char16_t, char, mbstate_t>,
	codecvt<char16_t, char, mbstate_t>): Declare specializations.
	* include/bits/locale_facets.h: Reserve space for new specializations.
	* src/c++11/Makefile.am: Add codecvt.cc.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/codecvt.cc: New.
	* src/c++98/Makefile.am: Compile locale_init.cc and localename.cc
	with -std=gnu++11.
	* src/c++98/Makefile.in: Regenerate.
	* src/c++98/locale_init.cc: Initialize new codecvt specializations.
	* src/c++98/localename.cc: Likewise.
	* config/abi/pre/gnu.ver: Exports for new codecvt specializations.
	* testsuite/22_locale/codecvt/utf8.cc: New.
	* testsuite/22_locale/locale/cons/unicode.cc: Check that new
	specializations are installed in locale objects.

From-SVN: r219747
2015-01-16 15:02:35 +00:00
James Greenhalgh
16ab99ba18 [AArch64, Obvious] Fix broken commit r219724
gcc/

	* config/arm/cortex-a57.md: Remove duplicate of file accidentally
	introduced in revision 219724.

From-SVN: r219746
2015-01-16 14:59:36 +00:00
Kyrylo Tkachov
f2a03a7264 [AArch64] Fix PR 64263: Do not try to split constants when destination is SIMD reg
PR target/64263
	* config/aarch64/aarch64.md (*movsi_aarch64): Don't split if the
	destination is not a GP reg.
	(*movdi_aarch64): Likewise.

	* gcc.target/aarch64/pr64263_1.c: New test.

Co-Authored-By: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>

From-SVN: r219745
2015-01-16 14:50:39 +00:00
Jakub Jelinek
e989e68d93 jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of last argument.
* jit-builtins.h (DEF_FUNCTION_TYPE_VAR_5): Fix spelling of
	last argument.
	(DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12): Define and
	undef afterwards.
	* jit-builtins.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
	Likewise.
@@ -334,6 +343,8 @@ builtins_manager::make_type (enum jit_bu
 #undef DEF_FUNCTION_TYPE_VAR_3
 #undef DEF_FUNCTION_TYPE_VAR_4
 #undef DEF_FUNCTION_TYPE_VAR_5
+#undef DEF_FUNCTION_TYPE_VAR_8
+#undef DEF_FUNCTION_TYPE_VAR_12
 #undef DEF_POINTER_TYPE
 
     default:

From-SVN: r219744
2015-01-16 15:38:14 +01:00
David Edelsohn
8168ece0a1 Revert ISA change
From-SVN: r219743
2015-01-16 09:30:03 -05:00
Gerald Pfeifer
973e980879 * target.c (num_devices): Guard with PLUGIN_SUPPORT.
From-SVN: r219742
2015-01-16 14:27:55 +00:00
Yuri Rumyantsev
32e8464400 re PR tree-optimization/64434 (Performance regression after operand canonicalization (r216728).)
gcc/testsuite/

	PR tree-optimization/64434
	* gcc.dg/torture/pr64434.c: Move to...
	* gcc.dg/pr64434.c: ... here.

From-SVN: r219741
2015-01-16 14:22:57 +00:00
Markus Trippelsdorf
eeda1b3494 Add missing } to gcc.c-torture/compile/20150108.c
From-SVN: r219740
2015-01-16 13:59:08 +00:00
Richard Biener
666e8e0603 re PR middle-end/64614 (bogus used initialized warning (in gcc 4.9.2); switch statement versus &)
2015-01-16  Richard Biener  <rguenther@suse.de>

	PR middle-end/64614
	* tree-ssa-uninit.c: Include tree-cfg.h.
	(MAX_SWITCH_CASES): New define.
	(convert_control_dep_chain_into_preds): Handle switch statements.
	(is_pred_expr_subset_of): Handle x == CST vs. (x & CST) != 0.
	(normalize_one_pred_1): Do not split bit-manipulations.
	Record (x & CST).

	* gcc.dg/uninit-18.c: New testcase.

From-SVN: r219739
2015-01-16 13:26:10 +00:00
Torvald Riegel
6220fdff17 libstdc++: Add POSIX variant of shared_timed_mutex.
* include/std/shared_mutex (shared_timed_mutex): Add POSIX-based
	implementation.

From-SVN: r219737
2015-01-16 13:22:00 +00:00
Richard Biener
0399a8db1c re PR middle-end/64568 (error: invalid reference prefix)
2015-01-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/64568
	* tree-ssa-forwprop.c (pass_forwprop::execute): Guard
	complex load rewriting for TARGET_MEM_REFs.

	* g++.dg/torture/pr64568-2.C: New testcase.

From-SVN: r219736
2015-01-16 13:21:11 +00:00
Uros Bizjak
2a1dcf2747 builtins.c (expand_builtin_acc_on_device): Check target for NULL.
* builtins.c (expand_builtin_acc_on_device): Check target for NULL.

From-SVN: r219735
2015-01-16 14:16:46 +01:00