Commit Graph

180622 Commits

Author SHA1 Message Date
Arnaud Charlet
39706328c4 [Ada] Warnings on g-spogwa.adb
gcc/ada/

	* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-spogwa object.
	* libgnat/g-spogwa.adb: Fix style errors.
2020-10-27 05:19:34 -04:00
Piotr Trojanek
a026b59e77 [Ada] Fix GNATprove support for iterated_component_associations
gcc/ada/

	* exp_spark.adb (Expand_SPARK_Array_Aggregate): Dedicated
	routine for array aggregates; mostly reuses existing code, but
	calls itself recursively for multi-dimensional array aggregates.
	(Expand_SPARK_N_Aggregate): Call Expand_SPARK_Array_Aggregate to
	do the actual expansion, starting from the first index of the
	array type.
2020-10-27 05:19:33 -04:00
Ed Schonberg
fb00cc7032 [Ada] Multidimensional arrays with Iterated_Component_Associations
gcc/ada/

	* sem_aggr.adb (Resolve_Iterated_Component_Association): new
	internal subprogram Remove_References, to reset semantic
	information on each reference to the index variable of the
	association, so that Collect_Aggregate_Bounds can work properly
	on multidimensional arrays with nested associations, and
	subsequent expansion into loops can verify that dimensions of
	each subaggregate are compatible.
2020-10-27 05:19:32 -04:00
Ghjuvan Lacambre
b3ad829bd1 [Ada] CUDA: handle parameter associations in expansion of CUDA_Execute
gcc/ada/

	* exp_prag.adb (Append_Copies): Handle N_Parameter_Associations.
2020-10-27 05:19:31 -04:00
Eric Botcazou
0c1eba1a6a [Ada] Remove Digits_From_Size and Width_From_Size
gcc/ada/

	* ada_get_targ.adb (Digits_From_Size): Delete.
	(Width_From_Size): Likewise.
	* get_targ.adb (Digits_From_Size): Likewise.
	(Width_From_Size): Likewise.
	* get_targ.ads (Digits_From_Size): Likewise.
	(Width_From_Size): Likewise.
	* ttypes.ads: Remove with clause for Get_Targ.
	(Standard_Short_Short_Integer_Width): Delete.
	(Standard_Short_Integer_Width): Likewise.
	(Standard_Integer_Width): Likewise.
	(Standard_Long_Integer_Width): Likewise.
	(Standard_Long_Long_Integer_Width): Likewise.
	(Standard_Long_Long_Long_Integer_Width): Likewise.
	(Standard_Short_Float_Digits): Likewise.
	(Standard_Float_Digits): Likewise.
	(Standard_Long_Float_Digits): Likewise.
	(Standard_Long_Long_Float_Digits): Likewise.
	* gnat1drv.adb (Adjust_Global_Switches): Adjust.
2020-10-27 05:19:30 -04:00
Arnaud Charlet
b36ec51873 [Ada] New flag Transform_Function_Array
gcc/ada/

	* exp_ch6.adb, freeze.adb, gnat1drv.adb, opt.ads, sem_ch6.adb
	(Transform_Function_Array): New flag, split from Modify_Tree_For_C.
	* exp_unst.adb: Minor reformatting.
2020-10-27 05:19:29 -04:00
Dmitriy Anisimkov
79e61a6361 [Ada] Improve EINTR error handling on "poll" system call
gcc/ada/

	* libgnat/g-socpol.adb (Wait): Do not exit from loop on EINTR
	error and timeout is over.
2020-10-27 05:19:28 -04:00
Jan Hubicka
0365b9e4af Fix fnspec of math builtins
* builtin-attrs.def (STRERRNOC): New macro.
	(STRERRNOP): New macro.
	(ATTR_ERRNOCONST_NOTHROW_LEAF_LIST): New attr list.
	(ATTR_ERRNOPURE_NOTHROW_LEAF_LIST): New attr list.
	* builtins.def (ATTR_MATHFN_ERRNO): Use
	ATTR_ERRNOCONST_NOTHROW_LEAF_LIST.
	(ATTR_MATHFN_FPROUNDING_ERRNO): Use ATTR_ERRNOCONST_NOTHROW_LEAF_LIST
	or ATTR_ERRNOPURE_NOTHROW_LEAF_LIST.
2020-10-27 09:51:56 +01:00
Kito Cheng
e94de06fd6 RISC-V: Refine riscv_parse_arch_string
- Generalize logic for translating arch to internal flags, this patch
   is infrastructure for supporing sub-extension parsing.

gcc/ChangeLog

	* common/config/riscv/riscv-common.c (opt_var_ref_t): New.
	(riscv_ext_flag_table_t): New.
	(riscv_ext_flag_table): New.
	(riscv_parse_arch_string): Pass gcc_options* instead of
	&opts->x_target_flags only, and using riscv_arch_option_table to
	setup flags.
	(riscv_handle_option): Update argument for riscv_parse_arch_string.
	(riscv_expand_arch): Ditto.
	(riscv_expand_arch_from_cpu): Ditto.
2020-10-27 16:14:29 +08:00
Jan Hubicka
7f227da3e6 Use EAF_RETURN_ARG in tree-ssa-ccp.c
* tree-ssa-ccp.c (evaluate_stmt): Use EAF_RETURN_ARG; do not handle
	string buitings specially.
2020-10-27 09:03:45 +01:00
Jan Hubicka
5707996c14 Fix builtin decls generated in tree.c
* tree.c (set_call_expr_flags): Fix string for ECF_RET1.
	(build_common_builtin_nodes): Do not set ECF_RET1 for memcpy, memmove,
	and memset. They are handled by builtin_fnspec.
2020-10-27 09:02:22 +01:00
Jan Hubicka
b53f709d92 Add string builtins to builtin_fnspec
* builtins.c (builtin_fnspec): Add bzero, memcmp, memcmp_eq, bcmp,
	strncmp, strncmp_eq, strncasecmp, rindex, strlen, strlnen, strcasecmp,
	strcspn, strspn, strcmp, strcmp_eq.
2020-10-27 09:01:41 +01:00
Richard Biener
83220838dd Move SLP nodes to an alloc-pool
This introduces a global alloc-pool for SLP nodes to reduce overhead
on SLP allocation churn which will get worse and to eventually release
SLP cycles which will retain a refcount of one and thus are never
freed at the moment.

2020-10-26  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (slp_tree_pool): Declare.
	(_slp_tree::operator new): Likewise.
	(_slp_tree::operator delete): Likewise.
	* tree-vectorizer.c (vectorize_loops): Allocate and free the
	slp_tree_pool.
	(pass_slp_vectorize::execute): Likewise.
	* tree-vect-slp.c (slp_tree_pool): Define.
	(_slp_tree::operator new): Likewise.
	(_slp_tree::operator delete): Likewise.
2020-10-27 08:43:06 +01:00
Martin Liska
119295372f lto: no sub-make when --jobserver-auth= is missing
We newly correctly detect that a job server is not active for
a LTO linking:

lto-wrapper: warning: jobserver is not available: '--jobserver-auth=' is not present in 'MAKEFLAGS'

In that situation we should not call make -f abc.mk as it can leed
to N^2 LTRANS units.

gcc/ChangeLog:

	* lto-wrapper.c (run_gcc): Do not use sub-make when jobserver is
	not detected properly.
2020-10-27 08:29:46 +01:00
Martin Liska
953a9d63d4 call_summary: move hooks to base.
gcc/ChangeLog:

	* symbol-summary.h (call_summary_base): Pass symtab hooks to
	base and register (or unregister) hooks directly.
2020-10-27 08:25:51 +01:00
Martin Liska
251c9aea8f call_summary: modify cgraph hooks.
gcc/ChangeLog:

	* symbol-summary.h (function_summary_base::unregister_hooks):
	Call disable_insertion_hook and disable_duplication_hook.
	(function_summary_base::symtab_insertion): New field.
	(function_summary_base::symtab_removal): Likewise.
	(function_summary_base::symtab_duplication): Likewise.
	Register hooks in function_summary_base and directly register
	(or unregister) hooks.
2020-10-27 08:25:50 +01:00
Aldy Hernandez
18cb6195fd Add test for pr97560.
gcc/testsuite/ChangeLog:

	PR tree-optimization/97560
	* g++.dg/pr97560.C: New test.
2020-10-27 07:30:52 +01:00
Alan Modra
15c908807e [RS6000] Separate dg-require-effective-target options
* gcc.target/powerpc/vsx_mask-count-runnable.c: Separate options
	passed to dg-require-effective-target.
	* gcc.target/powerpc/vsx_mask-expand-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-extract-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-move-runnable.c: Likewise.
2020-10-27 11:25:30 +10:30
GCC Administrator
f19e7c8d5b Daily bump. 2020-10-27 00:16:28 +00:00
Alan Modra
18e7f36bf2 [RS6000] Remove -mpcrel from tests
When running with -m32
FAIL: gcc.target/powerpc/pr94740.c (test for excess errors)
Excess errors:
cc1: error: '-mpcrel' requires '-mcmodel=medium'

The others don't run for -m32, but remove the unnecessary -mpcrel
anyway.

	* gcc.target/powerpc/localentry-1.c: Remove -mpcrel from options.
	* gcc.target/powerpc/notoc-direct-1.c: Likewise.
	* gcc.target/powerpc/pr94740.c: Likewise.
2020-10-27 10:06:57 +10:30
Alan Modra
b1fc5c940e [RS6000] biarch test fail
* gcc.target/powerpc/bswap64-4.c: Comment.
2020-10-27 09:29:53 +10:30
Alan Modra
d7c71335c2 [RS6000] Replace -mcpu with -mdejagnu-cpu
* gcc.target/powerpc/pr93122.c: Replace -mcpu with -mdejagnu-cpu.
	* gcc.target/powerpc/vsx_mask-count-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-expand-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-extract-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-move-runnable.c: Likewise.
2020-10-27 09:25:23 +10:30
Alan Modra
99f68181b1 [RS6000] Tests that use int128_t and -m32
All these tests fail with -m32 due to lack of int128 support, in some
cases with what I thought was not the best error message.  For example
vsx_mask-move-runnable.c:34:3: error: unknown type name 'vector'
is misleading.  The problem isn't "vector" but "vector __uint128_t".

	* gcc.target/powerpc/vsx-load-element-extend-char.c: Require int128.
	* gcc.target/powerpc/vsx-load-element-extend-int.c: Likewise.
	* gcc.target/powerpc/vsx-load-element-extend-longlong.c: Likewise.
	* gcc.target/powerpc/vsx-load-element-extend-short.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-char.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-int.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-longlong.c: Likewise.
	* gcc.target/powerpc/vsx-store-element-truncate-short.c: Likewise.
	* gcc.target/powerpc/vsx_mask-count-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-expand-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-extract-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-move-runnable.c: Likewise.
2020-10-27 09:23:07 +10:30
Alan Modra
8d8fef1971 [RS6000] Link power10 testcases
Running the assembler and linker catches more errors.

	* gcc.target/powerpc/cfuged-1.c,
	gcc.target/powerpc/cntlzdm-1.c,
	gcc.target/powerpc/cnttzdm-1.c,
	gcc.target/powerpc/dg-future-1.c,
	gcc.target/powerpc/lsbb-runnable.c,
	gcc.target/powerpc/mma-double-test.c,
	gcc.target/powerpc/mma-single-test.c,
	gcc.target/powerpc/p10-arch31.c,
	gcc.target/powerpc/p10-identify.c,
	gcc.target/powerpc/pdep-1.c,
	gcc.target/powerpc/pextd-1.c,
	gcc.target/powerpc/pr96787-2.c,
	gcc.target/powerpc/vec-blend-runnable.c,
	gcc.target/powerpc/vec-cfuged-1.c,
	gcc.target/powerpc/vec-clrl-1.c,
	gcc.target/powerpc/vec-clrl-3.c,
	gcc.target/powerpc/vec-clrr-1.c,
	gcc.target/powerpc/vec-clrr-3.c,
	gcc.target/powerpc/vec-cntlzm-1.c,
	gcc.target/powerpc/vec-cnttzm-1.c,
	gcc.target/powerpc/vec-extracth-1.c,
	gcc.target/powerpc/vec-extracth-3.c,
	gcc.target/powerpc/vec-extracth-5.c,
	gcc.target/powerpc/vec-extracth-7.c,
	gcc.target/powerpc/vec-extractl-1.c,
	gcc.target/powerpc/vec-extractl-3.c,
	gcc.target/powerpc/vec-extractl-5.c,
	gcc.target/powerpc/vec-extractl-7.c,
	gcc.target/powerpc/vec-gnb-1.c,
	gcc.target/powerpc/vec-insert-word-runnable.c,
	gcc.target/powerpc/vec-pdep-1.c,
	gcc.target/powerpc/vec-permute-ext-runnable.c,
	gcc.target/powerpc/vec-pext-1.c,
	gcc.target/powerpc/vec-replace-word-runnable.c,
	gcc.target/powerpc/vec-shift-double-runnable.c,
	gcc.target/powerpc/vec-splati-runnable.c,
	gcc.target/powerpc/vec-stril-1.c,
	gcc.target/powerpc/vec-stril-16.c,
	gcc.target/powerpc/vec-stril-17.c,
	gcc.target/powerpc/vec-stril-18.c,
	gcc.target/powerpc/vec-stril-19.c,
	gcc.target/powerpc/vec-stril-20.c,
	gcc.target/powerpc/vec-stril-21.c,
	gcc.target/powerpc/vec-stril-22.c,
	gcc.target/powerpc/vec-stril-23.c,
	gcc.target/powerpc/vec-stril-3.c,
	gcc.target/powerpc/vec-stril-5.c,
	gcc.target/powerpc/vec-stril-7.c,
	gcc.target/powerpc/vec-stril_p-1.c,
	gcc.target/powerpc/vec-stril_p-3.c,
	gcc.target/powerpc/vec-stril_p-5.c,
	gcc.target/powerpc/vec-stril_p-7.c,
	gcc.target/powerpc/vec-strir-1.c,
	gcc.target/powerpc/vec-strir-16.c,
	gcc.target/powerpc/vec-strir-17.c,
	gcc.target/powerpc/vec-strir-18.c,
	gcc.target/powerpc/vec-strir-19.c,
	gcc.target/powerpc/vec-strir-20.c,
	gcc.target/powerpc/vec-strir-21.c,
	gcc.target/powerpc/vec-strir-22.c,
	gcc.target/powerpc/vec-strir-23.c,
	gcc.target/powerpc/vec-strir-3.c,
	gcc.target/powerpc/vec-strir-5.c,
	gcc.target/powerpc/vec-strir-7.c,
	gcc.target/powerpc/vec-strir_p-1.c,
	gcc.target/powerpc/vec-strir_p-3.c,
	gcc.target/powerpc/vec-strir_p-5.c,
	gcc.target/powerpc/vec-strir_p-7.c,
	gcc.target/powerpc/vec-ternarylogic-1.c,
	gcc.target/powerpc/vec-ternarylogic-3.c,
	gcc.target/powerpc/vec-ternarylogic-5.c,
	gcc.target/powerpc/vec-ternarylogic-7.c,
	gcc.target/powerpc/vec-ternarylogic-9.c,
	gcc.target/powerpc/vsx_mask-count-runnable.c,
	gcc.target/powerpc/vsx_mask-expand-runnable.c,
	gcc.target/powerpc/vsx_mask-extract-runnable.c,
	gcc.target/powerpc/vsx_mask-move-runnable.c,
	gcc.target/powerpc/xxgenpc-runnable.c: Link testcase when it
	can't be run.
2020-10-27 09:15:52 +10:30
Alan Modra
6848894053 [RS6000] dimode_off.c test
This tests behaviour near the limit of 16-bit signed offsets.  If
power10 prefix instructions are enabled, no such testing occurs.

	* gcc.target/powerpc/dimode_off.c: Add -mno-prefixed to options.
2020-10-27 09:15:52 +10:30
Alan Modra
32c89b1633 [RS6000] Non-pcrel tests when power10
These tests require -mno-pcrel because they are testing features
of the non-pcrel ABI.

	* gcc.target/powerpc/cprophard.c: Add -mno-pcrel to options.
	* gcc.target/powerpc/float128-hw3.c: Likewise.
	* gcc.target/powerpc/pr79439-1.c: Likewise.
	* gcc.target/powerpc/pr79439-2.c: Likewise.
	* gcc.target/powerpc/r2_shrink-wrap.c: Likewise.
2020-10-27 09:15:52 +10:30
Nikhil Benesch
a573530d50 syscall: import additional BSD-specific syscall wrappers
Import additional code from upstream for handing system
calls on BSD systems. This makes the syscall package on
NetBSD complete enough to compile the standard library.

Updates golang/go#38538.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265123
2020-10-26 15:04:16 -07:00
Andrew MacLeod
48722d158c Combine logical OR ranges properly.
When combining logical OR operands with a FALSE result, union the false
ranges for operand1 and operand2... not intersection.

	gcc/
	PR tree-optimization/97567
	* gimple-range-gori.cc (gori_compute::logical_combine): Union the
	ranges of operand1 and operand2, not intersect.
	gcc/testsuite/
	* gcc.dg/pr97567.c: New.
2020-10-26 17:41:07 -04:00
Jonathan Wakely
b784bbbe45 libstdc++: Fix error in experimental::strand
libstdc++-v3/ChangeLog:

	* include/experimental/executor (strand::_State): Fix thinko.
2020-10-26 21:00:06 +00:00
Jan Hubicka
4f8cfb4288 Extend builtin fnspecs
* attr-fnspec.h: Update toplevel comment.
	(attr_fnspec::attr_fnspec): New constructor.
	(attr_fnspec::arg_read_p,
	attr_fnspec::arg_written_p,
	attr_fnspec::arg_access_size_given_by_arg_p,
	attr_fnspec::arg_single_access_p
	attr_fnspec::loads_known_p
	attr_fnspec::stores_known_p,
	attr_fnspec::clobbers_errno_p): New member functions.
	(gimple_call_fnspec): Declare.
	(builtin_fnspec): Declare.
	* builtins.c: Include attr-fnspec.h
	(builtin_fnspec): New function.
	* builtins.def (BUILT_IN_MEMCPY): Do not specify RET1 fnspec.
	(BUILT_IN_MEMMOVE): Do not specify RET1 fnspec.
	(BUILT_IN_MEMSET): Do not specify RET1 fnspec.
	(BUILT_IN_STRCAT): Do not specify RET1 fnspec.
	(BUILT_IN_STRCPY): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCAT): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCPY): Do not specify RET1 fnspec.
	(BUILT_IN_MEMCPY_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_MEMMOVE_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_MEMSET_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRCAT_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRCPY_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCAT_CHK): Do not specify RET1 fnspec.
	(BUILT_IN_STRNCPY_CHK): Do not specify RET1 fnspec.
	* gimple.c (gimple_call_fnspec): Return attr_fnspec.
	(gimple_call_arg_flags): Update.
	(gimple_call_return_flags): Update.
	* tree-ssa-alias.c (check_fnspec): New function.
	(ref_maybe_used_by_call_p_1): Use fnspec for builtin handling.
	(call_may_clobber_ref_p_1): Likewise.
	(attr_fnspec::verify): Update verifier.
	* calls.c (decl_fnspec): New function.
	(decl_return_flags): Use it.
2020-10-26 20:22:16 +01:00
Aldy Hernandez
2118438f49 Handle signed 1-bit ranges in irange::invert.
The problem here is we are trying to add 1 to a -1 in a signed 1-bit
field and coming up with UNDEFINED because of the overflow.

Signed 1-bits are annoying because you can't really add or subtract
one, because the one is unrepresentable.  For invert() we have a
special subtract_one() function that handles 1-bit signed fields.

This patch implements the analogous add_one() function so that invert
works.

gcc/ChangeLog:

	PR tree-optimization/97555
	* range-op.cc (range_tests): Test 1-bit signed invert.
	* value-range.cc (subtract_one): Adjust comment.
	(add_one): New.
	(irange::invert): Call add_one.

gcc/testsuite/ChangeLog:

	* gcc.dg/pr97555.c: New test.
2020-10-26 19:05:53 +01:00
Jan Hubicka
f20a6c57f0 Implement three-level optimize_for_size predicates
this patch implements thre two-state optimize_for_size predicates, so with -Os
and with profile feedback for never executed code it returns OPTIMIZE_SIZE_MAX
while in cases we decide to optimize for size based on branch prediction logic
it return OPTIMIZE_SIZE_BALLANCED.

The idea is that for places where we guess that code is unlikely we do not
want to do extreme optimizations for size that leads to many fold slowdowns
(using idiv rather than few shigts or using rep based inlined stringops).

I will update RTL handling code to also support this with BB granuality (which
we don't currently).  LLVM has -Os and -Oz levels where -Oz is our -Os and
LLVM's -Os would ocrrespond to OPTIMIZE_SIZE_BALLANCED.  I wonder if we want
to export this to command line somehow?  For me it would be definitly useful
to test things, I am not sure how "weaker" -Os is desired in practice.

gcc/ChangeLog:

	* cgraph.h (cgraph_node::optimize_for_size_p): Return
	optimize_size_level.
	(cgraph_node::optimize_for_size_p): Update.
	* coretypes.h (enum optimize_size_level): New enum.
	* predict.c (unlikely_executed_edge_p): Microoptimize.
	(optimize_function_for_size_p): Return optimize_size_level.
	(optimize_bb_for_size_p): Likewise.
	(optimize_edge_for_size_p): Likewise.
	(optimize_insn_for_size_p): Likewise.
	(optimize_loop_nest_for_size_p): Likewise.
	* predict.h (optimize_function_for_size_p): Update declaration.
	(optimize_bb_for_size_p): Update declaration.
	(optimize_edge_for_size_p): Update declaration.
	(optimize_insn_for_size_p): Update declaration.
	(optimize_loop_for_size_p): Update declaration.
	(optimize_loop_nest_for_size_p): Update declaration.
2020-10-26 18:19:48 +01:00
Richard Biener
63b2149fb4 Refactor SLP instance analysis
This refactors the toplevel entry to analyze an SLP instance to
expose a worker analyzing from a vector of stmts and an SLP entry
kind.

2020-10-26  Richard Biener  <rguenther@suse.de>

	* tree-vect-slp.c (enum slp_instance_kind): New.
	(vect_build_slp_instance): Split out from...
	(vect_analyze_slp_instance): ... this.
2020-10-26 16:00:25 +01:00
Andrew MacLeod
425bb53b54 Re: error: ‘EVRP_MODE_DEBUG’ was not declared – was: [PUSHED] Ranger classes.
Initialize zerov to match vr-values.c.

	* gimple-range.cc (range_of_builtin_call): Initialize zerov to 0.
2020-10-26 10:18:01 -04:00
Ville Voutilainen
9e2256dcd4 c++: Implement __is_nothrow_constructible and __is_nothrow_assignable
gcc/c-family/ChangeLog:

	* c-common.c (__is_nothrow_assignable): New.
	(__is_nothrow_constructible): Likewise.
	* c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
	(RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.

gcc/cp/ChangeLog:

	* cp-tree.h (CPTK_IS_NOTHROW_ASSIGNABLE): New.
	(CPTK_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
	(is_nothrow_xible): Likewise.
	* method.c (is_nothrow_xible): New.
	(is_trivially_xible): Tweak.
	* parser.c (cp_parser_primary_expression): Handle the new RID_*.
	(cp_parser_trait_expr): Likewise.
	* semantics.c (trait_expr_value): Handle the new RID_*.
	(finish_trait_expr): Likewise.

libstdc++-v3/ChangeLog:

	* include/std/type_traits (__is_nt_constructible_impl): Remove.
	(__is_nothrow_constructible_impl): Adjust.
	(is_nothrow_default_constructible): Likewise.
	(__is_nt_assignable_impl): Remove.
	(__is_nothrow_assignable_impl): Adjust.
2020-10-26 15:36:24 +02:00
Jan Hubicka
783dc02d89 Fix simdclones
gcc/ChangeLog:

	PR ipa/97576
	* cgraphclones.c (cgraph_node::materialize_clone): Clear stmt
	references.
	* cgraphunit.c (mark_functions_to_output): Do not clear them here.
	* ipa-inline-transform.c (inline_transform): Clear stmt references.
	* symtab.c (symtab_node::clear_stmts_in_references): Make recursive
	for clones.
	* tree-ssa-structalias.c (ipa_pta_execute): Do not clear references.

gcc/testsuite/ChangeLog:

	PR ipa/97576
	* gcc.c-torture/compile/pr97576.c: New test.
2020-10-26 14:11:35 +01:00
zhengnannan
2d5aad691f AArch64: Add FLAG for store intrinsics [PR94442]
2020-10-26  Zhiheng Xie  <xiezhiheng@huawei.com>
	    Nannan Zheng  <zhengnannan@huawei.com>

gcc/ChangeLog:

	* config/aarch64/aarch64-builtins.c: Add FLAG STORE.
	* config/aarch64/aarch64-simd-builtins.def: Add proper FLAG
	for store intrinsics.
2020-10-26 13:02:18 +00:00
Jonathan Wakely
93e9a7bcd5 libstdc++: Fix declarations of memalign etc. for freestanding [PR 97570]
libstdc++-v3/ChangeLog:

	PR libstdc++/97570
	* libsupc++/new_opa.cc: Declare size_t in global namespace.
	Remove unused header.
2020-10-26 12:02:50 +00:00
Kyrylo Tkachov
7f0ce82a4c PR tree-optimization/97546 Bail out of find_bswap_or_nop on non-INTEGER_CST sizes
This patch fixes the ICE in the PR by bailing out of find_bswap_or_nop
on poly_int sizes.
I don't think it intends to handle them and from my reading of the code
it's the most appropriate place to reject them
here rather than in the callers.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/
	PR tree-optimization/97546
	* gimple-ssa-store-merging.c (find_bswap_or_nop): Return NULL if
	type is not INTEGER_CST.

gcc/testsuite/
	PR tree-optimization/97546
	* gcc.target/aarch64/sve/acle/general/pr97546.c: New test.
2020-10-26 11:43:26 +00:00
Richard Biener
605c2a393d middle-end/97521 - always use single-bit bools in mask vector types
This makes us always use a single-bit boolean type component type
for integer mode mask VECTOR_BOOLEAN_TYPE_P to match the RTL and target
representation.  This aovids the need for magic translation and
the inconsistencies from the translation requirement now that
we expose temporaries of those types on the GIMPLE level.

2020-10-23  Richard Biener  <rguenther@suse.de>

	PR middle-end/97521
	* expr.c (const_scalar_mask_from_tree): Remove.
	(expand_expr_real_1): Always VIEW_CONVERT integer mode
	vector constants to an integer type.
	* tree.c (build_truth_vector_type_for_mode): Use a single-bit
	boolean component type for non-vector-mode mask_mode.

	* gcc.target/i386/pr97521.c: New testcase.
2020-10-26 12:28:30 +01:00
H.J. Lu
4052c05e5b x86: Inline strncmp only with -minline-all-stringops
Expand strncmp to "repz cmpsb" only with -minline-all-stringops since
"repz cmpsb" can be much slower than strncmp function implemented with
vector instructions, see

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052

gcc/

	PR target/95458
	* config/i386/i386-expand.c (ix86_expand_cmpstrn_or_cmpmem):
	Return false for -mno-inline-all-stringops.

gcc/testsuite/

	PR target/95458
	* gcc.target/i386/pr95458-1.c: New test.
	* gcc.target/i386/pr95458-2.c: Likewise.
2020-10-26 04:15:47 -07:00
H.J. Lu
3edc21af52 x86: Add cmpmemsi for -minline-all-stringops
We used to expand memcmp to "repz cmpsb" via cmpstrnsi.  It was changed
by

commit 9b0f6f5e51
Author: Nick Clifton <nickc@redhat.com>
Date:   Fri Aug 12 16:26:11 2011 +0000

    builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern.

            * builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi
            pattern.
            * doc/md.texi (cmpstrn): Note that the comparison stops if both
            fetched bytes are zero.
            (cmpstr): Likewise.
            (cmpmem): Note that the comparison does not stop if both of the
            fetched bytes are zero.

Duplicate the cmpstrn pattern for cmpmem.  The only difference is that
the length argument of cmpmem is guaranteed to be less than or equal to
lengths of 2 memory areas.  Since "repz cmpsb" can be much slower than
memcmp function implemented with vector instruction, see

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052

expand cmpmem to "repz cmpsb" only for -minline-all-stringops.

gcc/

	PR target/95151
	* config/i386/i386-expand.c (ix86_expand_cmpstrn_or_cmpmem): New
	function.
	* config/i386/i386-protos.h (ix86_expand_cmpstrn_or_cmpmem): New
	prototype.
	* config/i386/i386.md (cmpmemsi): New pattern.

gcc/testsuite/

	PR target/95151
	* gcc.target/i386/pr95151-1.c: New test.
	* gcc.target/i386/pr95151-2.c: Likewise.
	* gcc.target/i386/pr95151-3.c: Likewise.
	* gcc.target/i386/pr95151-4.c: Likewise.
2020-10-26 04:06:32 -07:00
Andreas Krebbel
19534269d8 IBM Z: Add vcond_mask expander
After adding vec_cmp expanders we have seen various performance
related regression in the testsuite.  These appear to be caused by a
missing vcond_mask definition in the backend.  Fixed with this patch.

The patch fixes the following testsuite fails:

FAIL: gcc.dg/vect/vect-21.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-21.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-live-6.c -flto -ffat-lto-objects  scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.dg/vect/vect-live-6.c scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrab\\t%v.?,%v.?,7 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesraf\\t%v.?,%v.?,31 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrah\\t%v.?,%v.?,15 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlb\\t%v.?,%v.?,7 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlf\\t%v.?,%v.?,31 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlh\\t%v.?,%v.?,15 4
FAIL: gcc.dg/vect/vect-21.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-21.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-23.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c -flto -ffat-lto-objects  scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-24.c scan-tree-dump-times vect "vectorized 3 loops" 1
FAIL: gcc.dg/vect/vect-live-6.c -flto -ffat-lto-objects  scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.dg/vect/vect-live-6.c scan-tree-dump vect "vectorized 1 loops"
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrab\\t%v.?,%v.?,7 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesraf\\t%v.?,%v.?,31 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrah\\t%v.?,%v.?,15 6
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlb\\t%v.?,%v.?,7 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlf\\t%v.?,%v.?,31 4
FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlh\\t%v.?,%v.?,15 4

gcc/ChangeLog:

	* config/s390/vector.md ("vcond_mask_<mode><mode>"): New expander.
2020-10-26 11:42:06 +01:00
Richard Biener
50f9e1f4d4 middle-end/97554 - avoid overflow in alloc size compute
This avoids overflow in the allocation size computations in
sbitmap_vector_alloc when the result exceeds 2GB.

2020-10-26  Richard Biener  <rguenther@suse.de>

	* sbitmap.c (sbitmap_vector_alloc): Use size_t for byte
	quantities to avoid overflow.
2020-10-26 11:33:50 +01:00
Richard Biener
27c14056f4 tree-optimization/97539 - reset out-of-loop debug uses before peeling
This makes sure to reset out-of-loop debug uses before vectorizer
loop peeling as we cannot make sure to retain the use-def dominance
relationship when there are no LC SSA nodes.

2020-10-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/97539
	* tree-vect-loop-manip.c (vect_do_peeling): Reset out-of-loop
	debug uses before peeling.

	* gcc.dg/pr97539.c: New testcase.
2020-10-26 11:33:50 +01:00
Jan Hubicka
40e67ab8e5 Make default duplicate and insert methods of summaries abort; fix fallout
the default duplicate and insert methods of sumaries produce empty
summary that is not useful for anything and makes it easy to introduce
bugs.

This patch makes the default hooks to abort and summaries that do not
need dupicaito/insertion disable the corresponding hooks. I also
implemented missing insertion hook for ipa-sra which forced me to move
analysis out of anonymous namespace.

2020-10-23  Jan Hubicka  <hubicka@ucw.cz>

	* cgraph.h (struct cgraph_node): Make ipa_transforms_to_apply vl_ptr.
	* ipa-inline-analysis.c (initialize_growth_caches): Disable insertion
	and duplication hooks.
	* ipa-inline-transform.c (clone_inlined_nodes): Clear
	ipa_transforms_to_apply.
	(save_inline_function_body): Disable insertion hoook for
	ipa_saved_clone_sources.
	* ipa-prop.c (ipcp_transformation_initialize): Disable insertion hook.
	* ipa-prop.h (ipa_node_params_t): Disable insertion hook.
	* ipa-reference.c (propagate): Disable insertion hoook.
	* ipa-sra.c (ipa_sra_summarize_function): Move out of anonymous
	namespace.
	(ipa_sra_function_summaries::insert): New virtual function.
	* passes.c (execute_one_pass): Do not add transforms to inline clones.
	* symbol-summary.h (function_summary_base): Make insert and duplicate
	hooks fail instead of silently producing empty summaries; add way to
	disable duplication hooks
	(call_summary_base): Likewise.
	* tree-nested.c (nested_function_info::get_create): Disable insertion
	hooks
	(maybe_record_nested_function): Likewise.
2020-10-26 11:24:33 +01:00
Stephan Bergmann
dc7824734e libstdc++: Add missing exception-specifications in shared_ptr
libstdc++-v3/ChangeLog:

	* include/bits/shared_ptr_base.h
	(_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
	definitions to match declaration.
	(__shared_count(const __weak_count&, nothrow_t)): Add noexcept
	to declaration to match definition.
2020-10-26 10:15:45 +00:00
Ed Schonberg
02a8253980 [Ada] Handle Iterated_Component_Association with Others_Choice
gcc/ada/

	* exp_aggr.adb (Build_Array_Aggr_Code): If the aggregate
	includes an Others_Choice in an association that is an
	Iterated_Component_Association, generate a proper loop for it.
2020-10-26 04:59:17 -04:00
Eric Botcazou
fcae4f70cd [Ada] Further small edition to documentation of Ada.Text_IO.Fixed_IO
gcc/ada/

	* libgnat/a-tifiio.adb: Add missing sign in documentation.
	* libgnat/s-imgrea.ads: Minor fixes in commentary.
2020-10-26 04:59:16 -04:00
Pat Rogers
38a61cff22 [Ada] Replace GNAT_Extended_Ravenscar profile name
gcc/ada/

	* doc/gnat_rm/implementation_defined_pragmas.rst: Include
	"Jorvik" in pragma Profile description.
	* gnat_rm.texi: Regenerate.
2020-10-26 04:59:15 -04:00