Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc.old merge GCC 6.5 into gcc.old (properly t...
details: https://anonhg.NetBSD.org/src/rev/a45bd6874e06
branches: trunk
changeset: 994513:a45bd6874e06
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Nov 11 20:59:07 2018 +0000
description:
merge GCC 6.5 into gcc.old (properly this time.)
diffstat:
external/gpl3/gcc.old/dist/gcc/config/aarch64/cortex-a57-fma-steering.c | 15 +-
external/gpl3/gcc.old/dist/gcc/config/arm/arm-builtins.c | 2 +-
external/gpl3/gcc.old/dist/gcc/config/i386/avx512fintrin.h | 2 +-
external/gpl3/gcc.old/dist/gcc/config/i386/x86-tune.def | 4 +
external/gpl3/gcc.old/dist/gcc/config/mips/frame-header-opt.c | 3 +-
external/gpl3/gcc.old/dist/gcc/config/nvptx/nvptx.c | 15 +-
external/gpl3/gcc.old/dist/gcc/config/rs6000/ppc-auxv.h | 3 +
external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtin-types.def | 1 +
external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtins.def | 2 +-
external/gpl3/gcc.old/dist/gcc/config/sh/sh_optimize_sett_clrt.cc | 5 +-
external/gpl3/gcc.old/dist/gcc/cp/constexpr.c | 59 +++-
external/gpl3/gcc.old/dist/gcc/cp/lambda.c | 10 +-
external/gpl3/gcc.old/dist/gcc/doc/gcov-dump.1 | 24 +-
external/gpl3/gcc.old/dist/gcc/doc/gcov-tool.1 | 4 +-
external/gpl3/gcc.old/dist/gcc/fold-const.h | 1 +
external/gpl3/gcc.old/dist/gcc/genmatch.c | 6 +-
external/gpl3/gcc.old/dist/gcc/gimple-ssa-backprop.c | 23 +-
external/gpl3/gcc.old/dist/gcc/hsa-brig.c | 2 +-
external/gpl3/gcc.old/dist/gcc/ipa-devirt.c | 11 +-
external/gpl3/gcc.old/dist/gcc/ipa-icf-gimple.c | 25 +-
external/gpl3/gcc.old/dist/gcc/ipa-icf-gimple.h | 6 +-
external/gpl3/gcc.old/dist/gcc/ipa-icf.c | 11 +
external/gpl3/gcc.old/dist/gcc/ipa-visibility.c | 3 +-
external/gpl3/gcc.old/dist/gcc/lra-remat.c | 2 +-
external/gpl3/gcc.old/dist/gcc/lto/lto-symtab.c | 60 +++-
external/gpl3/gcc.old/dist/gcc/shrink-wrap.c | 9 +-
external/gpl3/gcc.old/dist/gcc/tree-chkp.c | 3 +
external/gpl3/gcc.old/dist/gcc/ubsan.c | 19 +-
external/gpl3/gcc.old/dist/libgcc/config/i386/freebsd-unwind.h | 43 ++-
external/gpl3/gcc.old/dist/libgcc/config/nios2/linux-unwind.h | 2 +-
external/gpl3/gcc.old/dist/libgcc/config/rs6000/float128-ifunc.c | 42 +--
external/gpl3/gcc.old/dist/libgcc/config/sol2/crtpg.c | 9 +-
external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux.h | 4 +-
external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc | 43 +-
external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +-
external/gpl3/gcc.old/dist/libstdc++-v3/doc/html/manual/errno.html | 2 +-
external/gpl3/gcc.old/dist/libstdc++-v3/doc/html/manual/using_dual_abi.html | 31 +-
external/gpl3/gcc.old/dist/libstdc++-v3/include/bits/locale_conv.h | 2 +-
external/gpl3/gcc.old/dist/libstdc++-v3/include/bits/parse_numbers.h | 7 +
external/gpl3/gcc.old/dist/libstdc++-v3/include/bits/regex_automaton.h | 2 +-
external/gpl3/gcc.old/dist/libstdc++-v3/include/experimental/bits/fs_ops.h | 7 +-
external/gpl3/gcc.old/dist/libstdc++-v3/include/experimental/bits/fs_path.h | 4 +-
external/gpl3/gcc.old/dist/libstdc++-v3/include/experimental/memory_resource | 84 +++--
external/gpl3/gcc.old/dist/libstdc++-v3/include/experimental/regex | 5 +-
external/gpl3/gcc.old/dist/libstdc++-v3/include/experimental/string | 5 +-
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/codecvt.cc | 7 +-
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/cow-string-inst.cc | 25 -
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/cow-string-io-inst.cc | 59 +++
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/cow-wstring-inst.cc | 24 -
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/cow-wstring-io-inst.cc | 63 +++
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/cxx11-ios_failure.cc | 26 +
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/snprintf_lite.cc | 22 +-
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/sso_string.cc | 107 ++++++
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/string-io-inst.cc | 53 +++
external/gpl3/gcc.old/dist/libstdc++-v3/src/c++11/wstring-io-inst.cc | 55 +++
external/gpl3/gcc.old/dist/libstdc++-v3/src/filesystem/ops.cc | 163 ++++++---
external/gpl3/gcc.old/lib/libgcc/libgcov/arch/aarch64/gcov-iov.h | 6 +-
external/gpl3/gcc.old/lib/libgomp/arch/aarch64/omp.h | 4 +-
external/gpl3/gcc.old/lib/libstdc++-v3/arch/aarch64/defs.mk | 4 +-
external/gpl3/gcc.old/lib/libstdc++-v3/arch/aarch64/gstdint.h | 4 +-
external/gpl3/gcc.old/usr.bin/gcc/arch/aarch64/bversion.h | 4 +-
external/gpl3/gcc.old/usr.bin/gcc/arch/aarch64/defs.mk | 4 +-
external/gpl3/gcc.old/usr.bin/gcc/arch/aarch64/plugin-version.h | 8 +-
63 files changed, 929 insertions(+), 333 deletions(-)
diffs (truncated from 2312 to 300 lines):
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/aarch64/cortex-a57-fma-steering.c
--- a/external/gpl3/gcc.old/dist/gcc/config/aarch64/cortex-a57-fma-steering.c Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/aarch64/cortex-a57-fma-steering.c Sun Nov 11 20:59:07 2018 +0000
@@ -973,10 +973,17 @@
break;
}
- /* We didn't find a chain with a def for this instruction. */
- gcc_assert (i < dest_op_info->n_chains);
-
- this->analyze_fma_fmul_insn (forest, chain, head);
+ /* Due to implementation of regrename, dest register can slip away
+ from regrename's analysis. As a result, there is no chain for
+ the destination register of insn. We simply skip the insn even
+ it is a fmul/fmac instruction. This can happen when the dest
+ register is also a source register of insn and one of the below
+ conditions is satisfied:
+ 1) the source reg is setup in larger mode than this insn;
+ 2) the source reg is uninitialized;
+ 3) the source reg is passed in as parameter. */
+ if (i < dest_op_info->n_chains)
+ this->analyze_fma_fmul_insn (forest, chain, head);
}
}
free (bb_dfs_preorder);
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/arm/arm-builtins.c
--- a/external/gpl3/gcc.old/dist/gcc/config/arm/arm-builtins.c Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/arm/arm-builtins.c Sun Nov 11 20:59:07 2018 +0000
@@ -2368,7 +2368,7 @@
icode = CODE_FOR_set_fpscr;
arg0 = CALL_EXPR_ARG (exp, 0);
op0 = expand_normal (arg0);
- pat = GEN_FCN (icode) (op0);
+ pat = GEN_FCN (icode) (force_reg (SImode, op0));
}
emit_insn (pat);
return target;
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/i386/avx512fintrin.h
--- a/external/gpl3/gcc.old/dist/gcc/config/i386/avx512fintrin.h Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/i386/avx512fintrin.h Sun Nov 11 20:59:07 2018 +0000
@@ -3312,7 +3312,7 @@
(__m512d)__builtin_ia32_vfmaddsubpd512_mask(A, B, C, -1, R)
#define _mm512_mask_fmaddsub_round_pd(A, U, B, C, R) \
- (__m512d)__builtin_ia32_vfmaddpd512_mask(A, B, C, U, R)
+ (__m512d)__builtin_ia32_vfmaddsubpd512_mask(A, B, C, U, R)
#define _mm512_mask3_fmaddsub_round_pd(A, B, C, U, R) \
(__m512d)__builtin_ia32_vfmaddsubpd512_mask3(A, B, C, U, R)
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/i386/x86-tune.def
--- a/external/gpl3/gcc.old/dist/gcc/config/i386/x86-tune.def Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/i386/x86-tune.def Sun Nov 11 20:59:07 2018 +0000
@@ -555,3 +555,7 @@
if-converted to one. */
DEF_TUNE (X86_TUNE_ONE_IF_CONV_INSN, "one_if_conv_insn",
m_SILVERMONT | m_KNL | m_INTEL | m_CORE_ALL | m_GENERIC)
+
+/* X86_TUNE_EMIT_VZEROUPPER: This enables vzeroupper instruction insertion
+ before a transfer of control flow out of the function. */
+DEF_TUNE (X86_TUNE_EMIT_VZEROUPPER, "emit_vzeroupper", ~m_KNL)
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/mips/frame-header-opt.c
--- a/external/gpl3/gcc.old/dist/gcc/config/mips/frame-header-opt.c Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/mips/frame-header-opt.c Sun Nov 11 20:59:07 2018 +0000
@@ -98,8 +98,7 @@
mips_register_frame_header_opt (void)
{
opt_pass *p = make_pass_ipa_frame_header_opt (g);
- static struct register_pass_info f =
- {p, "comdats", 1, PASS_POS_INSERT_AFTER };
+ struct register_pass_info f = { p, "comdats", 1, PASS_POS_INSERT_AFTER };
register_pass (&f);
}
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/nvptx/nvptx.c
--- a/external/gpl3/gcc.old/dist/gcc/config/nvptx/nvptx.c Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/nvptx/nvptx.c Sun Nov 11 20:59:07 2018 +0000
@@ -1483,9 +1483,15 @@
if (sym)
{
- fprintf (asm_out_file, "generic(");
+ bool function = (SYMBOL_REF_DECL (sym)
+ && (TREE_CODE (SYMBOL_REF_DECL (sym)) == FUNCTION_DECL));
+ if (!function)
+ fprintf (asm_out_file, "generic(");
output_address (VOIDmode, sym);
- fprintf (asm_out_file, val ? ") + " : ")");
+ if (!function)
+ fprintf (asm_out_file, ")");
+ if (val)
+ fprintf (asm_out_file, " + ");
}
if (!sym || val)
@@ -1610,6 +1616,9 @@
nvptx_assemble_decl_begin (FILE *file, const char *name, const char *section,
const_tree type, HOST_WIDE_INT size, unsigned align)
{
+ bool atype = (TREE_CODE (type) == ARRAY_TYPE)
+ && (TYPE_DOMAIN (type) == NULL_TREE);
+
while (TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type);
@@ -1649,6 +1658,8 @@
/* We make everything an array, to simplify any initialization
emission. */
fprintf (file, "[" HOST_WIDE_INT_PRINT_DEC "]", init_frag.remaining);
+ else if (atype)
+ fprintf (file, "[]");
}
/* Called when the initializer for a decl has been completely output through
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/rs6000/ppc-auxv.h
--- a/external/gpl3/gcc.old/dist/gcc/config/rs6000/ppc-auxv.h Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/rs6000/ppc-auxv.h Sun Nov 11 20:59:07 2018 +0000
@@ -89,6 +89,9 @@
#define PPC_FEATURE2_HTM_NOSC 0x01000000
#define PPC_FEATURE2_ARCH_3_00 0x00800000
#define PPC_FEATURE2_HAS_IEEE128 0x00400000
+#define PPC_FEATURE2_DARN 0x00200000
+#define PPC_FEATURE2_SCV 0x00100000
+#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000
/* Thread Control Block (TCB) offsets of the AT_PLATFORM, AT_HWCAP and
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtin-types.def
--- a/external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtin-types.def Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtin-types.def Sun Nov 11 20:59:07 2018 +0000
@@ -129,6 +129,7 @@
DEF_OPAQUE_VECTOR_TYPE (BT_BV8HI, B_VX, BT_BSHORT, 8)
DEF_FN_TYPE_0 (BT_FN_INT, B_HTM, BT_INT)
DEF_FN_TYPE_0 (BT_FN_UINT, 0, BT_UINT)
+DEF_FN_TYPE_0 (BT_FN_VOID, B_HTM, BT_VOID)
DEF_FN_TYPE_1 (BT_FN_INT_INT, B_VX, BT_INT, BT_INT)
DEF_FN_TYPE_1 (BT_FN_INT_VOIDPTR, B_HTM, BT_INT, BT_VOIDPTR)
DEF_FN_TYPE_1 (BT_FN_OV4SI_INT, B_VX, BT_OV4SI, BT_INT)
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtins.def
--- a/external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtins.def Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/s390/s390-builtins.def Sun Nov 11 20:59:07 2018 +0000
@@ -289,7 +289,7 @@
OB_DEF_VAR (<variant name>, <standard builtin name>, <flags>, <fntype>) */
-B_DEF (tbeginc, tbeginc, 0, B_HTM, 0, BT_FN_INT)
+B_DEF (tbeginc, tbeginc, 0, B_HTM, 0, BT_FN_VOID)
B_DEF (tbegin, tbegin, returns_twice_attr, B_HTM, 0, BT_FN_INT_VOIDPTR)
B_DEF (tbegin_nofloat, tbegin_nofloat, returns_twice_attr, B_HTM, 0, BT_FN_INT_VOIDPTR)
B_DEF (tbegin_retry, tbegin_retry, returns_twice_attr, B_HTM, 0, BT_FN_INT_VOIDPTR_INT)
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/config/sh/sh_optimize_sett_clrt.cc
--- a/external/gpl3/gcc.old/dist/gcc/config/sh/sh_optimize_sett_clrt.cc Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/config/sh/sh_optimize_sett_clrt.cc Sun Nov 11 20:59:07 2018 +0000
@@ -18,6 +18,8 @@
<http://www.gnu.org/licenses/>. */
#include "config.h"
+#define INCLUDE_ALGORITHM
+#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
#include "backend.h"
@@ -27,9 +29,6 @@
#include "cfgrtl.h"
#include "tree-pass.h"
-#include <vector>
-#include <algorithm>
-
/*
This pass tries to eliminate unnecessary sett or clrt instructions in cases
where the ccreg value is already known to be the same as the constant set
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/cp/constexpr.c
--- a/external/gpl3/gcc.old/dist/gcc/cp/constexpr.c Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/cp/constexpr.c Sun Nov 11 20:59:07 2018 +0000
@@ -1919,6 +1919,45 @@
jump_target);
}
+/* Subroutine of cxx_eval_constant_expression.
+ Attempt to evaluate vector condition expressions. Unlike
+ cxx_eval_conditional_expression, VEC_COND_EXPR acts like a normal
+ ternary arithmetics operation, where all 3 arguments have to be
+ evaluated as constants and then folding computes the result from
+ them. */
+
+static tree
+cxx_eval_vector_conditional_expression (const constexpr_ctx *ctx, tree t,
+ bool *non_constant_p, bool *overflow_p)
+{
+ tree arg1 = cxx_eval_constant_expression (ctx, TREE_OPERAND (t, 0),
+ /*lval*/false,
+ non_constant_p, overflow_p);
+ VERIFY_CONSTANT (arg1);
+ tree arg2 = cxx_eval_constant_expression (ctx, TREE_OPERAND (t, 1),
+ /*lval*/false,
+ non_constant_p, overflow_p);
+ VERIFY_CONSTANT (arg2);
+ tree arg3 = cxx_eval_constant_expression (ctx, TREE_OPERAND (t, 2),
+ /*lval*/false,
+ non_constant_p, overflow_p);
+ VERIFY_CONSTANT (arg3);
+ location_t loc = EXPR_LOCATION (t);
+ tree type = TREE_TYPE (t);
+ tree r = fold_ternary_loc (loc, VEC_COND_EXPR, type, arg1, arg2, arg3);
+ if (r == NULL_TREE)
+ {
+ if (arg1 == TREE_OPERAND (t, 0)
+ && arg2 == TREE_OPERAND (t, 1)
+ && arg3 == TREE_OPERAND (t, 2))
+ r = t;
+ else
+ r = build3_loc (loc, VEC_COND_EXPR, type, arg1, arg2, arg3);
+ }
+ VERIFY_CONSTANT (r);
+ return r;
+}
+
/* Returns less than, equal to, or greater than zero if KEY is found to be
less than, to match, or to be greater than the constructor_elt's INDEX. */
@@ -2698,9 +2737,8 @@
if (!real_lvalue_p (init))
eltinit = move (eltinit);
eltinit = force_rvalue (eltinit, tf_warning_or_error);
- eltinit = (cxx_eval_constant_expression
- (&new_ctx, eltinit, lval,
- non_constant_p, overflow_p));
+ eltinit = cxx_eval_constant_expression (&new_ctx, eltinit, lval,
+ non_constant_p, overflow_p);
}
if (*non_constant_p && !ctx->quiet)
break;
@@ -2713,12 +2751,13 @@
else
CONSTRUCTOR_APPEND_ELT (*p, idx, eltinit);
/* Reuse the result of cxx_eval_constant_expression call
- from the first iteration to all others if it is a constant
- initializer that doesn't require relocations. */
+ from the first iteration to all others if it is a constant
+ initializer that doesn't require relocations. */
if (reuse
&& max > 1
- && (initializer_constant_valid_p (eltinit, TREE_TYPE (eltinit))
- == null_pointer_node))
+ && (eltinit == NULL_TREE
+ || (initializer_constant_valid_p (eltinit, TREE_TYPE (eltinit))
+ == null_pointer_node)))
{
if (new_ctx.ctor != ctx->ctor)
eltinit = new_ctx.ctor;
@@ -4031,12 +4070,14 @@
jump_target);
break;
}
- /* FALLTHRU */
- case VEC_COND_EXPR:
r = cxx_eval_conditional_expression (ctx, t, lval,
non_constant_p, overflow_p,
jump_target);
break;
+ case VEC_COND_EXPR:
+ r = cxx_eval_vector_conditional_expression (ctx, t, non_constant_p,
+ overflow_p);
+ break;
case CONSTRUCTOR:
if (TREE_CONSTANT (t))
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/cp/lambda.c
--- a/external/gpl3/gcc.old/dist/gcc/cp/lambda.c Sun Nov 11 18:02:23 2018 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/cp/lambda.c Sun Nov 11 20:59:07 2018 +0000
@@ -491,7 +491,10 @@
{
type = build_reference_type (type);
if (!dependent_type_p (type) && !real_lvalue_p (initializer))
- error ("cannot capture %qE by reference", initializer);
+ {
+ error ("cannot capture %qE by reference", initializer);
+ return error_mark_node;
+ }
}
else
{
@@ -662,11 +665,14 @@
lambda_stack);
if (LAMBDA_EXPR_EXTRA_SCOPE (tlambda)
+ && !COMPLETE_TYPE_P (LAMBDA_EXPR_CLOSURE (tlambda))
&& TREE_CODE (LAMBDA_EXPR_EXTRA_SCOPE (tlambda)) == FIELD_DECL)
{
/* In an NSDMI, we don't have a function to look up the decl in,
but the fake 'this' pointer that we're using for parsing is
- in scope_chain. */
+ in scope_chain. But if the closure is already complete, we're
+ in an instantiation of a generic lambda, and the fake 'this'
+ is gone. */
init = scope_chain->x_current_class_ptr;
gcc_checking_assert
(init && (TREE_TYPE (TREE_TYPE (init))
diff -r 26ffdb6e0e23 -r a45bd6874e06 external/gpl3/gcc.old/dist/gcc/doc/gcov-dump.1
--- a/external/gpl3/gcc.old/dist/gcc/doc/gcov-dump.1 Sun Nov 11 18:02:23 2018 +0000
Home |
Main Index |
Thread Index |
Old Index