[COMMITTED] Optimize signed DImode -> TImode on power10.

2022-03-04 Thread Michael Meissner via Gcc-patches
Here is the patch that I committed to the trunk: Optimize signed DImode -> TImode on power10. On power10, GCC tries to optimize the signed conversion from DImode to TImode by using the vextsd2q instruction. However to generate this instruction, it would have to generate 3 direct moves (1 from

Re: [PATCH v8 00/12] Add LoongArch support.

2022-03-04 Thread Paul Hua via Gcc-patches
> > And based on the history of RISC-V port > > (https://gcc.gnu.org/pipermail/gcc/2017-January/222595.html) the process > > for a new port seems: > > > > 1. Get a permission from the Steering Committee. > > 2. Add one or two port maintainers into MAINTAINERS file. > > 3. Now the technical

Re: [PATCH v8 00/12] Add LoongArch support.

2022-03-04 Thread Paul Hua via Gcc-patches
> > And based on the history of RISC-V port > (https://gcc.gnu.org/pipermail/gcc/2017-January/222595.html) the process > for a new port seems: > > 1. Get a permission from the Steering Committee. > 2. Add one or two port maintainers into MAINTAINERS file. > 3. Now the technical reviewing of the

[PATCH v3] configure: Implement --enable-host-pie

2022-03-04 Thread Marek Polacek via Gcc-patches
On Fri, Feb 25, 2022 at 12:04:32AM +, Joseph Myers wrote: > On Thu, 24 Feb 2022, Marek Polacek via Gcc-patches wrote: > > > gmp/mpfr/mpc/isl are DSOs I believe and therefore always PIC. > > They are *not* DSOs when built in-tree (see the use of --disable-shared in > the relevant parts of

Re: [PATCH, V2] Optimize signed DImode -> TImode on power10, PR target/104698

2022-03-04 Thread Michael Meissner via Gcc-patches
On Wed, Mar 02, 2022 at 06:47:39PM -0600, Segher Boessenkool wrote: > Please use src instead of dest_lo. This always works, because you did > the low-part move first. That doesn't work in the case where src is a memory operation. Dest_lo is guarantee to be a register, but src isn't. --

New German PO file for 'gcc' (version 12.1-b20220213)

2022-03-04 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the German team of translators. The file is available at: https://translationproject.org/latest/gcc/de.po (This file,

Re: [PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-04 Thread Jason Merrill via Gcc-patches
On 3/4/22 14:24, Patrick Palka wrote: Here we're failing to communicate to cp_finish_decl from tsubst_expr that we're in a copy-initialization context (via the LOOKUP_ONLYCONVERTING flag), which causes do_class_deduction to always consider explicit deduction guides when performing CTAD for a

Re: [PATCH, V2] Optimize signed DImode -> TImode on power10, PR target/104698

2022-03-04 Thread Michael Meissner via Gcc-patches
On Wed, Mar 02, 2022 at 06:47:39PM -0600, Segher Boessenkool wrote: > On Wed, Mar 02, 2022 at 03:54:29PM -0500, Michael Meissner wrote: > > Optimize signed DImode -> TImode on power10. > > > On power10, GCC tries to optimize the signed conversion from DImode to > > TImode by using the vextsd2q

Re: [PATCH v8 00/12] Add LoongArch support.

2022-03-04 Thread Xi Ruoyao via Gcc-patches
On Fri, 2022-03-04 at 15:17 +0800, xucheng...@loongson.cn wrote: > The binutils has been merged into trunk: > https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=560b3fe208255ae909b4b1c88ba9c28b09043307 > > Note: We split -mabi= into -mabi=lp64d/f/s, the new options not support by >

[PATCH] c++: Standard mangling abbreviations & modules

2022-03-04 Thread Nathan Sidwell
The std manglings for things like std::string should not apply if we're not in the global module. nathan -- Nathan SidwellFrom 591d2130348b15ec9158bb69a7fd9442bb81fa3a Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 2 Mar 2022 19:42:23 -0500 Subject: [PATCH] c++: Standard mangling

[no subject]

2022-03-04 Thread Thomas Schwinge
Hi! On 2022-03-04T14:46:25+0100, I wrote: > Pushed to master branch commit 8935589b496f755e08cadf26d8ceddf0dd6e0968 > "OMP lowering: Regimplify 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs > [PR100280, PR104132, PR104133]", see attached. > ---

[committed] analyzer: reduce svalue depth limit from 13 to 12 [PR103521]

2022-03-04 Thread David Malcolm via Gcc-patches
PR analyzer/103521 reports that commit r12-5585-g132902177138c09803d639e12b1daebf2b9edddc ("analyzer: further false leak fixes due to overzealous state merging [PR103217]") led to failures of gcc.dg/analyzer/pr93032-mztools.c on some targets, where rather than reporting FILE * leaks, the

libgo patch committed: Skip _FILE in mkruntimeinc

2022-03-04 Thread Ian Lance Taylor via Gcc-patches
This libgo patch skips the _FILE struct in mkruntimeinc.sh. We don't need it, and it breaks uclibc. This should fix GCC PR 101246. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 59a20b189dcbda8d929503ae1b1f864535a27584 diff --git a/gcc/go/gofrontend/MERGE

libgo patch committed: move semaphore to gotool packages

2022-03-04 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot moves golang.org/x/sync/semaphore from the libgo packages to the gotools packages, since it is only used by gofmt. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian e71079517f16fee6759bad2be14f574c3548743e diff --git

[PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-04 Thread Patrick Palka via Gcc-patches
Here we're failing to communicate to cp_finish_decl from tsubst_expr that we're in a copy-initialization context (via the LOOKUP_ONLYCONVERTING flag), which causes do_class_deduction to always consider explicit deduction guides when performing CTAD for a templated variable initializer. We could

libgo patch committed: Fix AIX build

2022-03-04 Thread Ian Lance Taylor via Gcc-patches
This patch by Clément Chigot fixes the build of libgo on AIX, which was broken in the update to the Go 1.18 release. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 98a7a7b5275b226932f503cc1dcc21fd9a9f8476 diff --git a/gcc/go/gofrontend/MERGE

Re: [PATCH] libstdc++: vxworks: remove stray include

2022-03-04 Thread Olivier Hainque via Gcc-patches
Good for me, thanks Rasmus. > On 4 Mar 2022, at 09:27, Rasmus Villemoes wrote: > > There doesn't seem to be any reason for this TU to include > , and it causes errors when the resulting libstdc++ is used > on our VxWorks 5.5 target - presumably because now libstdc++ itself > contains an

[PATCH] rs6000: Improve .machine

2022-03-04 Thread Segher Boessenkool
Hi! This adds more correct .machine for most older CPUs. It should be conservative in the sense that everything we handled before we handle at least as well now. This does not yet revamp the server CPU handling, it is too risky at this point in time. Tested on powerpc64-linux {-m32,-m64}.

Re: [PATCH] [i386] Optimize v4si broadcast for noavx512vl.

2022-03-04 Thread H.J. Lu via Gcc-patches
On Fri, Mar 4, 2022 at 8:40 AM Richard Biener via Gcc-patches wrote: > > > > > Am 04.03.2022 um 03:30 schrieb Hongtao Liu via Gcc-patches > > : > > > > On Fri, Mar 4, 2022 at 10:29 AM liuhongt via Gcc-patches > > wrote: > >> > >> This is incremental patch based on [1], it enables optimization

[pushed] Darwin: Fix a type mismatch warning for a non-GCC bootstrap compiler.

2022-03-04 Thread Iain Sandoe via Gcc-patches
DECL_MD_FUNCTION_CODE() returns an int, on one particular compiler the code in darwin_fold_builtin() triggers a warning. Fixed thus. tested on x86_64-darwin18, powerpc-darwin9, cross to powerpc-darwin8. pushed to master, thanks Iain Signed-off-by: Iain Sandoe gcc/ChangeLog: *

[pushed] Darwin, libgcc: Fix build errors on powerpc-darwin8.

2022-03-04 Thread Iain Sandoe via Gcc-patches
PowerPC Darwin8 is the last version to use an unwind frame fallback routine. This had been omitted from the new shared EH library, along with one more header dependency that only fires there. tested on x86_64-darwin18, powerpc-darwin9 and cross to powerpc-darwin8 pushed to master, thanks Iain

Re: [PATCH] [i386] Optimize v4si broadcast for noavx512vl.

2022-03-04 Thread Richard Biener via Gcc-patches
> Am 04.03.2022 um 03:30 schrieb Hongtao Liu via Gcc-patches > : > > On Fri, Mar 4, 2022 at 10:29 AM liuhongt via Gcc-patches > wrote: >> >> This is incremental patch based on [1], it enables optimization as below >> >> - vbroadcastss.LC1(%rip), %xmm0 >> + movl$-45,

[committed] c++: Add testcase for already fixed PR [PR103443]

2022-03-04 Thread Patrick Palka via Gcc-patches
Fixed by r12-7264. PR c++/103443 gcc/testsuite/ChangeLog: * g++.dg/cpp2a/consteval29.C: New test. --- gcc/testsuite/g++.dg/cpp2a/consteval29.C | 20 1 file changed, 20 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp2a/consteval29.C diff --git

[c++] New module mangling ABI

2022-03-04 Thread Nathan Sidwell
This implements a new module mangling ABI as the original one has a few issues: a) it was not demangleable (oops) b) implemented a weak ownership model. This implements a strong ownership model, so that exported entities from named modules are mangled to include their module attachment. This

Re: [PATCH] OpenMP, libgomp: Add new runtime routine omp_get_mapped_ptr.

2022-03-04 Thread Jakub Jelinek via Gcc-patches
On Fri, Mar 04, 2022 at 03:47:31PM +0100, Marcel Vollweiler wrote: > libgomp/ChangeLog: > > * libgomp.map: Added omp_get_mapped_ptr. > * libgomp.texi: Tagged omp_get_mapped_ptr as supported. > * omp.h.in: Added omp_get_mapped_ptr. > * omp_lib.f90.in: Added interface for

Test 'libgomp.oacc-*/kernels-private-vars-*' with '--param=openacc-kernels=decompose' [PR104784]

2022-03-04 Thread Thomas Schwinge
Hi! On 2022-03-04T14:46:25+0100, I wrote: > Pushed to master branch commit 8935589b496f755e08cadf26d8ceddf0dd6e0968 > "OMP lowering: Regimplify 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs > [PR100280, PR104132, PR104133]", see attached. Pushed to master branch commit

[PATCH] OpenMP, libgomp: Add new runtime routine omp_get_mapped_ptr.

2022-03-04 Thread Marcel Vollweiler
Hi, This patch adds the OpenMP runtime routine "omp_get_mapped_ptr" which was introduced in OpenMP 5.1 (specification section 3.8.11): "The omp_get_mapped_ptr routine returns the device pointer that is associated with a host pointer for a given device." "The device_num argument must be greater

[PATCH] arm: Remove unused variable arm_binop_none_none_unone_qualifiers

2022-03-04 Thread Christophe Lyon via Gcc-patches
From: Christophe Lyon Commits r12-7342 and r12-7344 made some cleanup, leaving arm_binop_none_none_unone_qualifiers unused. This is causing build failures with -Werror (eg bootstrap). This patch fixes the problem by removing the definition of arm_binop_none_none_unone_qualifiers and

Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-04 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 03, 2022 at 05:08:30PM -0700, Martin Sebor wrote: > > 1) shouldn't it give up for EDGE_ABNORMAL too? I mean, e.g. > > following a non-local goto forced edge from a noreturn call > > to a non-local label (if there is just one) doesn't seem > > right to me > > Possibly yes.

Re: [PATCH] Improve profile handling in switch lowering.

2022-03-04 Thread Martin Liška
PING^1 On 1/26/22 12:11, Martin Liška wrote: Hello. Right now, switch lowering does not update basic_block::count values so that they are uninitiliazed. Moreover, I've updated probability scaling when a more complex expansion happens. There are still some situations where the profile is a bit

OMP lowering: Regimplify 'OMP_CLAUSE_MAP_DECL_MAKE_ADDRESSABLE' DECLs [PR100280, PR104132, PR104133]

2022-03-04 Thread Thomas Schwinge
Hi! On 2022-03-01T17:46:20+0100, I wrote: > On 2022-01-13T10:54:16+0100, I wrote: >> On 2019-05-08T14:51:57+0100, Julian Brown wrote: >>> - The "addressable" bit is set during the kernels conversion pass for >>>variables that have "create" (alloc) clauses created for them in the >>>

OpenACC 'kernels' decomposition: Move 'TREE_ADDRESSABLE' setting into OMP lowering [PR100280]

2022-03-04 Thread Thomas Schwinge
Hi! On 2022-01-13T10:54:16+0100, I wrote: > On 2019-05-08T14:51:57+0100, Julian Brown wrote: >> - The "addressable" bit is set during the kernels conversion pass for >>variables that have "create" (alloc) clauses created for them in the >>synthesised outer data region (instead of in the

Add diagnostic: "note: OpenACC 'kernels' decomposition: variable '[...]' declared in block made addressable" [PR100280]

2022-03-04 Thread Thomas Schwinge
Hi! On 2022-01-13T10:54:16+0100, I wrote: > On 2019-05-08T14:51:57+0100, Julian Brown wrote: >> - The "addressable" bit is set during the kernels conversion pass for >>variables that have "create" (alloc) clauses created for them in the >>synthesised outer data region (instead of in the

Add 'c-c++-common/goacc/kernels-decompose-pr104133-1.c' [PR104133]

2022-03-04 Thread Thomas Schwinge
Hi! On 2022-03-01T17:46:20+0100, I wrote: > On 2022-01-13T10:54:16+0100, I wrote: >> --- a/gcc/omp-oacc-kernels-decompose.cc >> +++ b/gcc/omp-oacc-kernels-decompose.cc >> @@ -842,6 +843,9 @@ maybe_build_inner_data_region (location_t loc, gimple >> *body, >> inner_data_clauses =

Add 'c-c++-common/goacc/kernels-decompose-pr104132-1.c' [PR104132]

2022-03-04 Thread Thomas Schwinge
Hi! On 2022-03-01T17:46:20+0100, I wrote: > On 2022-01-13T10:54:16+0100, I wrote: >> --- a/gcc/omp-oacc-kernels-decompose.cc >> +++ b/gcc/omp-oacc-kernels-decompose.cc >> @@ -842,6 +843,9 @@ maybe_build_inner_data_region (location_t loc, gimple >> *body, >> inner_data_clauses =

Update 'c-c++-common/goacc/classify-*', 'gfortran.dg/goacc/classify-*'

2022-03-04 Thread Thomas Schwinge
Hi! Pushed to master branch commit fda0b0eb4f744f012f21c6976c2e42df87c313bb "Update 'c-c++-common/goacc/classify-*', 'gfortran.dg/goacc/classify-*'", see attached. Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München;

Re: [PATCH] opts: fix -gtoggle + optimize attribute

2022-03-04 Thread Martin Liška
On 3/1/22 09:48, Richard Biener wrote: I think moving flag_gtoggle handling before the flag_syntax_only handling is a good thing. But I don't quite understand the flag_var_tracking disabling or how it worked before. Well, as you know, the debugging options are a can of worms. During GCC 12

Re: [PATCH] [i386] Optimize v4si broadcast for noavx512vl.

2022-03-04 Thread Uros Bizjak via Gcc-patches
On Fri, Mar 4, 2022 at 3:28 AM liuhongt wrote: > > This is incremental patch based on [1], it enables optimization as below > > - vbroadcastss.LC1(%rip), %xmm0 > + movl$-45, %edx > + vmovd %edx, %xmm0 > + vpshufd $0, %xmm0, %xmm0 > > According to microbenchmark,

[PATCH v2] eliminate mutex in fast path of __register_frame

2022-03-04 Thread Thomas Neumann via Gcc-patches
The __register_frame/__deregister_frame functions are used to register unwinding frames from JITed code in a sorted list. That list itself is protected by object_mutex, which leads to terrible performance in multi-threaded code and is somewhat expensive even if single-threaded. There was already

Re: [PATCH] gimplify: Clear TREE_READONLY on automatic vars being stored into [PR104529]

2022-03-04 Thread Richard Biener via Gcc-patches
> Am 04.03.2022 um 10:04 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > The following testcase regressed when SRA started punting on stores to > TREE_READONLY vars. We document that: > "In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node, > nonzero means it may not

[committed] libstdc++: Fix -Wunused-local-typedefs warning in

2022-03-04 Thread Jonathan Wakely via Gcc-patches
On 03/03/22 22:38 +, Jonathan Wakely wrote: Tested x86_64-linux (-m32/-m64), powerpc64-linux (-m32/-m64), powerpc64le-linux, powerpc-aix (maix32/-maix64/-mlong-double-128). Pushed to trunk. I'm inclined to backport this to gcc-11 after some soak time on trunk (but not gcc-10, because it

Re: [i386 PATCH] PR 104732: Simplify/fix DI mode logic expansion/splitting on -m32.

2022-03-04 Thread Uros Bizjak via Gcc-patches
On Fri, Mar 4, 2022 at 11:30 AM Roger Sayle wrote: > > > This clean-up patch resolves PR testsuite/104732, the failure of the recent > test gcc.target/i386/pr100711-1.c on 32-bit Solaris/x86. Rather than just > tweak the testcase, the proposed approach is to fix the underlying problem > by

[i386 PATCH] PR 104732: Simplify/fix DI mode logic expansion/splitting on -m32.

2022-03-04 Thread Roger Sayle
This clean-up patch resolves PR testsuite/104732, the failure of the recent test gcc.target/i386/pr100711-1.c on 32-bit Solaris/x86. Rather than just tweak the testcase, the proposed approach is to fix the underlying problem by removing the "TARGET_STV && TARGET_SSE2" conditionals from the DI

Re: [PATCH] libstdc++: vxworks: remove stray include

2022-03-04 Thread Jonathan Wakely via Gcc-patches
On Fri, 4 Mar 2022 at 08:28, Rasmus Villemoes wrote: > > There doesn't seem to be any reason for this TU to include > , and it causes errors when the resulting libstdc++ is used > on our VxWorks 5.5 target - presumably because now libstdc++ itself > contains an instance of std::ios_base::Init.

[PATCH] gimplify: Clear TREE_READONLY on automatic vars being stored into [PR104529]

2022-03-04 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase regressed when SRA started punting on stores to TREE_READONLY vars. We document that: "In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node, nonzero means it may not be the lhs of an assignment." so the SRA change looks desirable. On the other side, at

[PATCH] libstdc++: vxworks: remove stray include

2022-03-04 Thread Rasmus Villemoes
There doesn't seem to be any reason for this TU to include , and it causes errors when the resulting libstdc++ is used on our VxWorks 5.5 target - presumably because now libstdc++ itself contains an instance of std::ios_base::Init. Which should be mostly harmless, but apparently isn't, and from a