[PATCH] vect: Use LOOP_VINFO_DATAREFS and LOOP_VINFO_DDRS consistently

2020-06-12 Thread Yangfei (Felix)
Hi, This is minor code refactorings in tree-vect-data-refs.c and tree-vect-loop.c. Use LOOP_VINFO_DATAREFS and LOOP_VINFO_DDRS when possible and rename several parameters to make code more consistent. Bootstrapped and tested on aarch64-linux-gnu. OK? Thanks, Felix gcc/ +2020-06-13 Felix

[PATCH] libgomp: added a partial omp-tools.h for OMPD

2020-06-12 Thread y2s1982 via Gcc-patches
This patch adds a partial omp-tools.h from OpenMP project which declares function prototypes and typedefs used in OMPD. This patch also addressed all feedback. 2020-06-12 Tony Sim libgomp/ChangeLog: * Makefile.am: Added new header. * Makefile.in: Regenerate. *

libgo patch committed: Correct arenaBaseOffset for aix/ppc

2020-06-12 Thread Ian Lance Taylor via Gcc-patches
This change by Clément Chigot corrects the value of arenaBaseOffset for aix/ppc. The existing value was correct for aix/ppc64, but not for 32-bit ppc. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to master. Ian 75452d68672ff7da6e5a167924b6aeb07b5b2ed1 diff --git

Re: [PATCH, RS6000 PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin

2020-06-12 Thread Segher Boessenkool
Hi! On Thu, Jun 11, 2020 at 11:22:33PM -0500, will schmidt wrote: > Fix codegen implementation for the builtin vec_pack_to_short_fp32. > +;; Convert two vector F32 to packed vector f16. > +(define_expand "convert_4f32_8f16" > + [(set (match_operand:V8HI 0 "register_operand" "=v") > +

Re: [PATCH] guard against calls with fewer arguments than the function type implies (PR 95581)

2020-06-12 Thread Segher Boessenkool
On Fri, Jun 12, 2020 at 10:46:33AM +0200, Richard Biener wrote: > On Fri, Jun 12, 2020 at 2:31 AM Segher Boessenkool > wrote: > > Why did this work before, and not anymore? That sounds like a missing > > or broken test? > > It "worked" before because GIMPLE IL checking is not strict here >

[PATCH] ipa: special pass-through op for Fortran strides

2020-06-12 Thread Martin Jambor
Hi, when Fortran functions pass array descriptors they receive as a parameter to another function, they actually rebuild it. Thanks to work done mainly by Feng, IPA-CP can already handle the cases when they pass directly the values loaded from the original descriptor. Unfortunately, perhaps the

Re: gcc/testsuite/go: increase memory in issue4085b.go

2020-06-12 Thread Ian Lance Taylor via Gcc-patches
On Tue, May 19, 2020 at 6:35 AM CHIGOT, CLEMENT wrote: > > Description: > On aix/ppc64, it's possible to allocate an array of 1<<50 int, because of > the > wider address space. Thus, increase it to 1<<59 like in Golang toolchain in > order to trigger the panic. > > Changelog: > 2020-05-19

Re: BRIG FE testsuite: Fix all dump-scans (Was: Re: drop -aux{dir,base}, revamp -dump{dir,base})

2020-06-12 Thread Mike Stump via Gcc-patches
On Jun 11, 2020, at 7:28 AM, Martin Jambor wrote: > > On Tue, Jun 09 2020, Mike Stump wrote: >> I think I'd prefer the fix on the other side, if reasonable. I'd give >> them some time to see about a fix there before selecting this patch. > > given Alexandre's email, are you OK with the patch?

Re: [PATCH] coroutines: Add a cleanup expression for g-r-o when needed [PR95477].

2020-06-12 Thread Iain Sandoe
Iain Sandoe wrote: > Nathan Sidwell wrote: > >> On 6/8/20 5:17 AM, Iain Sandoe wrote: >>> + r = gro_is_void_p ? integer_zero_node : rvalue (gro); >>> + /* The return object is constructed, even if the gro is void. */ >> >> Would error_mark_node work here? I presume we've already

Re: [PATCH][GCC][Aarch64]: Fix for PR94880: Failure to recognize andn pattern

2020-06-12 Thread Andrew Pinski via Gcc-patches
On Fri, Jun 12, 2020 at 7:50 AM Przemyslaw Wirkus wrote: > > Hi all, > > Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. Isn't it better to do this transformation on the gimple level and not in a target specific form? Or at least do it in the RTL level in a generic

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Nicholas Krause via Gcc-patches
On 6/12/20 11:49 AM, Richard Sandiford wrote: Martin Liška writes: On 6/12/20 3:22 PM, Richard Sandiford wrote: Martin Liška writes: diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 636ad59c001..eac372e6abc 100644 --- a/gcc/tree-vect-patterns.c +++

Re: [PATCH] libgomp: added partial omp-tools.h for OMPD

2020-06-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 12, 2020 at 01:56:05PM -0400, y2s1982 wrote: > This patch adds partial omp-tools.h continaing OMPD-specific functions and > data types. > > 2020-06-12 Tony Sim You'll need two spaces before < for the script to recognize it as ChangeLog snippet start (though, it will recognize just

[PATCH] libgomp: added partial omp-tools.h for OMPD

2020-06-12 Thread y2s1982 via Gcc-patches
This patch adds partial omp-tools.h continaing OMPD-specific functions and data types. 2020-06-12 Tony Sim libgomp/ChangeLog: * omp-tools.h: New file --- libgomp/omp-tools.h | 278 1 file changed, 278 insertions(+) create mode 100644

Re: [PATH 1/6] RISC-V: Add vector mask

2020-06-12 Thread Jim Wilson
On Fri, Jun 12, 2020 at 7:30 AM 戎杰杰(无音) wrote: > - The first version for vector extension and verified on rv64imafdcv linux > target with qemu. There is no RISC-V vector extension. There is only a draft proposal to add one to the ISA. Our policy has always been to wait for draft proposals to

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Richard Sandiford
Martin Liška writes: > On 6/12/20 3:22 PM, Richard Sandiford wrote: >> Martin Liška writes: >>> diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c >>> index 636ad59c001..eac372e6abc 100644 >>> --- a/gcc/tree-vect-patterns.c >>> +++ b/gcc/tree-vect-patterns.c >>> @@ -5120,20

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Richard Biener via Gcc-patches
On June 12, 2020 5:29:40 PM GMT+02:00, "Martin Liška" wrote: >On 6/12/20 3:02 PM, Richard Biener wrote: >> For(gimple. *stmt : bb_vinfo->region_stmts()) > >Hm, that will require region_stmts() returning one another object >that will contain the begin/end methods. >Is it what we want or do I miss

Re: [PATCH v2] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Marco Elver via Gcc-patches
On Fri, 12 Jun 2020 at 17:27, Martin Liška wrote: > > On 6/12/20 4:19 PM, Marco Elver wrote: > > On Fri, 12 Jun 2020, Jakub Jelinek wrote: > > > >> On Fri, Jun 12, 2020 at 04:07:57PM +0200, Marco Elver wrote: > >>> gcc/ChangeLog: > >>> > >>> * params.opt: Add

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Martin Liška
On 6/12/20 3:02 PM, Richard Biener wrote: For(gimple. *stmt : bb_vinfo->region_stmts()) Hm, that will require region_stmts() returning one another object that will contain the begin/end methods. Is it what we want or do I miss something? Martin

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Martin Liška
On 6/12/20 3:22 PM, Richard Sandiford wrote: Martin Liška writes: diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 636ad59c001..eac372e6abc 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -5120,20 +5120,12 @@ vect_determine_precisions (vec_info

Re: [PATCH v2] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Martin Liška
On 6/12/20 4:19 PM, Marco Elver wrote: On Fri, 12 Jun 2020, Jakub Jelinek wrote: On Fri, Jun 12, 2020 at 04:07:57PM +0200, Marco Elver wrote: gcc/ChangeLog: * params.opt: Add --param=tsan-instrument-func-entry-exit=. * tsan.c (instrument_gimple): Make return value if func

[PATCH][GCC][Aarch64]: Fix for PR94880: Failure to recognize andn pattern

2020-06-12 Thread Przemyslaw Wirkus
Hi all, Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. So, for the example code: $ cat main.c int f_i(int x, int y) { return (x | y) - y; } long long f_l(long long x, long long y) { return (x | y) - y; } typedef int v4si __attribute__ ((vector_size

Re: [PATCH, RS6000 PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin

2020-06-12 Thread will schmidt via Gcc-patches
On Fri, 2020-06-12 at 10:24 -0400, David Edelsohn wrote: > Hi, Will Hi, > > On Fri, Jun 12, 2020 at 12:22 AM will schmidt < > will_schm...@vnet.ibm.com> wrote: > > > > > > Hi, > > Fix codegen implementation for the builtin > > vec_pack_to_short_fp32. > > > > Regtests are underway

[PATH 6/6] RISC-V: Add pass to delete redundancy vsetvl insn

2020-06-12 Thread 无音
gcc/ChangeLog: * config.gcc (extra_objs): Include vector pass. * config/riscv/t-riscv : Likewise. * config/riscv/riscv-pass.c : New. * config/riscv/riscv.opt (-mdelete-vsetvl): Likewise. --- gcc/config.gcc| 2 +- gcc/config/riscv/riscv-pass.c |

[PATH 3/6] RISC-V: Add vector VLEN and SEW

2020-06-12 Thread 无音
gcc/ChangeLog: * config/riscv/riscv-c.c (__riscv_vector): Define. * config/riscv/riscv-opts.h (riscv_vlen): New. * config/riscv/riscv-v.h (TARGET_VECTOR_VLEN): Define. (UNITS_PER_VR_REG): Likewise. (RISCV_VSEW_T): Likewise. * config/riscv/riscv.opt

[PATH 2/6] RISC-V: Add vector register

2020-06-12 Thread 无音
gcc/ChangeLog: * config/riscv/riscv-v.h: New. * config/riscv/riscv.h (FIRST_PSEUDO_REGISTER): Add vector register. (FIRST_PSEUDO_REGISTER): Likewise. (CALL_USED_REGISTERS): Likewise. (reg_class): Likewise. (REG_CLASS_NAMES): Likewise.

[PATH 1/6] RISC-V: Add vector mask

2020-06-12 Thread 无音
- The first version for vector extension and verified on rv64imafdcv linux target with qemu. gcc/ChangeLog: * common/config/riscv/riscv-common.c: Parse vector extension. * config/riscv/riscv.opt (TARGET_VECTOR): New. --- gcc/common/config/riscv/riscv-common.c | 4

Re: [PATCH, RS6000 PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin

2020-06-12 Thread David Edelsohn via Gcc-patches
Hi, Will On Fri, Jun 12, 2020 at 12:22 AM will schmidt wrote: > > > Hi, > Fix codegen implementation for the builtin vec_pack_to_short_fp32. > > Regtests are underway against powerpc64 (power7be,power8le,power9le). > (this is a power9 builtin, so should be a noop for most of those). > OK

Re: [PATCH v2] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Marco Elver via Gcc-patches
On Fri, 12 Jun 2020, Jakub Jelinek wrote: > On Fri, Jun 12, 2020 at 04:07:57PM +0200, Marco Elver wrote: > > gcc/ChangeLog: > > > > * params.opt: Add --param=tsan-instrument-func-entry-exit=. > > * tsan.c (instrument_gimple): Make return value if func entry > > and exit should be

[Patch] testsuite: Add offloading_enabled check and use it for xfail (PR95622)

2020-06-12 Thread Tobias Burnus
For real offloading compilers, the configure-time ENABLE_OFFLOAD macro is set to true. If it is set, some additional code paths are enabled – which can affect code generation with -fopenmp/-fopenacc. As the PR shows, this can make differences for passing/failing a testcase. – In principle, it

Re: [PATCH v2] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 12, 2020 at 04:07:57PM +0200, Marco Elver wrote: > gcc/ChangeLog: > > * params.opt: Add --param=tsan-instrument-func-entry-exit=. > * tsan.c (instrument_gimple): Make return value if func entry > and exit should be instrumented dependent on param. > >

[PATCH v2] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Marco Elver via Gcc-patches
Adds param tsan-instrument-func-entry-exit, which controls if __tsan_func_{entry,exit} calls should be emitted or not. The default behaviour is to emit the calls. This may be required by alternative race detection runtimes. One such runtime is the Kernel Concurrency Sanitizer (KCSAN):

[PATCH] Add .clang-tidy to git ignored.

2020-06-12 Thread Martin Liška
Installed as obvious. ChangeLog: * .gitignore: Add .clang-tidy. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d9d3967a12c..d9eeaf2ed7a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ TAGS.sub .lvimrc .clang-format

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Richard Biener via Gcc-patches
On June 12, 2020 2:55:49 PM GMT+02:00, "Martin Liška" wrote: >On 6/12/20 1:43 PM, Richard Sandiford wrote: >> Martin Liška writes: >>> On 6/12/20 12:46 PM, Richard Sandiford wrote: Martin Liška writes: > Hello. > > I'm working one extension of SLP which will allow to vectorize

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-12 Thread Martin Liška
On 6/12/20 11:43 AM, Richard Biener wrote: So ... how far are you with enforcing a split VEC_COND_EXPR? Thus can we avoid the above completely (even as intermediate state)? Apparently, I'm quite close. Using the attached patch I see only 2 testsuite failures: FAIL: gcc.dg/tree-ssa/pr68714.c

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Richard Sandiford
Martin Liška writes: > diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c > index 636ad59c001..eac372e6abc 100644 > --- a/gcc/tree-vect-patterns.c > +++ b/gcc/tree-vect-patterns.c > @@ -5120,20 +5120,12 @@ vect_determine_precisions (vec_info *vinfo) >else > { >

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-12 Thread Christophe Lyon via Gcc-patches
Hi, On Thu, 11 Jun 2020 at 22:37, Rainer Orth wrote: > > Hi Martin, > > > The compute_objsize() function started out as a thin wrapper around > > compute_builtin_object_size(), but over time developed its own > > features to compensate for the other function's limitations (such > > as its

[PATCH] Linux/i386: Remove SUBTARGET_FRAME_POINTER_REQUIRED

2020-06-12 Thread H.J. Lu via Gcc-patches
On Thu, Jun 11, 2020 at 8:24 PM Jeff Law wrote: > > On Sat, 2020-05-02 at 04:55 -0700, H.J. Lu wrote: > > Currently patchable area is at the wrong place. It is placed immediately > > after function label, before both .cfi_startproc and ENDBR. This patch > > adds UNSPECV_PATCHABLE_AREA for

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Martin Liška
On 6/12/20 1:43 PM, Richard Sandiford wrote: Martin Liška writes: On 6/12/20 12:46 PM, Richard Sandiford wrote: Martin Liška writes: Hello. I'm working one extension of SLP which will allow to vectorize multiple BBs. This is a first step where I abstract _bb_vec_info::region_begin and

Re: [PATCH] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Marco Elver via Gcc-patches
On Fri, 12 Jun 2020 at 12:29, Jakub Jelinek wrote: > > On Fri, Jun 12, 2020 at 09:21:59AM +0200, Marco Elver wrote: > > Adds param tsan-instrument-func-entry-exit, which controls if > > __tsan_func_{entry,exit} calls should be emitted or not. The default > > behaviour is to emit the calls. > > If

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Richard Sandiford
Martin Liška writes: > On 6/12/20 12:46 PM, Richard Sandiford wrote: >> Martin Liška writes: >>> Hello. >>> >>> I'm working one extension of SLP which will allow to vectorize multiple >>> BBs. This is a first step where I abstract _bb_vec_info::region_begin and >>> _bb_vec_info::region end by

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Martin Liška
On 6/12/20 12:46 PM, Richard Sandiford wrote: Martin Liška writes: Hello. I'm working one extension of SLP which will allow to vectorize multiple BBs. This is a first step where I abstract _bb_vec_info::region_begin and _bb_vec_info::region end by providing an iterator. Nice. diff --git

[PATCH] testcase for shared DR alignment

2020-06-12 Thread Richard Biener
This adds a reduced C testcase from libgomp.fortran/examples-4/target-1.f90 and libgomp.fortran/examples-4/target_data-1.f90 FAILs, showing a case of SLP instance stmt sharing that affects the shared dataref alignment info. 2020-06-12 Richard Biener * gcc.dg/vect/bb-slp-44.c: New

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Richard Sandiford
Martin Liška writes: > Hello. > > I'm working one extension of SLP which will allow to vectorize multiple > BBs. This is a first step where I abstract _bb_vec_info::region_begin and > _bb_vec_info::region end by providing an iterator. Nice. > diff --git a/gcc/tree-vectorizer.h

Re: [PATCH PR95570] vect: ICE: Segmentation fault in vect_loop_versioning

2020-06-12 Thread Richard Sandiford
"Yangfei (Felix)" writes: > +2020-06-12 Felix Yang > + > + PR tree-optimization/95570 > + * tree-vect-data-refs.c (vect_relevant_for_alignment_p): New function. > + (vect_verify_datarefs_alignment): Call it to filter out data > references > + in the loop whose

Re: [PATCH] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 12, 2020 at 09:21:59AM +0200, Marco Elver wrote: > Adds param tsan-instrument-func-entry-exit, which controls if > __tsan_func_{entry,exit} calls should be emitted or not. The default > behaviour is to emit the calls. If you want that, I wonder if the spots you've chosen are the best

Re: [PATCH] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Martin Liška
On 6/12/20 9:21 AM, Marco Elver wrote: Adds param tsan-instrument-func-entry-exit, which controls if __tsan_func_{entry,exit} calls should be emitted or not. The default behaviour is to emit the calls. I support the patch. What about Jakub? Martin

Re: [Patch][RFC] openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)

2020-06-12 Thread Thomas Schwinge
Hi! On 2020-06-09T16:11:03+0200, Jakub Jelinek via Gcc-patches wrote: > On Tue, Jun 09, 2020 at 04:02:19PM +0200, Tobias Burnus wrote: >> It turned out that this patch fails with LTO and partitions, >> causing fails at runtime such as >> libgomp: Duplicate node >> via libgomp/splay-tree.c's

[PATCH] Use SLP_TREE_VECTYPE consistently, get rid of STMT_VINFO_NUM_SLP_USES

2020-06-12 Thread Richard Biener
The following gets rid of the restriction in BB vectorization where we needed to ensure underlying stmts vector types agree for all uses in all SLP instances. That's done by recording the vector type for SLP nodes in all cases and using that when analyzing/code-generating by means of adjusting

[PATCH] fix vectorizable_condition ICE with EXTRACT_LAST_REDUCTION

2020-06-12 Thread Richard Biener
The previous reorg missed a guard around the else clause access. Committed as obvious. 2020-06-12 Richard Biener PR tree-optimization/95633 * tree-vect-stmts.c (vectorizable_condition): Properly guard the vec_else_clause access with EXTRACT_LAST_REDUCTION. ---

[PATCH] tsan: Add param to disable func-entry-exit instrumentation

2020-06-12 Thread Marco Elver via Gcc-patches
Adds param tsan-instrument-func-entry-exit, which controls if __tsan_func_{entry,exit} calls should be emitted or not. The default behaviour is to emit the calls. This may be required by alternative race detection runtimes. One such runtime is the Kernel Concurrency Sanitizer (KCSAN):

[committed] libstdc++: Improve tests for std::atomic_flag

2020-06-12 Thread Jonathan Wakely via Gcc-patches
The tests for clear() and test_and_set() didn't cover all cases. * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear() when the value is currently set. * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc: Actually check the return value.

Re: std::atomic_flag::test

2020-06-12 Thread Jonathan Wakely via Gcc-patches
On 11/05/20 09:11 +0100, Jonathan Wakely wrote: On 08/05/20 17:05 +0200, Ulrich Drepper via Libstdc++ wrote: This is not yet implemented. Here is a patch. 2020-05-08 Ulrich Drepper * include/bits/atomic_base.h (atomic_flag): Implement test memeber function. *

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-12 Thread Richard Biener via Gcc-patches
On Thu, Jun 11, 2020 at 10:52 AM Martin Liška wrote: > > On 6/9/20 3:42 PM, Richard Biener wrote: > > I think we need to fix that before merging. > > There's updated version of the patch that should handle the EH properly. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Re: [PATCH] guard against calls with fewer arguments than the function type implies (PR 95581)

2020-06-12 Thread Richard Biener via Gcc-patches
On Fri, Jun 12, 2020 at 2:31 AM Segher Boessenkool wrote: > > On Tue, Jun 09, 2020 at 09:51:12AM -0600, Martin Sebor wrote: > > >I think the backend declaration is wrong, the function only takes > > >a void * argument and returns a long. > > > > Thanks. In his comment on the bug Segher (CC'd)

Re: [PATCH] rs6000: skip debug info statements

2020-06-12 Thread Richard Biener via Gcc-patches
On Thu, Jun 11, 2020 at 9:04 PM Segher Boessenkool wrote: > > Hi! > > On Thu, Jun 11, 2020 at 01:49:57PM +0200, Martin Liška wrote: > > Since stmt_vec_info is not generated for debug info statements, these needs > > to > > be skipped in rs6000_density_test. > > > PR target/95627 > > *

[Ada] Implement AI12-0369

2020-06-12 Thread Pierre-Marie de Rodat
AI12-0369 relaxes the rules for the Static_Barriers and Pure_Barriers restrictions so that subcomponents of a protected object can be named (subject to some restrictions) in a barrier expression. Note that one effect of this is to undo a change that was made recently for AI12-0290. Tested on

[Ada] Improve code generated for assignment of dynamic record aggregates

2020-06-12 Thread Pierre-Marie de Rodat
This mainly improves the code generated for the assignment of dynamic record aggregates, which was always going through a temporary if the target of the assignment was not a simple identifier (this is not the case for dynamic array aggregates). This also extends a little the set of acceptable

[Ada] Fix anonymous-to-named access type implicit conversion legality checking

2020-06-12 Thread Pierre-Marie de Rodat
There are some cases where an explicit type conversion from an anonymous access type to a named access type is legal but an implicit conversion is not. Ada RM 8.6 requires that for such an implicit conversion (but not for an explicit conversion), the operand of the conversion "shall denote a view

[Ada] Alphabetic ordering for name and pragmas

2020-06-12 Thread Pierre-Marie de Rodat
Identifiers in the snames template file are ordered either logically or alphabetically, but the Test_Case identifier was clearly out-of-order. Likewise for pragmas. Cleanup before adding a new aspect; semantics in unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Piotr

[Ada] Fix handling of Ada 83 OUT parameter rule

2020-06-12 Thread Pierre-Marie de Rodat
The current code was climbing the tree manually assuming that an array attribute (e.g. 'First) would appear immediately, which isn't the case for e.g. a selected component expression. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Arnaud Charlet gcc/ada/ * sem_res.adb

[Ada] AI12-0074 View conversions and out parameters passed by copy

2020-06-12 Thread Pierre-Marie de Rodat
This Ada 202x AI makes illegal some cases of out parameters whose type has a Default_Value aspect. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Arnaud Charlet gcc/ada/ * sem_res.adb (Resolve_Actuals): Check for AI12-0074.--- gcc/ada/sem_res.adb +++

[Ada] Fix handling of subprograms declared in a protected body

2020-06-12 Thread Pierre-Marie de Rodat
Such subprograms are not protected and have convention Intrinsic to ensure that their 'Access isn't taken as per RM 6.3.1(10/2). Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Arnaud Charlet gcc/ada/ * exp_ch6.adb (Expand_N_Subprogram_Declaration): Do nothing for

[Ada] Don't correct socket timeout on Windows Server 2019

2020-06-12 Thread Pierre-Marie de Rodat
Windows Server 2019 do not need 500ms socket timeout correction. The problem is that Windows API recommended function IsWindowsVersionOrGreater is not comparing the build part which is only difference between Windows 2016 and 2019 servers. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Bump secondary stack alignment factor in full runtimes

2020-06-12 Thread Pierre-Marie de Rodat
Use Standard'Maximum_Alignment * 2 unconditionally to accommodate possible requirements by user code compiled with specific cpu/arch options such as -mavx on x86 targets, which Gigi assumes the SS can handle. Such options influence what Standard'Maximum_Alignment returns and are typically not

[Ada] ACATS 4.1Q - CDD2A04 - RLS not followed

2020-06-12 Thread Pierre-Marie de Rodat
The required level of support for elementary streaming includes support for 24 bits elements, which is added here. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Arnaud Charlet gcc/ada/ * exp_strm.adb (Build_Elementary_Input_Call): Add support for 24 bits

[Ada] Remove redundant iterations in checks for overlapping actuals

2020-06-12 Thread Pierre-Marie de Rodat
We were detecting overlapping actuals in a call like "Proc (A, B, C)" using two loops that iterated over all parameters, so we were examining 9 pairs: A-A, A-B, A-C B-A, B-B, B-C C-A, C-B, C-C Now the outer loop iterates over all parameters, while the inner loop always starts from the next

[Ada] Implement AI12-0175 Preelaborable packages with address clauses

2020-06-12 Thread Pierre-Marie de Rodat
This implements the AI under the -gnat2020 switch, which extends the set of calls that can be made during the elaboration of library units subject to the aspect/pragma Preelaborate, beyond the existing ones to static functions. Calls to certain functions that are essentially unchecked conversions

[Ada] Compiler locks up with -gnatX and formal subprogram with aspects

2020-06-12 Thread Pierre-Marie de Rodat
This patch fixes an infinite loop in the compiler on an instantiation that includes formal packages and formal subprograms with aspect specifications (but no pre- or postconditions), when compiling with -gnatX. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Ed Schonberg

[Ada] Reuse Is_Entry where possible

2020-06-12 Thread Pierre-Marie de Rodat
Replace a low-level membership test "Ekind_In (Id, E_Entry, E_Entry_Family)" with a high-level "Is_Entry (Id)", which is more readable. Semantics stays the same. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Piotr Trojanek gcc/ada/ * contracts.adb, einfo.adb,

[Ada] Detect overlapping actuals in entry calls

2020-06-12 Thread Pierre-Marie de Rodat
For subprograms we call Warn_On_Overlapping_Actuals in Resolve_Call; however, for protected entries we didn't call it at all, because Resolve_Call was executing Resolve_Entry_Call and returning early. As a result, we didn't detect overlapping actuals in entry calls. Now we do. Tested on

[Ada] Compiler crash on instance with overloaded actual and aspects

2020-06-12 Thread Pierre-Marie de Rodat
This patch fixes a crash in the compiler when handling an instantiation with a formal subprogram that carries an aspect specification, when the actual in the instantiation is an overloaded name. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Ed Schonberg gcc/ada/ *

[Ada] Simplify getting discriminant value from a list of constraints

2020-06-12 Thread Pierre-Marie de Rodat
Routine Get_Discr_Value takes a name of a discriminant, not its entity, so its parameter should be a Node_Id, not an Entity_Id. Also, fix typo in its comment and refactor repeated calls in the body. Semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Piotr

[Ada] Remove suppression for overlapping actuals in internal units

2020-06-12 Thread Pierre-Marie de Rodat
Detection of overlapping actuals was suppressed for internal units, because we were getting spurious warnings on container units. Now this suppression has no effect (most likely because ignore parameters of generic types). Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Piotr

[Ada] Diagnose illegal overriding indicators in protected bodies

2020-06-12 Thread Pierre-Marie de Rodat
This patch adds checks to reject illegal overriding indicators that appear on subprogram declarations in protected bodies, where such a subprogram cannot override any operation. Fixes ACATS test B831006. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Ed Schonberg gcc/ada/

[Ada] ACATS 4.2Q - BDD2007

2020-06-12 Thread Pierre-Marie de Rodat
This acats test shows that we are not checking 13.1(9.2/5) for representation aspects, now fixed. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Arnaud Charlet gcc/ada/ * aspects.ads (Is_Representation_Aspect): New array. * sem_ch13.adb

[Ada] Small cleanup in handling of Ada 2012 implicit dereferences

2020-06-12 Thread Pierre-Marie de Rodat
This aligns the handling of Ada 2012 implicit dereferences in the Is_OK_Variable_For_Out_Formal predicate wih that in Is_Variable, and removes unreachable code as a result. This also makes more use of the Get_Reference_Discriminant helper function to retrieve the reference discriminant of a type.

[Ada] Put_Image attribute

2020-06-12 Thread Pierre-Marie de Rodat
Enable Put_Image for types that don't cause regressions (which is most types). Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Bob Duff gcc/ada/ * debug.adb: Remove usage of -gnatd_z. * exp_attr.adb, exp_put_image.ads, exp_put_image.adb: Clean up the

Re: [PATCH] wwwdocs: Document devel/omp/gcc-10 branch

2020-06-12 Thread Thomas Schwinge
Hi Kwok! On 2020-06-10T17:23:58+0100, Kwok Cheung Yeung wrote: > On 10/06/2020 4:15 pm, Tobias Burnus wrote: >> On 6/10/20 3:34 PM, Kwok Cheung Yeung wrote: >>> This patch updates the previous entry on the website for devel/omp/gcc-9 to >>> refer to the new branch instead. This removes

[Ada] Implement AI12-0269 No_Return for functions

2020-06-12 Thread Pierre-Marie de Rodat
This implements the AI under the -gnat2020 switch, which extends the Ada 2005 No_Return aspect/pragma to functions and generic functions. As explained in the AI, functions subject to this aspect/pragma must still have a return statement, but it must be of a specific form. This also fixes the

[Ada] Ada2020: update Big_Numbers.* specs

2020-06-12 Thread Pierre-Marie de Rodat
This patch updates the Put_Image facilities in the Big_Numbers packages to match the actual implementation of Put_Image. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-12 Bob Duff gcc/ada/ * libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads, libgnat/a-nbnbin__gmp.adb,

Re: [patch] Fix ICE in verify_sra_access_forest

2020-06-12 Thread Richard Biener via Gcc-patches
On Thu, Jun 11, 2020 at 5:24 PM Eric Botcazou wrote: > > > I am not very good at reasoning about reverse storage order stuff but > > can it ever happen that this reverse is not the same as racc->reverse? > > > > In order for that to happen, we'd have to have an assignment (folded > > memcpy?)

Re: [PATCH 2/2] Tune memcpy and memset for Zen cores.

2020-06-12 Thread Martin Liška
PING^2 On 6/3/20 11:14 AM, Martin Liška wrote: On 6/1/20 1:40 PM, Martin Liška wrote: Adding Honza as Uros recommended him for a review. @Honza asked me personally to remind him this patch ;) Martin

Re: [PATCH] Optimize multiplication for V8QI,V16QI,V32QI under TARGET_AVX512BW [target/95488]

2020-06-12 Thread Hongtao Liu via Gcc-patches
Thanks for the review. On Fri, Jun 12, 2020 at 11:28 AM Jeff Law wrote: > > On Fri, 2020-06-05 at 13:46 +0800, Hongtao Liu via Gcc-patches wrote: > > Hi: > > > > +/* Optimize vector MUL generation for V8QI, V16QI and V32QI > > + under TARGET_AVX512BW. i.e. for v16qi a * b, it has > > + > > +

[PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-12 Thread Martin Liška
Hello. I'm working one extension of SLP which will allow to vectorize multiple BBs. This is a first step where I abstract _bb_vec_info::region_begin and _bb_vec_info::region end by providing an iterator. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be

Re: (patch] Optimize assignment to volatile aggregate variable

2020-06-12 Thread Richard Biener via Gcc-patches
On Thu, Jun 11, 2020 at 1:52 PM Eric Botcazou wrote: > > Hi, > > gimplify_modify_expr_rhs has an optimization whereby the assignment to an > aggregate variable from a read-only object with a DECL_INITIAL is optimized > into the direct assignment of the DECL_INITIAL, provided that no temporary is

PING: Discussion about the medium code model in aarch64

2020-06-12 Thread bule
Hi, I reported a PR in gcc Bugzilla about the medium code model in aarch64. A solution is proposed and some discussion has been posted. The details of the discussion can be found here : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95285 Wilco suggest me to make a PIC 48-bit code model by

Re: [PATCH PR95199] vect: Remove extra variable created for memory reference

2020-06-12 Thread Richard Sandiford
"zhoukaipeng (A)" writes: > Hi, > > This is a fix for pr95199. > In vectorization, vinfo->ivexpr_map is supposed to catch those "IV base > and/or step expressions". Just call cse_and_gimplify_to_preheader to handle > gathering/scattering to avoid the extra variable. > > Bootstrap and tested on

Re: [PATCH] middle-end: Optimize (A)^(B) to (A^B) in simplify_rtx.

2020-06-12 Thread Richard Sandiford
"Roger Sayle" writes: > diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c > index 28c2dc6..ccf5f6d 100644 > --- a/gcc/simplify-rtx.c > +++ b/gcc/simplify-rtx.c > @@ -3128,6 +3128,17 @@ simplify_binary_operation_1 (enum rtx_code code, > machine_mode mode, >

Re: [PATCH 3/5] gthr-vxworks.c: add include of taskLib.h

2020-06-12 Thread Olivier Hainque
Hi Rasmus, (switched from gcc to gcc-patches list) > On 26 May 2020, at 16:52, Rasmus Villemoes wrote: > > Fix > > gcc-src/libgcc/config/gthr-vxworks.c:65:7: warning: implicit declaration of > function 'taskDelay'; did you mean 'sysDelay'? > [-Wimplicit-function-declaration] > 65 |

ping**(5./7.) [patch, fortran] Fix memory leak on deallocation

2020-06-12 Thread Thomas König
In the meantime, here is a patch which fixes a regression I introduced when fixing a regression with a memory leak.  The important thing here is to realize that we do not need to finalize (and deallocate) multiple times for the same expression and the same component in the same namespace.  It

[PATCH PR95199] vect: Remove extra variable created for memory reference

2020-06-12 Thread zhoukaipeng (A)
Hi, This is a fix for pr95199. In vectorization, vinfo->ivexpr_map is supposed to catch those "IV base and/or step expressions". Just call cse_and_gimplify_to_preheader to handle gathering/scattering to avoid the extra variable. Bootstrap and tested on aarch64/x86_64 Linux platform. No new