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

2021-06-21 Thread Martin Liška
On 6/17/21 6:21 PM, Eugene Rozenfeld wrote: Thank you for your reply Martin! AUTO_PROFILE_VERSION should also be changed. Then create_gcov can be updated to support both the old format and the new format. You are right. I've just pushed a commit https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8

[PATCH] autofdo: Bump AUTO_PROFILE_VERSION.

2021-06-21 Thread Martin Liška
Pushed as obvious. Martin gcc/ChangeLog: * auto-profile.c (AUTO_PROFILE_VERSION): Bump as string format was changed. --- gcc/auto-profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c index 43d6fa0b1f0..b23b82b2df4

Re: [PATCH][pushed] gcov: update documentation entry about string format

2021-06-21 Thread Martin Liška
On 6/21/21 9:27 PM, Eugene Rozenfeld wrote: Thank you for updating the documentation Martin. I thank you. The following line can now be removed: padding: | char:0 | char:0 char:0 | char:0 char:0 char:0 Sure, I've just done that. Martin Eugene -Original Message- From:

[PATCH] add -ltrans-objects lto-plugin debug option

2021-06-21 Thread Richard Biener
This adds a -ltrans-objects option to lto-plugin that by-passes lto-wrapper invocation and instead feeds LD the final LTRANS objects directly from the response file given as argument to the option. This allows LD issues involving the linker-plugin path to be debugged in an easier way with just the

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

2021-06-21 Thread Richard Biener
On Mon, 21 Jun 2021, Qing Zhao wrote: > > > > On Jun 21, 2021, at 10:35 AM, Richard Biener wrote: > >>> I think we can drop -fauto-var-init=pattern and just go with block > >>> initializing which will cover padding as well which means we can > >>> stay with the odd -ftrivial-auto-var-init name

Re: [patch v2] Fortran: fix sm computation in CFI_allocate [PR93524]

2021-06-21 Thread Tobias Burnus
On 21.06.21 22:31, Sandra Loosemore wrote: On 6/21/21 5:42 AM, Tobias Burnus wrote: OK – but see some comments below. Revised patch attached. How's this one? LGTM - thanks! Tobias - Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht Münch

Re: [PATCH V3] Split loop for NE condition.

2021-06-21 Thread guojiufu via Gcc-patches
On 2021-06-21 16:51, Richard Biener wrote: On Wed, 9 Jun 2021, guojiufu wrote: On 2021-06-09 17:42, guojiufu via Gcc-patches wrote: > On 2021-06-08 18:13, Richard Biener wrote: >> On Fri, 4 Jun 2021, Jiufu Guo wrote: >> > cut... >>> + gcond *cond = as_a (last); >>> + enum tree_code co

Re: [PATCH] Add vect_recog_popcount_pattern to handle mismatch between the vectorized popcount IFN and scalar popcount builtin.

2021-06-21 Thread Hongtao Liu via Gcc-patches
On Tue, Jun 22, 2021 at 10:43 AM Hongtao Liu wrote: > > On Mon, Jun 21, 2021 at 6:05 PM Richard Biener > wrote: > > > > On Thu, Jun 17, 2021 at 8:29 AM liuhongt wrote: > > > > > > The patch remove those pro- and demotions when backend support direct > > > optab. > > > > > > For i386: it enables

Re: [PATCH] Add vect_recog_popcount_pattern to handle mismatch between the vectorized popcount IFN and scalar popcount builtin.

2021-06-21 Thread Hongtao Liu via Gcc-patches
On Mon, Jun 21, 2021 at 6:05 PM Richard Biener wrote: > > On Thu, Jun 17, 2021 at 8:29 AM liuhongt wrote: > > > > The patch remove those pro- and demotions when backend support direct > > optab. > > > > For i386: it enables vectorization for vpopcntb/vpopcntw and optimized > > for vpopcntq. > > >

predcom: Refactor more by encapsulating global states

2021-06-21 Thread Kewen.Lin via Gcc-patches
Hi Richi and Martin, >> >> Thanks Richi! One draft (not ready for review) is attached for the further >> discussion. It follows the idea of RAII-style cleanup. I noticed that >> Martin suggested stepping forward to make tree_predictive_commoning_loop >> and its callees into one class (Thanks Ma

[r12-1702 Regression] FAIL: g++.target/i386/empty-class1.C -std=c++2a scan-rtl-dump-not expand "set" on Linux/x86_64

2021-06-21 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 7232f7c4c2d727431096a7ecfcf4ad4db71dcf2a is the first bad commit commit 7232f7c4c2d727431096a7ecfcf4ad4db71dcf2a Author: Jason Merrill Date: Sun Jun 13 14:00:12 2021 -0400 expand: empty class return optimization [PR88529] caused FAIL: g++.target/i386/empty-class1.C -std

[PATCH] docs: drop unbalanced parenthesis in rtl.texi

2021-06-21 Thread Sergei Trofimovich via Gcc-patches
From: Sergei Trofimovich gcc/ChangeLog: * doc/rtl.texi: drop unbalanced parenthesis. --- gcc/doc/rtl.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 5af71137a87..e1e76a93a8b 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rt

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 21, 2021 at 11:36:48PM +0100, Gaius Mulley via Gcc-patches wrote: > > : error: the file containing the definition module > > <80><98>M2RTS > > <80><99> cannot be found > > compiler exited with status 1 > > output is: > > : error: the file containing the definition module > > <80><98>M

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-21 Thread Gaius Mulley via Gcc-patches
Segher Boessenkool writes: > On Sat, Jun 19, 2021 at 09:09:05AM -0500, Segher Boessenkool wrote: >> powerpc64-linux now is building, and is running the tetsuite. My >> powerpc64le-linux build used --enable-languages=all, but Ada fails to >> build, so I'll redo that without Ada. > > For powerpc64

[PATCH] correct handling of variable offset minus constant in -Warray-bounds (PR 100137)

2021-06-21 Thread Martin Sebor via Gcc-patches
-Warray-bounds relies on similar logic as -Wstringop-overflow et al., but using its own algorithm, including its own bugs such as PR 100137. The attached patch takes the first step toward unifying the logic between the warnings. It changes a subset of -Warray-bounds to call compute_objsize() to d

[PATCH] IBM Z: Define NO_PROFILE_COUNTERS

2021-06-21 Thread Ilya Leoshkevich via Gcc-patches
Bootstrapped and regtested on s390x-redhat-linux. Ok for master? s390 glibc does not need counters in the .data section, since it stores edge hits in its own data structure. Therefore counters only waste space and confuse diffing tools (e.g. kpatch), so don't generate them. gcc/ChangeLog:

[PING][PATCH 10/13] v2 Use new per-location warning APIs in the middle end

2021-06-21 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571981.html Looking for a review of the middle end changes to replace the uses of TREE_NO_WARNING and gimple_{get,set}_no_warning with the new warning group APIs. Most of the changes are a mechanical search and replace kind, just a handfu

[PING][PATCH 9/13] v2 Use new per-location warning APIs in LTO

2021-06-21 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571980.html Looking for a review of the LTO changes to switch TREE_NO_WARNING to the suppress_warning() API. On 6/4/21 3:43 PM, Martin Sebor wrote: The attached patch replaces the uses of TREE_NO_WARNING in the LTO front end with the new

[PING][PATCH 7/13] v2 Use new per-location warning APIs in the FORTRAN front end

2021-06-21 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571978.html Looking for an approval of the 99% mechanical changes to switch the FORTRAN front end from TREE_NO_WARNING to the new suppress_warning() API. There's only one place in this patch where a specific warning is being suppressed -

[PING][PATCH 6/13] v2 Use new per-location warning APIs in the C++ front end

2021-06-21 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571977.html Looking for a review of the C++ front end changes to switch to the new suppress_warning() API. On 6/4/21 3:42 PM, Martin Sebor wrote: The attached patch replaces the uses of TREE_NO_WARNING in the C++ front end with the new s

[PING][PATCH 4/13] v2 Use new per-location warning APIs in C family code

2021-06-21 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571975.html I'm looking for a review of the mostly mechanical shared subset of the C and C++ front end changes to the new suppress_warning() API. On 6/4/21 3:42 PM, Martin Sebor wrote: The attached patch replaces the uses of TREE_NO_WARN

[PING][PATCH 3/13] v2 Use new per-location warning APIs in C front end

2021-06-21 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571974.html I'm looking for a review of the mostly mechanical C front end changes to the new suppress_warning() API. On 6/4/21 3:41 PM, Martin Sebor wrote: The attached patch replaces the uses of TREE_NO_WARNING in the C front end with t

[PING][PATCH 1/13] v2 [PATCH 1/13] Add support for per-location warning groups (PR 74765)

2021-06-21 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571973.html Looking for a review of v2 of the diagnostic infrastructure bits. On 6/4/21 3:41 PM, Martin Sebor wrote: The attached patch introduces the suppress_warning(), warning_suppressed(), and copy_no_warning() APIs without making us

Re: [patch v2] Fortran: fix sm computation in CFI_allocate [PR93524]

2021-06-21 Thread Sandra Loosemore
On 6/21/21 5:42 AM, Tobias Burnus wrote: On 21.06.21 08:05, Sandra Loosemore wrote: I ran into this bug in CFI_allocate while testing something else and then realized there was already a PR open for it.  It seems like an easy fix, and I've used Tobias's test case from the issue more or less v

Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-21 Thread Tobias Burnus
Hi José, On 21.06.21 19:52, José Rui Faustino de Sousa wrote: On 21/06/21 16:46, Tobias Burnus wrote: Well, as said: directly into the compiler where currently the call to libgomp is. (should be libgfortran) I meant converting the operation done by the libgfortran/runtime/ISO_Fortran_binding

[PATCH] ipa-sra: Fix thinko when overriding safe_to_import_accesses (PR 101066)

2021-06-21 Thread Martin Jambor
Hi, The "new" IPA-SRA has a more difficult job than the previous not-truly-IPA version when identifying situations in which a parameter passed by reference can be passed into a third function and only thee converted to one passed by value (and possibly "split" at the same time). In order to allow

RE: [PATCH][pushed] gcov: update documentation entry about string format

2021-06-21 Thread Eugene Rozenfeld via Gcc-patches
Thank you for updating the documentation Martin. The following line can now be removed: padding: | char:0 | char:0 char:0 | char:0 char:0 char:0 Eugene -Original Message- From: Gcc-patches On Behalf Of Martin Liška Sent: Thursday, June 17, 2021 2:40 AM To: gcc-patches@gcc.gnu.

Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-21 Thread José Rui Faustino de Sousa via Gcc-patches
Hi Tobias, On 21/06/21 16:46, Tobias Burnus wrote: Well, as said: directly into the compiler where currently the call to libgomp is. > I don't think I understand were you mean. You don't mean the includes in "f95-lang.c" do you? Best regards, José Rui

[committed] libstdc++: Improve std::lock algorithm

2021-06-21 Thread Jonathan Wakely via Gcc-patches
The current std::lock algorithm is the one called "persistent" in Howard Hinnant's https://howardhinnant.github.io/dining_philosophers.html post. While it tends to perform acceptably fast, it wastes a lot of CPU cycles by continuously locking and unlocking the uncontended mutexes. Effectively, it's

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

2021-06-21 Thread Qing Zhao via Gcc-patches
> On Jun 21, 2021, at 11:18 AM, Kees Cook wrote: > > On Mon, Jun 21, 2021 at 03:39:45PM +, Qing Zhao wrote: >> So, if “pattern value” is “0x”, then it’s a valid canonical >> virtual memory address. However, for most OS, “0x” should >> be not in user space.

[PATCH] testsuite: add -fwrapv for 950704-1.c

2021-06-21 Thread Xi Ruoyao via Gcc-patches
This test relies on wrap behavior of signed overflow. Without -fwrapv it is known to fail on mips (and maybe some other targets as well). gcc/testsuite/ * gcc.c-torture/execute/950704-1.c: Add -fwrapv to avoid undefined behavior. --- gcc/testsuite/gcc.c-torture/execute/950704-

Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-21 Thread Tobias Burnus
Hi José, On 21.06.21 17:51, José Rui Faustino de Sousa via Fortran wrote: On 21/06/21 13:46, Tobias Burnus wrote: (in principle, I'd like to have the libgfortran function moved to the compiler proper to avoid some issues, but that's admittedly a task independent of your work.) cfi_desc_to_gfc

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

2021-06-21 Thread Kees Cook via Gcc-patches
On Mon, Jun 21, 2021 at 03:39:45PM +, Qing Zhao wrote: > So, if “pattern value” is “0x”, then it’s a valid canonical > virtual memory address. However, for most OS, “0x” should be > not in user space. > > My question is, is “0xF” good for poin

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

2021-06-21 Thread Qing Zhao via Gcc-patches
> On Jun 21, 2021, at 10:35 AM, Richard Biener wrote: >>> I think we can drop -fauto-var-init=pattern and just go with block >>> initializing which will cover padding as well which means we can >>> stay with the odd -ftrivial-auto-var-init name used by CLANG and >>> add no additional options. >>

Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-21 Thread José Rui Faustino de Sousa via Gcc-patches
On 21/06/21 13:46, Tobias Burnus wrote: Hi José, (in principle, I'd like to have the libgfortran function moved to the compiler proper to avoid some issues, but that's admittedly a task independent of your work.) cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc from ISO_c_binding.c, right? Sinc

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

2021-06-21 Thread Qing Zhao via Gcc-patches
Hi, Kees, On Jun 18, 2021, at 6:47 PM, Kees cook mailto:keesc...@chromium.org>> wrote: On Wed, Jun 16, 2021 at 07:39:02PM +, Qing Zhao wrote: So, the major question now is: Is one single repeatable pattern enough for pattern initialization for all different types of auto variables? If YES

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

2021-06-21 Thread Richard Biener
On June 21, 2021 5:11:30 PM GMT+02:00, Qing Zhao wrote: >HI, Richard, > >> On Jun 21, 2021, at 2:53 AM, Richard Biener >wrote: >> >>> >>> >>> This is for the compatibility with CLANG. -:). >(https://reviews.llvm.org/D54604) >> >> I don't care about functional 1:1 "compatibility" with CLANG. >

Re: [[PATCH V9] 3/7] CTF/BTF debug formats

2021-06-21 Thread Jose E. Marchesi via Gcc-patches
> OK otherwise. I think I OKed 1/7 lst time and thus this should now have > all parts OKed by me besides the BPF backend changes. > > Please leave others a day or two to comment (and obviously the BPF > maintainer to ack his part). The BPF parts are OK. (Speaking as the BPF maintainer.) > Than

Re: [Patch, fortran V3] PR fortran/100683 - Array initialization refuses valid

2021-06-21 Thread José Rui Faustino de Sousa via Gcc-patches
Hi Tobias, On 21/06/21 12:37, Tobias Burnus wrote: Thus: Do you have a list of patches pending review? > https://gcc.gnu.org/pipermail/fortran/2021-April/055924.html https://gcc.gnu.org/pipermail/fortran/2021-April/055933.html https://gcc.gnu.org/pipermail/fortran/2021-June/056168.html http

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

2021-06-21 Thread Qing Zhao via Gcc-patches
HI, Richard, > On Jun 21, 2021, at 2:53 AM, Richard Biener wrote: > >> >> >> This is for the compatibility with CLANG. -:). >> (https://reviews.llvm.org/D54604) > > I don't care about functional 1:1 "compatibility" with CLANG. Okay. -:) > >> 1. Pattern initialization >> >> This is the

[PATCH]middle-end[RFC] slp: new implementation of complex numbers

2021-06-21 Thread Tamar Christina via Gcc-patches
Hi Richi, This patch is still very much incomplete and I do know that it is missing things but it's complete enough such that examples are working and allows me to show what I'm working towards. note, that this approach will remove a lot of code in tree-vect-slp-patterns but to keep the diff read

Re: [ping PATCH v2 2/2] rs6000: Add test for _mm_minpos_epu16

2021-06-21 Thread Paul A. Clarke via Gcc-patches
Gentle ping. I now realize I forgot to include a blurb about "what changed in v2". v2: - Rewrote input computation into a fixed set of useful input sets: - All equal. - All but one equal. - A couple equal, but not in positions that are endian-identical. - Minimum first. - Minimum last.

Re: [ping PATCH v2 1/2] rs6000: Add support for _mm_minpos_epu16

2021-06-21 Thread Paul A. Clarke via Gcc-patches
Gentle ping. I now realize I forgot to include a blurb about "what changed in v2". v2: - Slight formatting changes based on Segher's review (simplified condition, single line). PC On Tue, Jun 08, 2021 at 02:11:54PM -0500, Paul A. Clarke via Gcc-patches wrote: > Add a naive implementation of t

Re: [[PATCH V9] 4/7] CTF/BTF testsuites

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, May 31, 2021 at 7:20 PM Jose E. Marchesi via Gcc-patches wrote: > > This commit adds a new testsuite for the CTF debug format. OK if the rest is approved - while I'm not too familiar with dejagnu I think we can deal with fallout after the fact. Richard. > 2021-05-14 Indu Bhagat >

Re: [[PATCH V9] 0/7] Support for the CTF and BTF debug formats

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, May 31, 2021 at 7:16 PM Jose E. Marchesi via Gcc-patches wrote: > > [Changes from V8: > - Rebased to today's master. > - Adapted to use the write-symbols new infrastructure recently > applied upstream. > - Little change in libiberty to copy .BTF sections over when > LTOing.] > > Hi peo

Re: [[PATCH V9] 7/7] libiberty: copy over .BTF section when using LTO

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, May 31, 2021 at 7:19 PM Jose E. Marchesi via Gcc-patches wrote: > > libiberty/ChangeLog: OK. You can apply this separately. I still believe LTO support is kind-of broken, but well ;) Richard. > * simple-object.c (handle_lto_debug_sections): Copy over .BTF section. > --- > lib

Re: [[PATCH V9] 6/7] Enable BTF generation in the BPF backend

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, May 31, 2021 at 7:18 PM Jose E. Marchesi via Gcc-patches wrote: > > This patch changes the BPF GCC backend in order to use the DWARF debug > hooks and therefore enables the user to generate BTF debugging > information with -gbtf. Generating BTF is crucial when compiling BPF > programs, si

Re: [[PATCH V9] 5/7] CTF/BTF documentation

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, May 31, 2021 at 7:17 PM Jose E. Marchesi via Gcc-patches wrote: > > This commit documents the new command line options introduced by the > CTF and BTF debug formats. Can you amend the cover text for 'Debugging Options' to mention that there are debug formats that can co-exist with others

Re: [[PATCH V9] 2/7] dejagnu: modularize gcc-dg-debug-runtest a bit

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, May 31, 2021 at 7:15 PM Jose E. Marchesi via Gcc-patches wrote: > > Move some functionality into a procedure of its own. This is only so that when > the patch for ctf comes along, the gcc-dg-debug-runtest procedure looks bit > more uniform. OK (you can apply this separately). Richard. >

Re: [Patch, fortran V2] PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling

2021-06-21 Thread Tobias Burnus
Hi José, (in principle, I'd like to have the libgfortran function moved to the compiler proper to avoid some issues, but that's admittedly a task independent of your work.) On 15.06.21 01:09, José Rui Faustino de Sousa via Fortran wrote: Update to a proposed patch to: Bug 93308 - bind(c) subrou

[PATCH] mips: add MSA vec_cmp and vec_cmpu expand pattern [PR101132]

2021-06-21 Thread Xi Ruoyao via Gcc-patches
Middle-end started to emit vec_cmp and vec_cmpu since GCC 11, causing ICE on MIPS with MSA enabled. Add the pattern to prevent it. Bootstrapped and regression tested on mips64el-linux-gnu. Ok for trunk? gcc/ * config/mips/mips-protos.h (mips_expand_vec_cmp_expr): Declare. * conf

Re: [PATCH] libstdc++: Sync __cpp_lib_ranges macro defined in ranges_cmp.h

2021-06-21 Thread Jonathan Wakely via Gcc-patches
On Mon, 21 Jun 2021 at 14:37, Patrick Palka via Libstdc++ wrote: > > r12-1606 bumped the value of __cpp_lib_ranges defined in , > but this macro is also defined in , so it needs to > be updated there too. > > libstdc++-v3/ChangeLog: > > * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjus

[PATCH] libstdc++: Sync __cpp_lib_ranges macro defined in ranges_cmp.h

2021-06-21 Thread Patrick Palka via Gcc-patches
r12-1606 bumped the value of __cpp_lib_ranges defined in , but this macro is also defined in , so it needs to be updated there too. libstdc++-v3/ChangeLog: * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value. --- libstdc++-v3/include/bits/ranges_cmp.h | 2 +- 1 file changed, 1 i

Re: [Patch, v2] contrib/mklog.py: Improve PR handling (was: Re: git gcc-commit-mklog doesn't extract PR number to ChangeLog)

2021-06-21 Thread Tobias Burnus
Now committed as r12-1700-gedf0c3ffb59d75c11e05bc722432dc554e275c72 / as attached. (We had some follow-up discussion on IRC.) On 21.06.21 14:53, Martin Liška wrote: +# PR number in the file name +fname = os.path.basename(file.path) This is a dead code. + fname = os.p

Re: [PATCH] tree-optimization/101120 - fix compile-time issue with SLP groups

2021-06-21 Thread Richard Biener via Gcc-patches
On Fri, Jun 18, 2021 at 4:24 PM Richard Biener wrote: > > On Fri, Jun 18, 2021 at 2:23 PM Richard Biener wrote: > > > > This places two hacks to avoid an old compile-time issue when > > vectorizing large permuted SLP groups with gaps where we end up > > emitting loads and IV adjustments for the g

Re: [PATCH] tree-optimization/101014 - Remove poor value computations.

2021-06-21 Thread Andrew MacLeod via Gcc-patches
On 6/19/21 3:51 AM, Richard Biener wrote: On June 18, 2021 11:46:08 PM GMT+02:00, Andrew MacLeod wrote: I am pleased to say that this patch kills the poor value computations in the ranger's cache. Its been a bit of a thorn, and is mostly a hack that was applied early on to enable getting some

Re: [Patch, v2] contrib/mklog.py: Improve PR handling (was: Re: git gcc-commit-mklog doesn't extract PR number to ChangeLog)

2021-06-21 Thread Martin Liška
On 6/21/21 10:37 AM, Tobias Burnus wrote: On 21.06.21 10:09, Martin Liška wrote: $ pytest test_mklog.py FAILED test_mklog.py::TestMklog::test_sorting - AssertionError: assert '\n\tPR 50209...New test.\n\n' == 'gcc/ChangeLo...New test.\n\n' Aha, missed that there is indeed a testsuite - nice!

[PATCH] RISC-V: Add tune info for T-HEAD C906.

2021-06-21 Thread Jojo R via Gcc-patches
gcc/ * config/riscv/riscv.c (thead_c906_tune_info): New. * config/riscv/riscv.c (riscv_tune_info_table): Use new tune. --- gcc/config/riscv/riscv.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c index

Re: [Patch, fortran V3] PR fortran/100683 - Array initialization refuses valid

2021-06-21 Thread Tobias Burnus
Hi José, On 17.06.21 21:34, José Rui Faustino de Sousa via Gcc-patches wrote: Update to a proposed patch to: PR100683 - Array initialization refuses valid due to more errors being found... Patch tested only on x86_64-pc-linux-gnu. LGTM – sorry for the very belated review. Add call to simplify

Re: [RFC] New idea to split loop based on no-wrap conditions

2021-06-21 Thread Richard Biener
On Mon, 21 Jun 2021, guojiufu wrote: > On 2021-06-21 14:19, guojiufu via Gcc-patches wrote: > > On 2021-06-09 19:18, guojiufu wrote: > >> On 2021-06-09 17:42, guojiufu via Gcc-patches wrote: > >>> On 2021-06-08 18:13, Richard Biener wrote: > On Fri, 4 Jun 2021, Jiufu Guo wrote: > > >>>

Re: [Ping^2, Patch, Fortran] PR100337 Should be able to pass non-present optional arguments to CO_BROADCAST

2021-06-21 Thread Tobias Burnus
Any reason that you did not put it under gfortran.dg/coarray/ such that it is also run with -fcoarray=lib (-lcaf_single)? I know that the issue only exists for single, but it also makes sense to check that libcaf_single works In that sense, I wonder whether also the other CO_* should be ch

Re: [PATCH] PR fortran/100950 - ICE in output_constructor_regular_field, at varasm.c:5514

2021-06-21 Thread Tobias Burnus
Hi Harald, sorry for being way behind my review duties :-( On 10.06.21 20:52, Harald Anlauf via Fortran wrote: +static bool +substring_has_constant_len (gfc_expr *e) +{ + ptrdiff_t istart, iend; + size_t length; + bool equal_length = false; + + if (e->ts.type != BT_CHARACTER + || !e->r

Re: [x86_64 PATCH] PR target/11877: Use xor to write zero to memory with -Os

2021-06-21 Thread Uros Bizjak via Gcc-patches
On Mon, Jun 21, 2021 at 12:28 PM Jakub Jelinek wrote: > > On Mon, Jun 21, 2021 at 12:14:09PM +0200, Richard Biener wrote: > > > But we could do what I've done in > > > r11-7694-gd55ce33a34a8e33d17285228b32cf1e564241a70 > > > - have int ix86_last_zero_store_uid; > > > set to INSN_UID of the last st

Re: [patch] Fortran: fix sm computation in CFI_allocate [PR93524]

2021-06-21 Thread Tobias Burnus
On 21.06.21 08:05, Sandra Loosemore wrote: I ran into this bug in CFI_allocate while testing something else and then realized there was already a PR open for it. It seems like an easy fix, and I've used Tobias's test case from the issue more or less verbatim. There were some other bugs added o

Re: [PATCH][AVX512] Optimize vpexpand* to mask mov when mask have all ones in it's lower part (including 0 and -1).

2021-06-21 Thread Hongtao Liu via Gcc-patches
This is the patch I'm going to push to the trunk. On Wed, May 12, 2021 at 3:28 PM Hongtao Liu wrote: > > ping > > On Fri, Apr 30, 2021 at 12:49 PM Hongtao Liu wrote: > > > > Hi: > > For v{,p}expand* When mask is 0, -1, or has all all one bits in its > > lower part, it can be optimized to simpl

Re: [PATCH] Modula-2 into the GCC tree on master

2021-06-21 Thread Gaius Mulley via Gcc-patches
Segher Boessenkool writes: > Gaius, could you look through the two patches I did to get the build to > work, see if those are correct or if something better needs to be done? > > > $(subdir) is an absolut

Re: [PATCH][AVX512] Fix ICE for vpexpand*.

2021-06-21 Thread Hongtao Liu via Gcc-patches
This is the patch I'm going to push to the trunk. On Wed, May 12, 2021 at 3:29 PM Hongtao Liu wrote: > > ping > > On Fri, Apr 30, 2021 at 12:42 PM Hongtao Liu wrote: > > > > Hi: > > This patch is to fix ice which was introduced by my > > r11-5696-g35c4c67e6c534ef3d6ba7a7752ab7e0fbc91755b. > >

Re: [PATCH 5/5] Fortran: Re-enable 128-bit integers for AMD GCN

2021-06-21 Thread Tobias Burnus
On 18.06.21 16:20, Julian Brown wrote: This patch reverts the part of Tobias's patch for PR target/96306 that disables 128-bit integer support for AMD GCN. OK for mainline (assuming the previous patches are in first)? Well, as the only reason for that patch was to avoid tons of fails/ICE due t

[Ada] Add Ada.Strings.Text_Buffers and replace uses of Ada.Strings.Text_Output

2021-06-21 Thread Pierre-Marie de Rodat
GNAT's initial implementation of Ada 2022's Image attributes for non-scalar types referenced (in user-visible ways) a GNAT-defined package Ada.Strings.Text_Output and child units thereof. The Ada RM specifies that a similar-but-different package, Ada.Strings.Text_Buffers, is to be provided (RM A.4.

[Ada] Implement fixed-lower-bound consistency checks for qualified_expressions

2021-06-21 Thread Pierre-Marie de Rodat
This change implements a missing check for qualified_expressions where the qualifying subtype is an unconstrained array subtype that specifies fixed lower bounds for one or more of its index ranges. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Selected_Range_C

[Ada] Optimization of System.Value_N

2021-06-21 Thread Pierre-Marie de Rodat
Add Inline and Pure_Function aspects. With these changes, and additional changes in gigi, we should be able to eliminate duplicate calls to Value_Enumeration_Pos. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-valuen.ads (Value_Enumeration, Valid_Enumerati

[Ada] INOX: prototype "when" constructs

2021-06-21 Thread Pierre-Marie de Rodat
This patch implements experimental features under the -gnatX flag for "return ... when", "raise ... when", and "goto ... when" constructs. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Document new feature under pragm

[Ada] Improve efficiency of small slice assignments of packed arrays

2021-06-21 Thread Pierre-Marie de Rodat
If slices fit in 32 bits, and bounds are known at compile time, use a more efficient method for slice assignment. (32 is the usual case here, we're really talking about Val_Bits, which is 32 on most targets.) We might want to change 32 to 64 here. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Implementation of AI12-205: defaults for formal types

2021-06-21 Thread Pierre-Marie de Rodat
This patch implements the new language feature described in AI12-0205 that introduces defaults for generic formal types. These defaults are subtype marks that must denote a type that is usable as an actual in any subsequent instantiation of the enclosing generic unit. The legality rules are similar

[Ada] Adjust new fast bit-field copy path to big-endian platforms

2021-06-21 Thread Pierre-Marie de Rodat
The issue is that the unchecked conversion of small bit-packed arrays to modular types is not done in memory order, whereas this order is expected by the System.Bitfield_Utils unit. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch5.adb (Expand_Assign_Array_Bitfield_Fas

[Ada] Add Return_Statement field

2021-06-21 Thread Pierre-Marie de Rodat
Used by GNAT LLVM to handle E_Constant and E_Variable with Is_Return_Object. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo.ads (Return_Statement): Add documentation. * exp_ch6.adb (Expand_N_Extended_Return_Statement): Set it. * gen_il-fields.ads: Add

[Ada] Implement 'Valid_Value attribute

2021-06-21 Thread Pierre-Marie de Rodat
Implement the 'Valid_Value attribute for enumeration types. Currently, 'Valid_Value is not supported for types in Standard, because they do not have image/value tables. Currently, there are no 'Valid_Wide_Image or 'Valid_Wide_Wide_Image attributes. Tested on x86_64-pc-linux-gnu, committed on trun

[Ada] Make -gnatU and -gnatw.d the default

2021-06-21 Thread Pierre-Marie de Rodat
-gnatU prepends `error:` to error messages, enabling it by default makes error messages more consistent with warnings. -gnatw.d tags messages with the flag that caused them. As users might need to switch back to the previous behavior, the `-gnatd_U` flag is introduced to do exactly that. Tested

[Ada] Zero-size slices

2021-06-21 Thread Pierre-Marie de Rodat
Fix a bug in slices, where a zero-sized slice causes an invalid read detected by valgrind Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-bituti.ads (Small_Size): Do not include 0 in this type. * libgnat/s-bituti.adb (Copy_Bitfield): Do nothing for

[Ada] Fix invalid JSON real numbers generated with -gnatRj

2021-06-21 Thread Pierre-Marie de Rodat
The -gnatR output contains information about fixed-point types declared in the program and it comprises real numbers, which are displayed using a custom format specific to the compiler, which is not always compatible with the JSON data interchange format. The change also fixes an off-by-one bug in

[Ada] Fix unbalanced parens in documentation of Address clauses

2021-06-21 Thread Pierre-Marie de Rodat
Typo in description of handling of Address clauses by GNAT; spotted while implementing support for overlays in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/representation_clauses_and_pragmas.rst (Address Clauses): Fix unbalanced parens.

[Ada] Fix detection of overlapping actuals with renamings

2021-06-21 Thread Pierre-Marie de Rodat
Simplify detection of renamings within actuals that denote the same object. This code only needs to take object renamings and shouldn't care about renamings of subprogram, packages or exceptions. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Is_Object_Renamin

[Ada] Simplify detection of statically overlapping slices

2021-06-21 Thread Pierre-Marie de Rodat
Statically matching slices in actual parameters are now detected in the Denotes_Same_Object routine by directly examining the slice indexes and by a dubious recursive call. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Denotes_Same_Object): Simplify handling

[Ada] Disable wrong computation of offsets within multidimensional arrays

2021-06-21 Thread Pierre-Marie de Rodat
Routine Indexed_Component_Bit_Offset is meant to return the first bit position of an array component, but it only examined the first index expression and necessarily produced wrong results for multidimensional arrays. Since this routine is only used for warnings, it is safe to simply disable this

[Ada] Compiler crash on sliding of fixed-lower-bound object in Loop_Invariant

2021-06-21 Thread Pierre-Marie de Rodat
When a sliding conversion is expanded during preanalysis of certain assertion pragmas (such as Loop_Invariant), to convert an object of to an array subtype with a fixed lower bound, a Val attribute created as part of the upper bound expression of the conversion's subtype is not expanded later when

[Ada] Skip overlay checks on protected components with expansion disabled

2021-06-21 Thread Pierre-Marie de Rodat
Routine Find_Overlaid_Entity collects entire objects from prefixes of attribute Address is overlay specifications. The alignment of those entire objects are then examined in Validate_Address_Clauses. However, Find_Overlaid_Entity wrongly collects protected components (and discriminants of concurre

[Ada] Compile s-mmap on aarch64-linux

2021-06-21 Thread Pierre-Marie de Rodat
The rules for building s-mmap were missing from aarch64-linux for no apparent reason. The macros for this package includes other packages that were also missing. There was no example where s-mmap was added by itself so the standard macros were added. Tested on x86_64-pc-linux-gnu, committed on tru

Re: [x86_64 PATCH] PR target/11877: Use xor to write zero to memory with -Os

2021-06-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 21, 2021 at 12:14:09PM +0200, Richard Biener wrote: > > But we could do what I've done in > > r11-7694-gd55ce33a34a8e33d17285228b32cf1e564241a70 > > - have int ix86_last_zero_store_uid; > > set to INSN_UID of the last store emitted by the peephole2s and > > then check that INSN_UID agai

Re: [x86_64 PATCH] PR target/11877: Use xor to write zero to memory with -Os

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, Jun 21, 2021 at 11:59 AM Jakub Jelinek wrote: > > On Mon, Jun 21, 2021 at 11:19:12AM +0200, Richard Biener wrote: > > > --- gcc/config/i386/i386.c.jj 2021-06-21 09:39:21.622487840 +0200 > > > +++ gcc/config/i386/i386.c 2021-06-21 10:21:12.389794740 +0200 > > > @@ -15186,6 +15186,33

Re: [PATCH] Add vect_recog_popcount_pattern to handle mismatch between the vectorized popcount IFN and scalar popcount builtin.

2021-06-21 Thread Richard Biener via Gcc-patches
On Thu, Jun 17, 2021 at 8:29 AM liuhongt wrote: > > The patch remove those pro- and demotions when backend support direct > optab. > > For i386: it enables vectorization for vpopcntb/vpopcntw and optimized > for vpopcntq. > > gcc/ChangeLog: > > PR tree-optimization/97770 > * tree-v

Re: [x86_64 PATCH] PR target/11877: Use xor to write zero to memory with -Os

2021-06-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 21, 2021 at 11:19:12AM +0200, Richard Biener wrote: > > --- gcc/config/i386/i386.c.jj 2021-06-21 09:39:21.622487840 +0200 > > +++ gcc/config/i386/i386.c 2021-06-21 10:21:12.389794740 +0200 > > @@ -15186,6 +15186,33 @@ ix86_lea_for_add_ok (rtx_insn *insn, rtx > >return ix86_le

Re: [PATCH 5/7] Allow match-and-simplified phiopt to run in early phiopt

2021-06-21 Thread Richard Biener via Gcc-patches
On Sat, Jun 19, 2021 at 11:44 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > To move a few things more to match-and-simplify from phiopt, > we need to allow match_simplify_replacement to run in early > phiopt. To do this, we need to mark some match patterns > if they can be don

Re: [PATCH 6/7] Lower for loops before lowering cond in genmatch

2021-06-21 Thread Richard Biener via Gcc-patches
On Sat, Jun 19, 2021 at 11:43 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > While converting some fold_cond_expr_with_comparison > to match, I found that I wanted to use "for cnd (cond vec_cond)" > but that was not causing the lowering of cond to happen. > What was happening wa

rs6000: Fix typos in float128 ISA3.1 support

2021-06-21 Thread Kewen.Lin via Gcc-patches
Hi, Recently if we build gcc on Power with the assembler which doesn't have Power10 support, the build will fail when building libgcc with one error message like: Error: invalid switch -mpower10 Error: unrecognized option -mpower10 make[2]: *** [...gcc/gcc-base/libgcc/shared-object.mk:14: float12

Re: [x86_64 PATCH] PR target/11877: Use xor to write zero to memory with -Os

2021-06-21 Thread Richard Biener via Gcc-patches
On Mon, Jun 21, 2021 at 10:37 AM Jakub Jelinek via Gcc-patches wrote: > > On Mon, Jun 21, 2021 at 09:18:28AM +0200, Uros Bizjak via Gcc-patches wrote: > > > 2021-06-20 Roger Sayle > > > > > > gcc/ChangeLog > > > PR target/11877 > > > * config/i386/i386.md: New define_peephole2s

[PATCH] tree-optimization/101121 - avoid infinite SLP build

2021-06-21 Thread Richard Biener
The following plugs another hole where we cache a failed SLP build attempt with an all-success 'matches'. It also adds checking that we don't do that. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-06-21 Richard Biener PR tree-optimization/101121 * tree-vec

Re: [PATCH V3] Split loop for NE condition.

2021-06-21 Thread Richard Biener
On Wed, 9 Jun 2021, guojiufu wrote: > On 2021-06-09 17:42, guojiufu via Gcc-patches wrote: > > On 2021-06-08 18:13, Richard Biener wrote: > >> On Fri, 4 Jun 2021, Jiufu Guo wrote: > >> > > cut... > >>> + gcond *cond = as_a (last); > >>> + enum tree_code code = gimple_cond_code (cond); >

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

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

Re: [Patch, v2] contrib/mklog.py: Improve PR handling (was: Re: git gcc-commit-mklog doesn't extract PR number to ChangeLog)

2021-06-21 Thread Tobias Burnus
On 21.06.21 10:09, Martin Liška wrote: $ pytest test_mklog.py FAILED test_mklog.py::TestMklog::test_sorting - AssertionError: assert '\n\tPR 50209...New test.\n\n' == 'gcc/ChangeLo...New test.\n\n' Aha, missed that there is indeed a testsuite - nice! $ flake8 mklog.py mklog.py:187:23: Q000 Rem

Re: [x86_64 PATCH] PR target/11877: Use xor to write zero to memory with -Os

2021-06-21 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 21, 2021 at 09:18:28AM +0200, Uros Bizjak via Gcc-patches wrote: > > 2021-06-20 Roger Sayle > > > > gcc/ChangeLog > > PR target/11877 > > * config/i386/i386.md: New define_peephole2s to shrink writing > > 1, 2 or 4 consecutive zeros to memory when optimizing f

  1   2   >