Re: Unable to build Ada on fedora

2021-06-16 Thread Arnaud Charlet
> I've been unable to build ada on my fedora box since: Yes, Jakub mentioned it yesterday and I've sent him a potential patch, I was waiting for his feedback. I've now committed it blindly (can't make things worse), let me know if the problem is fully solved or if not, what output you are now

[PATCH RFC] mklog: add subject line skeleton

2021-06-16 Thread Jason Merrill via Gcc-patches
In the recent gcc-commit-mklog thread on gcc@ it occurred to me that the command could also fill in part of the commit subject line. If the first PR is foo/1234, and the commit does not yet have a subject line, this will add foo: [PR1234] Does this seem like an improvement? contrib/ChangeLog:

[no subject]

2021-06-16 Thread First Last via Gcc-patches
I.n.h. Module metadata package name: com.google.android.modulemetadatacan't find the pid Failed to find: /data/misc/anrd/ Duration of 'DUMPSYS CRITICAL': 1.25s Duration of 'DUMP TRACES': 46.26s Adding dir /cache/recovery (recursive: 1) Adding dir /data/misc/recovery (recursive: 1) Adding dir

[pushed] c++: Tweak PR101029 fix

2021-06-16 Thread Jason Merrill via Gcc-patches
The case of an initializer with side effects for a zero-length array seems extremely unlikely, but we should still return the right type in that case. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/101029 gcc/cp/ChangeLog: * init.c (build_vec_init): Preserve the type of

Re: Ping: [PATCH 1/2] correct BB frequencies after loop changed

2021-06-16 Thread guojiufu via Gcc-patches
On 2021-06-15 12:57, guojiufu via Gcc-patches wrote: On 2021-06-14 17:16, Jan Hubicka wrote: On 5/6/2021 8:36 PM, guojiufu via Gcc-patches wrote: > Gentle ping. > > Original message: > https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555871.html I think you need a more aggressive ping 

Unable to build Ada on fedora

2021-06-16 Thread Andrew MacLeod via Gcc-patches
I've been unable to build ada on my fedora box since: commit abcf5174979bcb91ac4c921eaa19a5b37f231ae4 Author: Arnaud Charlet Date:   Wed Jan 13 08:49:15 2021 -0500     [Ada] Use runtime from base compiler during stage1     gcc/ada/     * Make-generated.in: Add rule to copy runtime

RE: [EXTERNAL] [PATCH] gcov: Use system IO buffering

2021-06-16 Thread Eugene Rozenfeld via Gcc-patches
The commit from this patch (https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05) changed the semantics of gcov_read_string and gcov_write_string. Before this change the string storage was as described in gcov-io.h: "Strings are padded with 1 to 4 NUL

Ping [PATCH]: Generate 128-bit divide/modulus

2021-06-16 Thread Michael Meissner via Gcc-patches
Ping patch. In particular, we would like to get this to GCC 11.2 because it is power10 enablement. | Date: Fri, 4 Jun 2021 11:10:37 -0400 | Subject: Generate 128-bit divide/modulus | Message-ID: <20210604151037.ga27...@ibm-toto.the-meissners.org> -- Michael Meissner, IBM IBM, M/S 2506R, 550

Ping: [PATCH 3/3] Add IEEE 128-bit fp conditional move on PowerPC.

2021-06-16 Thread Michael Meissner via Gcc-patches
Ping patch. In particular, we would like to get this patch into GCC 11.2 for power10 enablement. | Date: Tue, 8 Jun 2021 20:24:47 -0400 | Subject: [PATCH 3/3] Add IEEE 128-bit fp conditional move on PowerPC. | Message-ID: <20210609002447.gc18...@ibm-toto.the-meissners.org> -- Michael Meissner,

Ping: [PATCH 2/3] Fix IEEE 128-bit min/max test.

2021-06-16 Thread Michael Meissner via Gcc-patches
Ping patch. In particular, we like to get this into GCC 11.2 as part of power10 enablement. | Date: Tue, 8 Jun 2021 20:22:40 -0400 | Subject: [PATCH 2/3] Fix IEEE 128-bit min/max test. | Message-ID: <20210609002240.gb18...@ibm-toto.the-meissners.org> -- Michael Meissner, IBM IBM, M/S 2506R,

Ping: [PATCH 1/3] Add IEEE 128-bit min/max support on PowerPC.

2021-06-16 Thread Michael Meissner via Gcc-patches
Ping patch. In particular, we would like to get this into the GCC 11.2 backport as it is power10 enablement. | Date: Tue, 8 Jun 2021 20:21:25 -0400 | Subject: [PATCH 1/3] Add IEEE 128-bit min/max support on PowerPC. | Message-ID: <20210609002125.ga18...@ibm-toto.the-meissners.org> -- Michael

[PATCH] Add recomputation to outgoing_edge_range.

2021-06-16 Thread Andrew MacLeod via Gcc-patches
This change adds first degree recomputation to the gori engine. "Exports" are any ssa_name which is in the definition chain of one of the SSA_NAMES on the condition. a_2 = b_3 +6 if (a_2 > 10 && a_2 <20)    // a_2 has the range [11, 19] The condition tells us that the range of a_2 is

[PATCH] Range_on_edge in ranger_cache should return true for all ranges.

2021-06-16 Thread Andrew MacLeod via Gcc-patches
This patch mostly affects an internal routine in the ranger_cache.  When doing the cache rework to also be a range_query object, I implemented range_on_edge to always return a range, but only return TRUE when the range was actually changed on the edge.  This was a well intention but misguided

[pushed] correct -Wmismatched-dealloc default

2021-06-16 Thread Martin Sebor via Gcc-patches
A user pointed out to me that the manual documented the wrong defaults for the -Wmismatched-dealloc and -Wmismatched-new-delete options. I pushed the correction in r12-1544 (also attached). Martin commit 139564821dd2e4a9cbb08677ff12cf291d7d0218 Author: Martin Sebor Date: Wed Jun 16 16:49:56

[pushed] c++: static memfn from non-dependent base [PR101078]

2021-06-16 Thread Jason Merrill via Gcc-patches
After my patch for PR91706, or before that with the qualified call, tsubst_baselink returned a BASELINK with BASELINK_BINFO indicating a base of a still-dependent derived class. We need to look up the relevant base binfo in the substituted class. Tested x86_64-pc-linux-gnu, applying to trunk.

Re: [PATCH] Add needed earlyclobber to fusion patterns

2021-06-16 Thread Segher Boessenkool
On Wed, Jun 16, 2021 at 01:51:16PM -0500, Aaron Sawdey wrote: > The add-logical and add-add fusion patterns all have constraint > alternatives "=0,1,,r" for the output (3). The inputs 0 and 1 > are used in the first fusion instruction and then either may be > reused as a temp for the output of the

[PATCH] libstdc++: Fix for deadlock in std::counting_semaphore [PR100806]

2021-06-16 Thread Thomas Rodgers
Same as previous version except removing the copyright notice from the test. libstdc++-v3/ChangeLog: libstdc++/PR100806 * include/bits/semaphore_base.h (__atomic_semaphore::_M_release(): Force _M_release() to wake all waiting threads. *

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-16 Thread Qing Zhao via Gcc-patches
So, the major question now is: Is one single repeatable pattern enough for pattern initialization for all different types of auto variables? If YES, then the implementation for pattern initialization will be much easier and simpler as you pointed out. And will save me a lot of pain to

[PATCH] Add needed earlyclobber to fusion patterns

2021-06-16 Thread Aaron Sawdey via Gcc-patches
The add-logical and add-add fusion patterns all have constraint alternatives "=0,1,,r" for the output (3). The inputs 0 and 1 are used in the first fusion instruction and then either may be reused as a temp for the output of the first insn which is input to the second. However, if input 2 is the

Re: [PATCH] make rich_location safe to copy

2021-06-16 Thread David Malcolm via Gcc-patches
On Wed, 2021-06-16 at 11:21 -0600, Martin Sebor wrote: > On 6/16/21 10:35 AM, Jason Merrill wrote: > > On 6/16/21 12:11 PM, Martin Sebor wrote: > > > On 6/16/21 9:06 AM, David Malcolm wrote: > > > > On Wed, 2021-06-16 at 08:52 -0600, Martin Sebor wrote: > > > > > On 6/16/21 6:38 AM, David Malcolm

Re: [EXTERNAL] Re: [PATCH] tree-optimization: Optimize division followed by multiply [PR95176]

2021-06-16 Thread Victor Tong via Gcc-patches
Hi Richard, Thanks for the feedback. From what you said, I can think of two possible solutions (though I'm not sure if either is feasible/fully correct): Option 1: Have the new X * (Y / X) --> Y - (Y % X) optimization only run in scenarios that don't interfere with the existing X - (X / Y) * Y

[PATCH] libstdc++: Fix for deadlock in std::counting_semaphore [PR100806]

2021-06-16 Thread Thomas Rodgers
This is an 'interim' fix. For now it forces all waiting threads to wake on _M_release(). This isn't exactly efficient but resolves the issue in the immediate term. libstdc++-v3/ChangeLog: libstdc++/PR100806 * include/bits/semaphore_base.h (__atomic_semaphore::_M_release():

Re: [PATCH] make rich_location safe to copy

2021-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/21 10:35 AM, Jason Merrill wrote: On 6/16/21 12:11 PM, Martin Sebor wrote: On 6/16/21 9:06 AM, David Malcolm wrote: On Wed, 2021-06-16 at 08:52 -0600, Martin Sebor wrote: On 6/16/21 6:38 AM, David Malcolm wrote: On Tue, 2021-06-15 at 19:48 -0600, Martin Sebor wrote: Thanks for

Re: [PATCH] gcc/configure.ac: fix register issue for global_load assembler functions

2021-06-16 Thread Joseph Myers
On Wed, 16 Jun 2021, Julian Brown wrote: > > +if test x$gcc_cv_as_gcn_global_load_fixed = xyes; then > > + AC_DEFINE(HAVE_GCN_ASM_GLOBAL_LOAD_FIXED, 1, [Define if your > > assembler has fixed global_load functions.]) > > +else > > + AC_DEFINE(HAVE_GCN_ASM_GLOBAL_LOAD_FIXED, 0,

[PATCH] Avoid loading an undefined value in the ranger_cache constructor.

2021-06-16 Thread Andrew MacLeod via Gcc-patches
On 6/16/21 5:41 AM, Maxim Kuvyrkov wrote: + m_new_value_p = state; + return ret; } // Dump the caches for basic block BB to file F. Thanks, -- Maxim Kuvyrkov https://www.linaro.org Let me know if the problem is resolved. pushed as obvious. Andrew commit

Re: [PATCH, V2] auto_vec copy/move improvements

2021-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/21 4:13 AM, Richard Biener via Gcc-patches wrote: On Wed, Jun 16, 2021 at 5:18 AM Trevor Saunders wrote: - Unfortunately using_auto_storage () needs to handle m_vec being null. - Handle self move of an auto_vec to itself. - Make sure auto_vec defines the classes move constructor and

[Patch, fortran V2] PR fortran/100097 PR fortran/100098 - [Unlimited] polymorphic pointers and allocatables have incorrect rank

2021-06-16 Thread José Rui Faustino de Sousa via Gcc-patches
Hi All! Proposed patch to: PR100097 - Unlimited polymorphic pointers and allocatables have incorrect rank PR100098 - Polymorphic pointers and allocatables have incorrect rank Patch tested only on x86_64-pc-linux-gnu. Version 2 no longer re-initializes explicit initialized variables, which

Re: [PATCH] make rich_location safe to copy

2021-06-16 Thread Jason Merrill via Gcc-patches
On 6/16/21 12:11 PM, Martin Sebor wrote: On 6/16/21 9:06 AM, David Malcolm wrote: On Wed, 2021-06-16 at 08:52 -0600, Martin Sebor wrote: On 6/16/21 6:38 AM, David Malcolm wrote: On Tue, 2021-06-15 at 19:48 -0600, Martin Sebor wrote: Thanks for writing the patch. While debugging locations I

Re: [PATCH] make rich_location safe to copy

2021-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/21 9:06 AM, David Malcolm wrote: On Wed, 2021-06-16 at 08:52 -0600, Martin Sebor wrote: On 6/16/21 6:38 AM, David Malcolm wrote: On Tue, 2021-06-15 at 19:48 -0600, Martin Sebor wrote: Thanks for writing the patch. While debugging locations I noticed the semi_embedded_vec template in

Re: [PATCH] tree-optimization PR/101014 - Limit new value calculations to first order effects.

2021-06-16 Thread Andrew MacLeod via Gcc-patches
On 6/16/21 5:41 AM, Maxim Kuvyrkov wrote: On 15 Jun 2021, at 00:07, Andrew MacLeod via Gcc-patches wrote: As mentioned in the Text from the PR: "When a range is being calculated for an ssa-name, the propagation process often goes along back edges. These back edges sometime require other

Re: [PATCH] gcc/configure.ac: fix register issue for global_load assembler functions

2021-06-16 Thread Julian Brown
At the risk of overstepping my GCN backend review remit... On Wed, 16 Jun 2021 11:34:53 +0200 Marcel Vollweiler wrote: > index d9fc3c2..e179ce1 100644 > --- a/gcc/configure.ac > +++ b/gcc/configure.ac > @@ -5357,6 +5357,30 @@ case "$target" in > ;; > esac > > +# This tests if the

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/21 6:46 AM, Richard Sandiford via Gcc-patches wrote: Richard Biener via Gcc-patches writes: On Tue, Jun 15, 2021 at 8:02 AM Trevor Saunders wrote: This makes it clear the caller owns the vector, and ensures it is cleaned up. Signed-off-by: Trevor Saunders bootstrapped and

Re: [PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-16 Thread Martin Jambor
Hi, On Wed, Jun 16 2021, Jakub Jelinek wrote: > On Tue, Jun 15, 2021 at 06:11:27PM +0200, Richard Biener wrote: >> >--- a/gcc/tree-sra.c >> >+++ b/gcc/tree-sra.c >> >@@ -915,6 +915,12 @@ create_access (tree expr, gimple *stmt, bool >> >write) >> >if (!DECL_P (base) || !bitmap_bit_p

[pushed] libcpp: location comparison within macro [PR100796]

2021-06-16 Thread Jason Merrill via Gcc-patches
The patch for 96391 changed linemap_compare_locations to give up on comparing locations from macro expansions if we don't have column information. But in this testcase, the BOILERPLATE macro is multiple lines long, so we do want to compare locations within the macro. So this patch moves the

PING: [Patch, fortran] PR fortran/96870 - Class name on error message

2021-06-16 Thread José Rui Faustino de Sousa via Gcc-patches
*PING* Forwarded Message Subject: [Patch, fortran] PR fortran/96870 - Class name on error message Date: Mon, 31 Aug 2020 16:09:32 + From: José Rui Faustino de Sousa To: fort...@gcc.gnu.org, gcc-patches@gcc.gnu.org Hi all! Proposed patch to PR96870 - Class name on error

PING: [Patch, fortran] PR fortran/96724 - Bogus warnings with the repeat intrinsic and the flag -Wconversion-extra

2021-06-16 Thread José Rui Faustino de Sousa via Gcc-patches
*PING* Forwarded Message Subject: [Patch, fortran] PR fortran/96724 - Bogus warnings with the repeat intrinsic and the flag -Wconversion-extra Date: Thu, 20 Aug 2020 16:52:10 + From: José Rui Faustino de Sousa To: fort...@gcc.gnu.org, gcc-patches@gcc.gnu.org Hi all!

Re: [PATCH] make rich_location safe to copy

2021-06-16 Thread David Malcolm via Gcc-patches
On Wed, 2021-06-16 at 08:52 -0600, Martin Sebor wrote: > On 6/16/21 6:38 AM, David Malcolm wrote: > > On Tue, 2021-06-15 at 19:48 -0600, Martin Sebor wrote: > > > > Thanks for writing the patch. > > > > > While debugging locations I noticed the semi_embedded_vec template > > > in line-map.h

Re: [PATCH][version 3]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-06-16 Thread Qing Zhao via Gcc-patches
Hi, Richard, On Jun 16, 2021, at 1:19 AM, Richard Biener mailto:rguent...@suse.de>> wrote: +/* Expand the IFN_DEFERRED_INIT function according to its second argument. */ +static void +expand_DEFERRED_INIT (internal_fn, gcall *stmt) +{ + tree var = gimple_call_lhs (stmt); + tree init =

Re: [PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/21 5:48 AM, Jakub Jelinek wrote: On Tue, Jun 15, 2021 at 06:11:27PM +0200, Richard Biener wrote: --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -915,6 +915,12 @@ create_access (tree expr, gimple *stmt, bool write) if (!DECL_P (base) || !bitmap_bit_p (candidate_bitmap, DECL_UID (base)))

Re: [PATCH] make rich_location safe to copy

2021-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/21 6:38 AM, David Malcolm wrote: On Tue, 2021-06-15 at 19:48 -0600, Martin Sebor wrote: Thanks for writing the patch. While debugging locations I noticed the semi_embedded_vec template in line-map.h doesn't declare a copy ctor or copy assignment, but is being copied in a couple of

Re: [PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-16 Thread Jeff Law via Gcc-patches
On 6/16/2021 4:00 AM, Richard Biener wrote: On Wed, 16 Jun 2021, Martin Jambor wrote: Hi Richi, On Tue, Jun 15 2021, Richard Biener wrote: On June 15, 2021 5:09:40 PM GMT+02:00, Martin Jambor wrote: Hi, When SRA transforms an assignment where the RHS is an aggregate decl that it

Re: [RFC] ldist: Recognize rawmemchr loop patterns

2021-06-16 Thread Richard Biener via Gcc-patches
On Mon, Jun 14, 2021 at 7:26 PM Stefan Schulze Frielinghaus wrote: > > On Thu, May 20, 2021 at 08:37:24PM +0200, Stefan Schulze Frielinghaus wrote: > [...] > > > but we won't ever arrive here because of the niters condition. But > > > yes, doing the pattern matching in the innermost loop

[PATCH] i386: Add missing two element 64bit vector permutations [PR89021]

2021-06-16 Thread Uros Bizjak via Gcc-patches
In addition to V8QI permutations, several other missing permutations are added for 64bit vector modes for TARGET_SSSE3 and TARGET_SSE4_1 targets. 2021-06-16 Uroš Bizjak gcc/ PR target/89021 * config/i386/i386-expand.c (expand_vec_perm_2perm_pblendv): Handle 64bit modes for

Re: [PATCH 2/2] libstdc++: Use template form for pretty-printing tuple elements

2021-06-16 Thread Jonathan Wakely via Gcc-patches
On Mon, 14 Jun 2021 at 19:14, Paul Smith via Libstdc++ wrote: > > std::tuple elements are retrieved via std::get<> (template) not > [] (array); have the generated output string match this. Both of your patches seem to be based on the idea that the output is supposed to correspond to how you

Re: [PATCH 2/1] libstdc++: Non-triv-copyable extra args aren't simple [PR100940]

2021-06-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 20:29, Patrick Palka via Libstdc++ wrote: > > On Tue, 15 Jun 2021, Patrick Palka wrote: > > > This force-enables perfect forwarding call wrapper semantics whenever > > the extra arguments of a partially applied range adaptor aren't all > > trivially copyable, so as to avoid

Re: [committed] libstdc++: Add noexcept specifiers to some range adaptors

2021-06-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 19:32, Jonathan Wakely wrote: > > Signed-off-by: Jonathan Wakely > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_util.h (view_interface): Add noexcept to > empty, operator bool, data and size members. > (subrange): Add noexcept to constructors.

Re: [PATCH] Vectorization of BB reductions

2021-06-16 Thread Richard Biener
On Wed, 16 Jun 2021, Richard Sandiford wrote: > Richard Biener writes: > > This adds a simple reduction vectorization capability to the > > non-loop vectorizer. Simple meaning it lacks any of the fancy > > ways to generate the reduction epilogue but only supports > > those we can handle via a

Re: [committed] libstdc++: Use function object for __decay_copy helper

2021-06-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 19:28, Jonathan Wakely wrote: > > By changing __cust_access::__decay_copy from a function template to a > function object we avoid ADL. That means it's fine to call it > unqualified (the compiler won't waste time doing ADL in associated > namespaces, and won't try to

Re: [committed] libstdc++: Make ranges CPOs final and not addressable

2021-06-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 15 Jun 2021 at 22:33, Jonathan Wakely wrote: > > On Tue, 15 Jun 2021 at 21:32, Tim Song wrote: > > > > CPOs are specified as actual semiregular function objects that can be > > copied and constructed freely, so it seems a bit hostile to make them > > final/non-addressable? (It's debatable

Re: [PATCH] Vectorization of BB reductions

2021-06-16 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > This adds a simple reduction vectorization capability to the > non-loop vectorizer. Simple meaning it lacks any of the fancy > ways to generate the reduction epilogue but only supports > those we can handle via a direct internal function reducing > a vector to a scalar.

Re: [PATCH 5/6] make get_domminated_by_region return a auto_vec

2021-06-16 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Tue, Jun 15, 2021 at 8:02 AM Trevor Saunders wrote: >> >> This makes it clear the caller owns the vector, and ensures it is cleaned up. >> >> Signed-off-by: Trevor Saunders >> >> bootstrapped and regtested on x86_64-linux-gnu, ok? > > OK. > > Btw, are

[PATCH] Vectorization of BB reductions

2021-06-16 Thread Richard Biener
This adds a simple reduction vectorization capability to the non-loop vectorizer. Simple meaning it lacks any of the fancy ways to generate the reduction epilogue but only supports those we can handle via a direct internal function reducing a vector to a scalar. One of the main reasons is to

Re: [PATCH] testsuite: aarch64: Add zero-high-half tests for narrowing shifts

2021-06-16 Thread Richard Sandiford via Gcc-patches
Jonathan Wright via Gcc-patches writes: > Hi, > > This patch adds tests to verify that Neon narrowing-shift instructions > clear the top half of the result vector. It is sufficient to show that a > subsequent combine with a zero-vector is optimized away - leaving > just the narrowing-shift

Re: [PATCH] make rich_location safe to copy

2021-06-16 Thread David Malcolm via Gcc-patches
On Tue, 2021-06-15 at 19:48 -0600, Martin Sebor wrote: Thanks for writing the patch. > While debugging locations I noticed the semi_embedded_vec template > in line-map.h doesn't declare a copy ctor or copy assignment, but > is being copied in a couple of places in the C++ parser (via >

Re: [PATCH V2] aarch64: Model zero-high-half semantics of ADDHN/SUBHN instructions

2021-06-16 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > Version 2 of this patch adds tests to verify the benefit of this change. > > Ok for master? > > Thanks, > Jonathan > > --- > > gcc/ChangeLog: > > 2021-06-14 Jonathan Wright > > * config/aarch64/aarch64-simd.md (aarch64_hn): > Change to an

Re: [PATCH V2] aarch64: Model zero-high-half semantics of [SU]QXTN instructions

2021-06-16 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > Version 2 of the patch adds tests to verify the benefit of this change. > > Ok for master? > > Thanks, > Jonathan > > --- > > gcc/ChangeLog: > > 2021-06-14 Jonathan Wright > > * config/aarch64/aarch64-simd-builtins.def: Split generator > for

Re: [PATCH V2] aarch64: Model zero-high-half semantics of SQXTUN instruction in RTL

2021-06-16 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > Version 2 of the patch adds tests to verify the benefit of this change. > > Ok for master? > > Thanks, > Jonathan > > --- > gcc/ChangeLog: > > 2021-06-14 Jonathan Wright > > * config/aarch64/aarch64-simd-builtins.def: Split generator > for

Re: [PATCH V2] aarch64: Model zero-high-half semantics of XTN instruction in RTL

2021-06-16 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > Version 2 of this patch adds tests to verify the benefit of this change. > > Ok for master? > > Thanks, > Jonathan > > --- > > gcc/ChangeLog: > > 2021-06-11 Jonathan Wright > > * config/aarch64/aarch64-simd.md (aarch64_xtn_insn_le): > Define -

Re: [PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-16 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 15, 2021 at 06:11:27PM +0200, Richard Biener wrote: > >--- a/gcc/tree-sra.c > >+++ b/gcc/tree-sra.c > >@@ -915,6 +915,12 @@ create_access (tree expr, gimple *stmt, bool > >write) > >if (!DECL_P (base) || !bitmap_bit_p (candidate_bitmap, DECL_UID > >(base))) > > return NULL; > > >

[committed] testsuite: Use noipa attribute instead of noinline, noclone

2021-06-16 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed this test now on various arches sometimes FAILs, sometimes PASSes (the line 12 test in particular). The problem is that a = 0; initialization in the caller no longer happens before the f() call as what the argument points to is only used in debug info. Making the function noipa

Re: [RFC] Using main loop's updated IV as base_address for epilogue vectorization

2021-06-16 Thread Richard Biener
On Wed, 16 Jun 2021, Andre Vieira (lists) wrote: > > On 14/06/2021 11:57, Richard Biener wrote: > > On Mon, 14 Jun 2021, Richard Biener wrote: > > > >> Indeed. For example a simple > >> int a[1024], b[1024], c[1024]; > >> > >> void foo(int n) > >> { > >>for (int i = 0; i < n; ++i) > >>

Re: [RFC] Using main loop's updated IV as base_address for epilogue vectorization

2021-06-16 Thread Andre Vieira (lists) via Gcc-patches
On 14/06/2021 11:57, Richard Biener wrote: On Mon, 14 Jun 2021, Richard Biener wrote: Indeed. For example a simple int a[1024], b[1024], c[1024]; void foo(int n) { for (int i = 0; i < n; ++i) a[i+1] += c[i+i] ? b[i+1] : 0; } should usually see peeling for alignment (though on x86

Re: [ARM] PR97906 - Missed lowering abs(a) >= abs(b) to vacge

2021-06-16 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 14 Jun 2021 at 16:15, Kyrylo Tkachov wrote: > > > > > -Original Message- > > From: Prathamesh Kulkarni > > Sent: 14 June 2021 08:58 > > To: gcc Patches ; Kyrylo Tkachov > > > > Subject: Re: [ARM] PR97906 - Missed lowering abs(a) >= abs(b) to vacge > > > > On Mon, 7 Jun 2021 at

[PATCH] tree-optimization/101088 - fix SM invalidation issue

2021-06-16 Thread Richard Biener
When we face a sm_ord vs sm_unord for the same ref during store sequence merging we assert that the ref is already marked unsupported. But it can be that it will only be marked so during the ongoing merging so instead of asserting mark it here. Also apply some optimization to not waste resources

Re: [PATCH, V2] auto_vec copy/move improvements

2021-06-16 Thread Richard Biener via Gcc-patches
On Wed, Jun 16, 2021 at 5:18 AM Trevor Saunders wrote: > > - Unfortunately using_auto_storage () needs to handle m_vec being null. > - Handle self move of an auto_vec to itself. > - Make sure auto_vec defines the classes move constructor and assignment > operator, as well as ones taking vec, so

Re: [PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-16 Thread Richard Biener
On Wed, 16 Jun 2021, Martin Jambor wrote: > Hi Richi, > > On Tue, Jun 15 2021, Richard Biener wrote: > > On June 15, 2021 5:09:40 PM GMT+02:00, Martin Jambor > > wrote: > >>Hi, > >> > >>When SRA transforms an assignment where the RHS is an aggregate decl > >>that it creates replacements for,

Re: [PATCH] stor-layout: Create DECL_BIT_FIELD_REPRESENTATIVE even for bitfields in unions [PR101062]

2021-06-16 Thread Richard Biener
On Wed, 16 Jun 2021, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled on x86_64-linux, the bitfield store > is implemented as a RMW 64-bit operation at d+24 when the d variable has > size of only 28 bytes and scheduling moves in between the R and W part > a store to a

Re: [PATCH] tree-optimization PR/101014 - Limit new value calculations to first order effects.

2021-06-16 Thread Maxim Kuvyrkov via Gcc-patches
> On 15 Jun 2021, at 00:07, Andrew MacLeod via Gcc-patches > wrote: > > As mentioned in the Text from the PR: > > "When a range is being calculated for an ssa-name, the propagation process > often goes along back edges. These back edges sometime require other > ssa-names which have not be

Re: [PATCH] gcc/configure.ac: fix register issue for global_load assembler functions

2021-06-16 Thread Marcel Vollweiler
Changed the variable "gcc_cv_as_global_load_fixed" into "gcc_cv_as_gcn_global_load_fixed" in order to have the "gcn" substring also in the config.patch file. Am 09.06.2021 um 16:47 schrieb Marcel Vollweiler: This patch fixes an issue with global_load assembler functions leading to a "invalid

[PATCH V2] aarch64: Model zero-high-half semantics of ADDHN/SUBHN instructions

2021-06-16 Thread Jonathan Wright via Gcc-patches
Hi, Version 2 of this patch adds tests to verify the benefit of this change. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-06-14 Jonathan Wright * config/aarch64/aarch64-simd.md (aarch64_hn): Change to an expander that emits the correct instruction

[PATCH V2] aarch64: Model zero-high-half semantics of [SU]QXTN instructions

2021-06-16 Thread Jonathan Wright via Gcc-patches
Hi, Version 2 of the patch adds tests to verify the benefit of this change. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-06-14 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Split generator for aarch64_qmovn builtins into scalar and vector

[PATCH V2] aarch64: Model zero-high-half semantics of SQXTUN instruction in RTL

2021-06-16 Thread Jonathan Wright via Gcc-patches
Hi, Version 2 of the patch adds tests to verify the benefit of this change. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-06-14 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Split generator for aarch64_sqmovun builtins into scalar and vector

Re: [PATCH] tree-sra: Do not refresh readonly decls (PR 100453)

2021-06-16 Thread Martin Jambor
Hi Richi, On Tue, Jun 15 2021, Richard Biener wrote: > On June 15, 2021 5:09:40 PM GMT+02:00, Martin Jambor wrote: >>Hi, >> >>When SRA transforms an assignment where the RHS is an aggregate decl >>that it creates replacements for, the (least efficient) fallback method >>of dealing with them is

[PATCH V2] aarch64: Model zero-high-half semantics of XTN instruction in RTL

2021-06-16 Thread Jonathan Wright via Gcc-patches
Hi, Version 2 of this patch adds tests to verify the benefit of this change. Ok for master? Thanks, Jonathan --- gcc/ChangeLog: 2021-06-11 Jonathan Wright * config/aarch64/aarch64-simd.md (aarch64_xtn_insn_le): Define - modeling zero-high-half semantics.

[PATCH] testsuite: aarch64: Add zero-high-half tests for narrowing shifts

2021-06-16 Thread Jonathan Wright via Gcc-patches
Hi, This patch adds tests to verify that Neon narrowing-shift instructions clear the top half of the result vector. It is sufficient to show that a subsequent combine with a zero-vector is optimized away - leaving just the narrowing-shift instruction. Ok for master? Thanks, Jonathan ---

[Ada] Ignore volatile restrictions in preanalysis

2021-06-16 Thread Pierre-Marie de Rodat
When detecting references to volatile objects in expressions of the expression functions we couldn't determine the enclosing function. This was because we examined a copy of the expression made for preanalysis and this copy is not properly decorated. Consequently, we wrongly rejected valid

[Ada] Fix Is_Volatile_Function for functions declared in protected bodies

2021-06-16 Thread Pierre-Marie de Rodat
Function declared immediately within a protected body is a not a protected function; the exact definition is RM 9.5.1(1): "A protected subprogram is a subprogram declared immediately within a protected definition." Consequently, functions declared immediately within a protected body are not

[Ada] Fix detection of volatile expressions in restricted contexts

2021-06-16 Thread Pierre-Marie de Rodat
Detection of volatile expressions, i.e. references to volatile objects and allocators, is done in two steps: first when analysing entity names and allocators themselves (except when they occur within actual parameters of subprogram calls) and then after the subprogram call has been resolved (so

[Ada] Fix floating-point exponentiation with Integer'First exponent

2021-06-16 Thread Pierre-Marie de Rodat
It works neither at compile time nor at run time because of the classical issue that -Integer'First is not a valid Integer value. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * urealp.adb (Scale): Change first paramter to Uint and adjust.

[Ada] Do not generate an Itype_Reference node for slices in GNATprove mode

2021-06-16 Thread Pierre-Marie de Rodat
As part of the work on changing side-effects removal in SPARK, a special case was introduced to generate an Itype_Reference for Itypes in slices. This was based on a misunderstanding of existing checks for bounds when analyzing slices. These Itype_Reference are actually not needed to get the

[Ada] Include info about containers in GNAT RM Implementation Advice section

2021-06-16 Thread Pierre-Marie de Rodat
For each instance of implementation advice given in the Ada RM, the Implementation Advice section of the GNAT RM documents whether the advice is followed (see Ada RM M.3(1)). Such documention was missing for the implementation advice regarding Ada.Containers and its child units. Rectify this

[Ada] Fix aliasing check for actual parameters passed by reference

2021-06-16 Thread Pierre-Marie de Rodat
The aliasing check applies when some of the formals has their passing mechanism unspecified; RM 6.2 (12/3). Previously it only applied when the first formal had its passing mechanism unspecified and the second had its passing mechanism either unspecified or by-reference. Tested on

[Ada] Implementation of AI12-0152: legality rules for Raise_Expression

2021-06-16 Thread Pierre-Marie de Rodat
This patch implements the legality rules specified in RM 11.3 (2) for the placement of Raise_Expressions. In Ada2020 aspect specifications can appear in several new declarative contexts, and the keyword "with" can be part of a Raise_Expression or the start of a list of aspect specifications. To

[Ada] Wrong reference to System.Tasking in expanded code

2021-06-16 Thread Pierre-Marie de Rodat
The expanded code should never reference entities in the tasking runtime (libgnarl) except when expanding tasking constructs directly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * rtsfind.ads, libgnarl/s-taskin.ads, exp_ch3.adb, exp_ch4.adb, exp_ch6.adb,

[Ada] Adapt Is_Actual_Parameter to also work for entry parameters

2021-06-16 Thread Pierre-Marie de Rodat
Routine Is_Actual_Parameter now also detects entry parameters; this change is harmless for GNAT and allows this routine to be reused in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.ads (Is_Actual_Parameter): Update comment. * sem_util.adb

[Ada] Remove unused initialization with New_List

2021-06-16 Thread Pierre-Marie de Rodat
Code cleanup; behaviour is unaffected. The extra initialization most likely come from a initial version of the patch, before the limit of parameters to a subsequent call to New_List was discovered. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb

[Ada] Mixing of positional and named entries allowed in enum rep

2021-06-16 Thread Pierre-Marie de Rodat
This patch fixes an issue in the compiler whereby the mixing of positional and named entries in an enumeration representation clause was erroneously allowed instead of rejected - as per RM rules. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb

[Ada] Spurious accessibility error on "for of" loop parameter

2021-06-16 Thread Pierre-Marie de Rodat
This patch fixes an issue in the compiler whereby taking 'Access of a "for of" loop parameter caused spurious compile-time accessibility errors. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Accessibility_Level): Take into account renamings of loop

[Ada] Fix ALI source location for dominance markers

2021-06-16 Thread Pierre-Marie de Rodat
As First_Sloc is used to compute source location for entry guards, it must be also used to compute the dominance marker source location in this particular case (when a statement is dominated by an entry guard). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par_sco.adb

[Ada] Non-static Interrupt_Priority allowed with restriction Static_Priorities

2021-06-16 Thread Pierre-Marie de Rodat
This patch fixes an issue in the compiler whereby a non-static expression is allowed as an argument to aspect Interrupt_Priority despite restriction Static_Priorities being in effect. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Make_Aitem_Pragma): Check

[Ada] Make Incomplete_Or_Partial_View independent of the context

2021-06-16 Thread Pierre-Marie de Rodat
The value returned by Incomplete_Or_Partial_View depends on the current scope, which is unexpected at best. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Incomplete_Or_Partial_View): Retrieve the scope of the parameter and use it to find its

[Ada] Do not perform useless work in Check_No_Parts_Violations

2021-06-16 Thread Pierre-Marie de Rodat
There is no need to walk the hierarchy rooted at a type that does not come from source only to drop the result on the floor. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * freeze.adb (Check_No_Parts_Violations): Return earlier if the type is

[Ada] ACATS 4.1R-c611a04: Class-wide preconditions in dispatching calls

2021-06-16 Thread Pierre-Marie de Rodat
Completing previous patch since it introduced a regression on ACATS c611a03 under certified runtime. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_disp.adb (Build_Class_Wide_Check): Ensure that evaluation of actuals is side effects free (since the check

[Ada] Fix missing array bounds checking

2021-06-16 Thread Pierre-Marie de Rodat
For an assignment statement of the form "A.B(C).D := ...", in a loop, the index check on C can be missing. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ghost.adb: Add another special case where full analysis is needed. This bug is due to quirks in the way

[Ada] Use more straightforward implementation for Current_Entity_In_Scope

2021-06-16 Thread Pierre-Marie de Rodat
This new version is both more straightforward to understand and to map to the generated code at high optimization. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Current_Entity_In_Scope): Reimplement.diff --git a/gcc/ada/sem_util.adb

[Ada] Small cleanup in C header files

2021-06-16 Thread Pierre-Marie de Rodat
This removes obsolete stuff. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * initialize.c: Do not include vxWorks.h and fcntl.h from here. (__gnat_initialize) [__MINGW32__]: Remove #ifdef and attribute (__gnat_initialize) [init_float]: Delete.

[Ada] Raise expressions and unconstrained components

2021-06-16 Thread Pierre-Marie de Rodat
During the implementation of AI12-0172, we incorrectly allowed illegal cases of unconstrained components. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Analyze_Component_Declaration): Do not special case raise expressions. gcc/testsuite/ *

[Ada] Reorder code for validity checks of unchecked conversions

2021-06-16 Thread Pierre-Marie de Rodat
The placement of check for types of an unchecked conversion being generic was done in the middle of switching from their original to underlying views, which was inconsistent and made the surrounding comments confusing. Code cleanup in preparation for a follow-up improvement; behaviour is

[Ada] Small cleanup in System.Exceptions

2021-06-16 Thread Pierre-Marie de Rodat
This removes obsolete stuff. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-except.ads (ZCX_By_Default): Delete. (Require_Body): Likewise. * libgnat/s-except.adb: Replace body with pragma No_Body.diff --git a/gcc/ada/libgnat/s-except.adb

Re: [PATCH] libffi: Fix up x86_64 classify_argument

2021-06-16 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 16, 2021 at 9:49 AM Jakub Jelinek wrote: > > Hi! > > As the following testcase shows, libffi didn't handle properly > classify_arguments of structures at byte offsets not divisible by > UNITS_PER_WORD. The following patch adjusts it to match what > config/i386/ classify_argument does

  1   2   >