Re: [PATCH v2] Strip of a vector load which is only used partially.

2022-05-09 Thread Richard Biener via Gcc-patches
On Mon, May 9, 2022 at 7:11 AM liuhongt via Gcc-patches wrote: > > Here's adjused patch. > Ok for trunk? > > Optimize > > _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>; > _5 = BIT_FIELD_REF <_4, 128, 0>; > > to > > _5 = BIT_FIELD_REF <_1, 128, 128>; > > gcc/ChangeLog: > > P

Re: [PATCH] Strip of a vector load which is only used partially.

2022-05-09 Thread Richard Biener via Gcc-patches
On Tue, May 10, 2022 at 12:58 AM Jeff Law via Gcc-patches wrote: > > > > On 5/5/2022 2:26 AM, Richard Biener via Gcc-patches wrote: > > On Thu, May 5, 2022 at 7:04 AM liuhongt wrote: > >> Optimize > >> > >>_1 = *srcp_3(D); > >>_4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>; > >>

Re: [PATCH] rs6000: avoid peeking eof after __vector

2022-05-09 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > Hi! > > On Mon, May 09, 2022 at 06:19:45PM +0800, Jiufu Guo wrote: >> There is a rare corner case: where vector is followed only by one >> valid identifer and the ";" which is near the end of the file. >> >> Like the case in PR101168: >> using vdbl = __vector double

Re: [patch][gcc13][i386][pr101891]Adjust -fzero-call-used-regs to always use XOR

2022-05-09 Thread Richard Biener via Gcc-patches
On Mon, 9 May 2022, Uros Bizjak wrote: > On Mon, May 9, 2022 at 5:44 PM Qing Zhao wrote: > > > > Another question: > > > > I think that this patch might need to be back ported to Gcc12 and GCC11. > > > > What?s your opinion on this? > > It is not a regression, so following general rules, the pat

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-09 Thread Mohamed Atef via Gcc-patches
Here is the final change. On Tue, May 10, 2022 at 7:21 AM Mohamed Atef wrote: > Resubmission. > > libgomp/ChangeLog > > 2022-05-10 Mohamed Atef > > *config/darwin/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. > *config/hpux/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. > *config/posix/plugin-su

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-09 Thread Mohamed Atef via Gcc-patches
Resubmission. libgomp/ChangeLog 2022-05-10 Mohamed Atef *config/darwin/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. *config/hpux/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. *config/posix/plugin-suffix.h (SONAME_SUFFIX): Remove ()s. *configure: Regenerate. * Makefile.am (toolexeclib_LTLIBRARI

RE: [PATCH] Reconstruct i386 testsuite with __builtin_cpu_supports

2022-05-09 Thread Jiang, Haochen via Gcc-patches
That make sense to me. Thx! > -Original Message- > From: Uros Bizjak > Sent: Saturday, May 7, 2022 5:04 PM > To: Jiang, Haochen > Cc: Hongyu Wang ; Liu, Hongtao > ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Reconstruct i386 testsuite with __builtin_cpu_supports > > On Sat, May 7, 2

[pushed] c++: fix arm-eabi crash building libstdc++ [PR105529]

2022-05-09 Thread Jason Merrill via Gcc-patches
My recent change to cxx_eval_store_expression asserts that the target and value can only end up having different types in the case of an empty base; this was crashing arm-eabi compilers because in that ABI [cd]tors return *this, and weren't converting it to void* first. This also shares the 'retur

Re: [PATCH] c++: ICE with constexpr dtor on ARM [PR105529]

2022-05-09 Thread Jason Merrill via Gcc-patches
On 5/9/22 18:41, Marek Polacek wrote: When compiling this test on ARM with -O, we ICE in cxx_eval_store_expression while evaluating a CALL_EXPR allocator::~allocator (&D.4529). Its body has this store: = this The RHS is evaluated into &D.4529 of type allocator *. The object, , is of type

[PATCH V4 3/3] RISC-V:Cache Management Operation instructions testcases

2022-05-09 Thread shiyulong
From: yulong This commit adds testcases about CMO instructions. gcc/testsuite/ChangeLog: * gcc.target/riscv/cmo-zicbom-1.c: New test. * gcc.target/riscv/cmo-zicbom-2.c: New test. * gcc.target/riscv/cmo-zicbop-1.c: New test. * gcc.target/riscv/cmo-zicbop-2.c: New

[PATCH V4 2/3] RISC-V:Cache Management Operation instructions

2022-05-09 Thread shiyulong
From: yulong This commit adds cbo.clea,cbo.flush,cbo.inval,cbo.zero,prefetch.i,prefetch.r and prefetch.w instructions. diff with the previous version: We use unspec_volatile instead of unspec for those cache operations. We use UNSPECV instead of UNSPEC and move them to unspecv. gcc/ChangeLog:

[PATCH V4 1/3] RISC-V: Add mininal support for Zicbo[mzp]

2022-05-09 Thread shiyulong
From: yulong This commit adds minimal support for 'Zicbom','Zicboz' and 'Zicbop' extensions. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Add zicbom, zicboz, zicbop extensions. * config/riscv/riscv-opts.h (MASK_ZICBOZ): New. (MASK_ZICBOM): New. (MASK_ZI

[PATCH V4 0/3] RISC-V:Add mininal support for Zicbo[mzp]

2022-05-09 Thread shiyulong
From: yulong This patchset adds support for three recently ratified RISC-V extensions: - Zicbom (Cache-Block Management Instructions) - Zicbop (Cache-Block Prefetch hint instructions) - Zicboz (Cache-Block Zero Instructions) Patch 1: Add Zicbom/z/p mininal support Patch 2: Add Zicbom/z/p

Re: [RFC 0/7] RISCV: Implement ISA Manual Table A.6 Mappings

2022-05-09 Thread Patrick O'Neill
The litmus test in this RFC is flawed since it does not assert that the LR/SC pair succeeds. The condition in the RFC is permitted iff the LR/SC pair fails. After correcting this flaw [1][2], the litmus test condition is correctly forbidden. This correction does not mean that the A.6 mapping is g

Re: [PATCH] libgo: Recognize off64_t / loff_t type definition of musl libc

2022-05-09 Thread Ian Lance Taylor via Gcc-patches
On Sun, Apr 24, 2022 at 3:20 AM wrote: > > From: Sören Tempel > > The libgo code assumes both off64_t and loff_t to be present. For > example, for the splice(2) function prototype. Similar to glibc, > musl libc supports these types but defines them as macros, not as > typedefs. Unfortunately, -fd

New Croatian PO file for 'gcc' (version 12.1.0)

2022-05-09 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 Croatian team of translators. The file is available at: https://translationproject.org/latest/gcc/hr.po (This file, 'gcc-12.1.0.hr.po', has j

Re: [PATCH] Strip of a vector load which is only used partially.

2022-05-09 Thread Jeff Law via Gcc-patches
On 5/5/2022 2:26 AM, Richard Biener via Gcc-patches wrote: On Thu, May 5, 2022 at 7:04 AM liuhongt wrote: Optimize _1 = *srcp_3(D); _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>; _5 = BIT_FIELD_REF <_4, 128, 0>; to _1 = *srcp_3(D); _5 = BIT_FIELD_REF <_1, 128, 128

[PATCH] c++: ICE with constexpr dtor on ARM [PR105529]

2022-05-09 Thread Marek Polacek via Gcc-patches
When compiling this test on ARM with -O, we ICE in cxx_eval_store_expression while evaluating a CALL_EXPR allocator::~allocator (&D.4529). Its body has this store: = this The RHS is evaluated into &D.4529 of type allocator *. The object, , is of type void *. Their types don't match so we go

Re: [PATCH 09/10] libgcc: Add support for HF mode (aka __fp16) in libbid

2022-05-09 Thread Joseph Myers
On Mon, 9 May 2022, Christophe Lyon via Gcc-patches wrote: > This patch adds support for trunc and extend operations between HF > mode (__fp16) and Decimal Floating Point formats (_Decimal32, > _Decimal64 and _Decimal128). > > For simplicity we rely on the implicit conversions inserted by the > c

Re: [PATCH] configure: add --disable-fix-includes

2022-05-09 Thread Joseph Myers
If you add a new configure option, it should be documented in install.texi. -- Joseph S. Myers jos...@codesourcery.com

[PATCH] PR fortran/105526 - [Coarray] Add missing checks for arguments of type TEAM_TYPE

2022-05-09 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, we were lacking checks for arguments of type TEAM_TYPE to some coarray intrinsics (FORM TEAM, CHANGE TEAM, and SYNC TEAM). The attached patch adds these, and as a bonus verifies that TEAM NUMBER is a scalar integer. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Ha

Re: [PATCH] PR fortran/105501 - check for non-optional spaces between adjacent keywords

2022-05-09 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 09.05.22 um 20:24 schrieb Mikael Morin: The fix itself looks good.  Regarding the test, I don’t understand the problem.  Can’t there be multiple subroutines, each having one (or more) problematic statement(s)? that's why I tried but failed. Example: subroutine a errorstop end

Re: [PATCH] c++: Implement P2324R2, labels at the end of compound-stmts [PR103539]

2022-05-09 Thread Jason Merrill via Gcc-patches
On 5/8/22 20:26, Marek Polacek wrote: This patch implements C++23 , which allows labels at the end of a compound statement. Its C FE counterpart was already implemented in r11-4813. In cp_parser_statement I rely on in_compound to determine whether we're in a compound

Re: [patch][gcc13][i386][pr101891]Adjust -fzero-call-used-regs to always use XOR

2022-05-09 Thread Uros Bizjak via Gcc-patches
On Mon, May 9, 2022 at 5:44 PM Qing Zhao wrote: > > Another question: > > I think that this patch might need to be back ported to Gcc12 and GCC11. > > What’s your opinion on this? It is not a regression, so following general rules, the patch should not be backported. OTOH, the patch creates funct

Re: [PATCH] PR fortran/105501 - check for non-optional spaces between adjacent keywords

2022-05-09 Thread Mikael Morin
Le 08/05/2022 à 22:17, Harald Anlauf via Fortran a écrit : Dear all, the PR correctly notes that a space between keywords 'TYPE' and 'IS' is required in free-form, but we currently accept 'TYPEIS'. We shouldn't. The combinations with non-optional blanks are listed in the standard; in F2018 this

Re: [PATCH] AArch64: Improve address rematerialization costs

2022-05-09 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra via Gcc-patches writes: > Hi Richard, > >> I'm not questioning the results, but I think we need to look in more >> detail why rematerialisation requires such low costs.  The point of >> comparison should be against a spill and reload, so any constant >> that is as cheap as a load sh

Re: [PATCH] AArch64: Cleanup CPU option processing code

2022-05-09 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra via Gcc-patches writes: > The --with-cpu/--with-arch configure option processing not only checks valid > arguments > but also sets TARGET_CPU_DEFAULT with a CPU and extension bitmask. This > isn't used > however since a --with-cpu is translated into a -mcpu option which is > pro

Re: [PATCH] AArch64: Improve address rematerialization costs

2022-05-09 Thread Wilco Dijkstra via Gcc-patches
Hi Richard, > I'm not questioning the results, but I think we need to look in more > detail why rematerialisation requires such low costs.  The point of > comparison should be against a spill and reload, so any constant > that is as cheap as a load should be rematerialised.  If that isn't > happen

Re: [PATCH] ipa-visibility: Optimize TLS access [PR99619]

2022-05-09 Thread Alexander Monakov
On Mon, 9 May 2022, Jan Hubicka wrote: > > On second thought, it might be better to keep the assert, and place the loop > > under 'if (optimize)'? > > The problem is that at IPA level it does not make sense to check > optimize flag as it is function specific. (shlib is OK to check it > anywhere

Re: [PATCH] ipa-visibility: Optimize TLS access [PR99619]

2022-05-09 Thread Jan Hubicka via Gcc-patches
> On Mon, 2 May 2022, Alexander Monakov wrote: > > > > --- a/gcc/ipa-visibility.cc > > > > +++ b/gcc/ipa-visibility.cc > > > > @@ -872,6 +872,22 @@ function_and_variable_visibility (bool > > > > whole_program) > > > > } > > > > } > > > > } > > > > + FOR_EACH_VARIABLE (vno

[PATCH] AArch64: Cleanup CPU option processing code

2022-05-09 Thread Wilco Dijkstra via Gcc-patches
The --with-cpu/--with-arch configure option processing not only checks valid arguments but also sets TARGET_CPU_DEFAULT with a CPU and extension bitmask. This isn't used however since a --with-cpu is translated into a -mcpu option which is processed as if written on the command-line (so TARGET

Re: [PATCH] AArch64: Improve address rematerialization costs

2022-05-09 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Improve rematerialization costs of addresses. The current costs are set too > high > which results in extra register pressure and spilling. Using lower costs > means > addresses will be rematerialized more often rather than being spilled or > causing > spills. This r

[PATCH] AArch64: Improve address rematerialization costs

2022-05-09 Thread Wilco Dijkstra via Gcc-patches
Improve rematerialization costs of addresses. The current costs are set too high which results in extra register pressure and spilling. Using lower costs means addresses will be rematerialized more often rather than being spilled or causing spills. This results in significant codesize reduction

Re: [PATCH] ipa-visibility: Optimize TLS access [PR99619]

2022-05-09 Thread Alexander Monakov
On Mon, 2 May 2022, Alexander Monakov wrote: > > > --- a/gcc/ipa-visibility.cc > > > +++ b/gcc/ipa-visibility.cc > > > @@ -872,6 +872,22 @@ function_and_variable_visibility (bool whole_program) > > > } > > > } > > > } > > > + FOR_EACH_VARIABLE (vnode) > > > +{ > > > + tree de

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2022-05-09 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 9 May 2022 at 19:22, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 3 May 2022 at 18:25, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Tue, 4 Jan 2022 at 19:12, Richard Sandiford > >> > wrote: > >> >> > >> >> Richard Biener writes:

Re: [patch][gcc13][i386][pr101891]Adjust -fzero-call-used-regs to always use XOR

2022-05-09 Thread Qing Zhao via Gcc-patches
Another question: I think that this patch might need to be back ported to Gcc12 and GCC11. What’s your opinion on this? If so, when can I backport it? thanks. Qing > On May 7, 2022, at 4:06 AM, Uros Bizjak wrote: > > On Fri, May 6, 2022 at 6:42 PM Qing Zhao wrote: >> >> >> >>> On May 6,

Re: [patch][gcc13][i386][pr101891]Adjust -fzero-call-used-regs to always use XOR

2022-05-09 Thread Qing Zhao via Gcc-patches
> On May 7, 2022, at 4:06 AM, Uros Bizjak wrote: > > On Fri, May 6, 2022 at 6:42 PM Qing Zhao wrote: >> >> >> >>> On May 6, 2022, at 10:58 AM, Uros Bizjak wrote: >>> >>> On Fri, May 6, 2022 at 4:29 PM Qing Zhao wrote: Hi, As Kee’s requested in this PR: https:/

[PATCH] x86: Add .note.GNU-stack section only for Linux

2022-05-09 Thread H.J. Lu via Gcc-patches
Add .note.GNU-stack section only for Linux since it may not be supported on non-Linux OSes. __ELF__ isn't checked since these tests can only run on Linux/x86 ELF systems. PR target/105472 * gcc.target/i386/iamcu/asm-support.S: Add .note.GNU-stack section only for Linux.

[PATCH 05/10] testsuite:: Fix pr39986.c testcase for AArch64

2022-05-09 Thread Christophe Lyon via Gcc-patches
The testcase in c-c++-common/dfp/pr39986.c detects if DFP constants are correctly emitted in the assembly. However, AArch64 uses .word instead of the expected .long directive. With this patch, we now accept both. 2022-03-31 Christophe Lyon gcc/testsuite/ * c-c++-common/dfp/pr39

[PATCH 10/10] libgcc: use __builtin_clz and __builtin_ctz in libbid

2022-05-09 Thread Christophe Lyon via Gcc-patches
This patch replaces libbid's implementations of clz and ctz for 32 and 64 bits inputs which used several masks, and switches to the corresponding builtins. This will provide a better implementation, especially on targets with clz/ctz instructions. 2022-05-06 Christophe Lyon libgcc/config/libbi

[PATCH 01/10] aarch64: Enable DFP (Decimal Floating-point) (BID format)

2022-05-09 Thread Christophe Lyon via Gcc-patches
This patch enables DFP support on aarch64, by updating config/dfp.m4 and regenerating the involved configure scripts. We enable the BID format. 2022-03-31 Christophe Lyon * config/dfp.m4: Add aarch64 support. * gcc/configure: Regenerate. * libdecnumber/configure: Regene

[PATCH 06/10] testsuite: Add new tests for DFP under aarch64/aapcs64

2022-05-09 Thread Christophe Lyon via Gcc-patches
This patch copies all existing tests involving float/double/long double types and replaces them with _Decimal32/_Decimal64/_Decimal128. I thought it would be clearer/easier to maintain to do it this way rather than adding tests for DFP types in the existing testcases, except for func-ret-1.c and fu

[PATCH 03/10] libgcc: Enable XF mode conversions to/from DFP modes only if supported

2022-05-09 Thread Christophe Lyon via Gcc-patches
Some targets do not support XF mode (eg AArch64), so don't build the corresponding to/from DFP modes convertion routines if __LIBGCC_HAS_XF_MODE__ is not defined. 2022-03-31 Christophe Lyon libgcc/ * config/libbid/_dd_to_xf.c: Check __LIBGCC_HAS_XF_MODE__. * config/libb

[PATCH 04/10] libgcc: enable DFP for AArch64

2022-05-09 Thread Christophe Lyon via Gcc-patches
DFP support on AArch64 relies on libgcc, so enable its DFP routines for all AArch64 targets. 2022-03-31 Christophe Lyon * libgcc/config.host: Add t-dfprules to AArch64 targets. --- libgcc/config.host | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libgcc/config.host b/libgcc

[PATCH 09/10] libgcc: Add support for HF mode (aka __fp16) in libbid

2022-05-09 Thread Christophe Lyon via Gcc-patches
This patch adds support for trunc and extend operations between HF mode (__fp16) and Decimal Floating Point formats (_Decimal32, _Decimal64 and _Decimal128). For simplicity we rely on the implicit conversions inserted by the compiler between HF and SD/DF/TF modes. The existing bid*_to_binary* and

[PATCH 07/10] testsuite: enable more BID DFP tests for AArch64

2022-05-09 Thread Christophe Lyon via Gcc-patches
Some tests for the BID format are currently restricted to i?86 and x86_64, but they also pass on AArch64, so this patch enables them. Since all these tests are related to the BID format, it seems useful to introduce a new effective-target (dfp_bid) instead of adding aarch64 to the current target l

[PATCH 08/10] testsuite: Add C++ unwinding tests with Decimal Floating-Point

2022-05-09 Thread Christophe Lyon via Gcc-patches
These tests exercise exception handling with Decimal Floating-Point type. dfp-1.C and dfp-2.C check that thrown objects of such types are properly caught, whether when using C++ classes (decimalXX) or via GCC mode attributes. dfp-saves-aarch64.C checks that such objects are properly restored, and

[PATCH 02/10] aarch64: Add backend support for DFP

2022-05-09 Thread Christophe Lyon via Gcc-patches
This patch updates the aarch64 backend as needed to support DFP modes (SD, DD and TD). 2022-03-31 Christophe Lyon gcc/ * config/aarch64/aarch64.cc (aarch64_split_128bit_move): Handle DFP modes. (aarch64_gen_storewb_pair): Likewise. (aarch64_gen_loadwb_pa

[PATCH 00/10] Enable Decimal Floating Point (DFP) on AArch64

2022-05-09 Thread Christophe Lyon via Gcc-patches
This patch series enables support of DFP on AArch64, using the BID format (Binary Integer Decimal). There is no HW support for DFP on AArch64, and we made a choice similar to x86: BID format using libgcc's libbid for software emulation. This work was done independently from Andrew's patch, which

[PATCH v2] PR105169 Fix references to discarded sections

2022-05-09 Thread Giuliano Belinassi via Gcc-patches
When -fpatchable-function-entry= is enabled, certain C++ codes fails to link because of generated references to discarded sections in __patchable_function_entry section. This commit fixes this problem by puting those references in a COMDAT section. On the previous patch, GCC fails to compile with

Re: [PATCH] rs6000: avoid peeking eof after __vector

2022-05-09 Thread Segher Boessenkool
Hi! On Mon, May 09, 2022 at 06:19:45PM +0800, Jiufu Guo wrote: > There is a rare corner case: where vector is followed only by one > valid identifer and the ";" which is near the end of the file. > > Like the case in PR101168: > using vdbl = __vector double; > #define BREAK 1 > > For this case,

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2022-05-09 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Tue, 3 May 2022 at 18:25, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> > On Tue, 4 Jan 2022 at 19:12, Richard Sandiford >> > wrote: >> >> >> >> Richard Biener writes: >> >> > On Tue, 4 Jan 2022, Richard Sandiford wrote: >> >> > >> >> >> Richa

Re: [PATCH] [i386] Implement permutation with pslldq + psrldq + por when pshufb is not available.

2022-05-09 Thread Hongtao Liu via Gcc-patches
On Mon, May 9, 2022 at 4:19 PM Uros Bizjak wrote: > > On Mon, May 9, 2022 at 7:24 AM Hongtao Liu wrote: > > > > On Mon, May 9, 2022 at 1:22 PM liuhongt via Gcc-patches > > wrote: > > > > > > pand/pandn may be used to clear upper/lower bits of the operands, in > > > that case there will be 4-5 in

Re: [PATCH] Replace EVRP in DOM with ranger.

2022-05-09 Thread Richard Biener via Gcc-patches
On Mon, May 9, 2022 at 2:42 PM Andrew MacLeod wrote: > > On 5/2/22 02:30, Richard Biener wrote: > > On Fri, Apr 29, 2022 at 6:22 PM Aldy Hernandez wrote: > >> > >> Andrew was mumbling something about a fast ranger mode for this > >> release that should be on par with legacy evrp. IIRC it would b

Re: [PATCH] testsuite: Silence analyzer/pr51628-30.c for default_packed

2022-05-09 Thread David Malcolm via Gcc-patches
On Sun, 2022-05-08 at 10:31 +0300, Dimitar Dimitrov wrote: > On default_packed targets like PRU, a warning in the file included > from > analyzer/pr51628-30.c is reported as spurious one, even though it has > been > annotated there: > >   Excess errors: >   gcc/gcc/testsuite/gcc.dg/analyzer/tortur

[c++][NFC] Rename Attached to Keyed

2022-05-09 Thread Nathan Sidwell
With modules, certain decls are 'scoped' with another decl. I chose the name 'attached', but that has become something specific in the modules context, so is no longer a good name. The alternative name I considered was 'keyed', but we already had the concept of a key virtual function (from the

Re: [PATCH] Replace EVRP in DOM with ranger.

2022-05-09 Thread Andrew MacLeod via Gcc-patches
On 5/2/22 02:30, Richard Biener wrote: On Fri, Apr 29, 2022 at 6:22 PM Aldy Hernandez wrote: Andrew was mumbling something about a fast ranger mode for this release that should be on par with legacy evrp. IIRC it would be purely DOM based, won't visit back edges, and there's no caching. But

Re: [PATCH] opts: do not allow Separate+Joined ending with =

2022-05-09 Thread Richard Biener via Gcc-patches
On Mon, May 9, 2022 at 2:16 PM Martin Liška wrote: > > On 5/9/22 13:58, Richard Biener wrote: > > The patch would have been a lot smaller if you kept it Joined only? > > Yes, but the langspec rules append a space for some reason: > > $ ./xgcc -B. /tmp/1.h -ox.h.pch --save-temps --verbose > ... > .

[PATCH] MAINTAINERS: Update my email address.

2022-05-09 Thread Clément chigot via Gcc-patches
From 8ba8d5b34473ebd8e8221c0f427b06d4af46f0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= Date: Mon, 9 May 2022 14:13:09 +0200 Subject: [PATCH] MAINTAINERS: Update my email address. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upd

Re: [PATCH] opts: do not allow Separate+Joined ending with =

2022-05-09 Thread Martin Liška
On 5/9/22 13:58, Richard Biener wrote: > The patch would have been a lot smaller if you kept it Joined only? Yes, but the langspec rules append a space for some reason: $ ./xgcc -B. /tmp/1.h -ox.h.pch --save-temps --verbose ... ./cc1 -fpreprocessed x.h.pch-1.i ... --output-pch= x.h.pch Martin

Re: [PATCH] Remove conditional STATIC_ASSERT.

2022-05-09 Thread Richard Biener via Gcc-patches
On Mon, May 9, 2022 at 10:46 AM Martin Liška wrote: > > On 5/5/22 15:08, Richard Biener wrote: > > On Thu, May 5, 2022 at 2:41 PM Martin Liška wrote: > >> > >> On 5/5/22 14:29, Richard Biener wrote: > >>> Can we then use static_assert (...) instead and remove the > >>> macro? > >> > >> Oh yes, we

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-09 Thread Richard Biener via Gcc-patches
On Thu, May 5, 2022 at 4:30 PM Martin Liška wrote: > > On 5/5/22 14:58, Iain Buclaw wrote: > > This D front-end change doesn't look right to me, besides the slight > > Hello. > > Sorry, I've re-read the patch and fixed some places where the macro usage > was wrong. > > Patch can bootstrap on x86_6

Re: [PATCH] opts: do not allow Separate+Joined ending with =

2022-05-09 Thread Richard Biener via Gcc-patches
On Mon, May 9, 2022 at 10:58 AM Martin Liška wrote: > > Do not allow strange option format: > -msmall-data-limit= 11. > > For -output-pch we need to use Separate syntax as lang spec > rules automatically append a space. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > >

Re: [PATCH] Remove non-ANSI C path in ansidecl.h.

2022-05-09 Thread Martin Liška
On 5/5/22 14:27, Richard Biener wrote: > You'd have to ask the sourceware side as well (binutils), but for sure > either the Yes, I've asked and they proved that. > guarding #if should be removed or the #else path should contain an #error. All right, I'm going to install the version w/o #if. Ma

[PATCH] tree-optimization/105517 - avoid offset truncation during VN

2022-05-09 Thread Richard Biener via Gcc-patches
When value-numbering an address expression like &p_74(D)->a1x[4294967295].a1; we are accumulating the byte offset in an 64bit integer. When later exploiting the duality between that and a POINTER_PLUS_EXPR we should avoid truncating that offset to fit in the target specific sizetype. While such o

[PATCH] Remove GIMPLE restriction of ! using match.pd patterns

2022-05-09 Thread Richard Biener via Gcc-patches
This removes #if GIMPLE guards around patterns using ! which is now also provided in the GENERIC implementation. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-05-09 Richard Biener * match.pd: Remove #if GIMPLE guards around ! using patterns. --- gcc/match.pd | 12

Re: [PATCH v2] PR105169 Fix references to discarded sections

2022-05-09 Thread Richard Biener via Gcc-patches
On Sat, 7 May 2022, Giuliano Belinassi wrote: > When -fpatchable-function-entry= is enabled, certain C++ codes fails to > link because of generated references to discarded sections in > __patchable_function_entry section. This commit fixes this problem by > puting those references in a COMDAT sect

Re: [2/2] PR96463 -- changes to type checking vec_perm_expr in middle end

2022-05-09 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 3 May 2022 at 18:25, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 4 Jan 2022 at 19:12, Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Tue, 4 Jan 2022, Richard Sandiford wrote: > >> > > >> >> Richard Biener writes: > >> >> > On Fri, 17 De

PING: [PATCH v2] eliminate mutex in fast path of __register_frame

2022-05-09 Thread Thomas Neumann via Gcc-patches
Summary: __register_frame and the corresponding _Unwind_Find_FDE use a global mutex for frame registration and unwinding. This can lead to very poor performance on machines with high core counts. This patch organizes the frames in a b-tree with read-optimized synchronization instead, which allo

Re: [PATCH V3 2/3] RISC-V:Cache Management Operation instructions

2022-05-09 Thread Kito Cheng via Gcc-patches
Use unspec_volatile instead of unspec for those cache operations, because those operations have side effects, instruction scheduler might reorder those CMO operations if you use unspec. > diff --git a/gcc/config/riscv/riscv.md b/gcc/config/riscv/riscv.md > index b3c5bce842a..d60843df490 100644 > -

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-09 Thread Arnaud Charlet via Gcc-patches
> > So I don't see how your patch can work, can you clarify? > > Sorry for that, fixed in the updated version. Assuming you're getting a successful Ada build, the Ada part is OK. > From 5ad8fe059d3419446647eadf8785c768b647d15b Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Thu, 13 Jan 20

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-09 Thread Martin Liška
On 5/9/22 12:21, Arnaud Charlet wrote: > So I don't see how your patch can work, can you clarify? Sorry for that, fixed in the updated version. Cheers, MartinFrom 5ad8fe059d3419446647eadf8785c768b647d15b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 13 Jan 2022 18:46:26 +0100 Subject: [

Re: [PATCH] Use more ARRAY_SIZE.

2022-05-09 Thread Arnaud Charlet via Gcc-patches
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > gcc/ada/ChangeLog: > > * locales.c (iso_639_1_to_639_3): Use ARRAY_SIZE. > (language_name_to_639_3): Likewise. > (country_name_to_3166): Likewise. Can you

[PATCH] rs6000: avoid peeking eof after __vector

2022-05-09 Thread Jiufu Guo via Gcc-patches
Hi! This patch is based on: https://gcc.gnu.org/pipermail/gcc-patches/2022-March/592102.html And update the 'function comment' to make it consistent with code. There is a rare corner case: where vector is followed only by one valid identifer and the ";" which is near the end of the file. Like th

[PATCH] testsuite: Make AArch64 attributes_7.c generate unique report lines.

2022-05-09 Thread Christophe Lyon via Gcc-patches
This test is executed in both C and C++ modes, lines 98 and 100 pass in C++ and are xfail in C. This results in similar lines in gcc.sum and g++.sum, differing by the PASS or XFAIL prefix, which confuses compare_test: it reports these tests twice, as "now fail, but worked before" and "now work, bu

Re: [PATCH] configure: add --disable-fix-includes

2022-05-09 Thread Andreas Schwab
On Mai 09 2022, Martin Liška wrote: > +cat >>confdefs.h <<_ACEOF > +#define FIX_INCLUDES $disable_fix_includes > +_ACEOF Where does this come from? Also, nothing uses it. > diff --git a/gcc/configure.ac b/gcc/configure.ac > index 1171c946e6e..6015e403aa9 100644 > --- a/gcc/configure.ac > +++ b/

[Ada] Suggest use of First_Valid/Last_Valid on type with static predicate

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
Attributes First_Valid/Last_Valid can be used on types with static predicate, instead of First/Last/Range. Include that suggestion in the corresponding error message. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Bad_Predicated_Subtype_Use): Add continuation

[Ada] Raise Constraint_Error when converting negative values to Char_Code

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
GNATprove relies on the comment for Get_Enum_Lit_From_Pos, which promises to raise Constraint_Error when its Pos parameter is not among the representation values for enumeration literal. However, this promise was only respected in builds with range checks enabled. The root problem was that a simil

[Ada] Fix invalid memory access on finalization of class-wide type

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
This patch corrects issues in the compiler whereby finalization of a heap- allocated class-wide type may cause an invalid memory read at runtime when the type in question contains a component whose type has a large alignment. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * e

[Ada] Simplify conversions from Uint to Char_Code

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
Replace "Char_Code (UI_To_Int (...))" with "UI_To_CC (...). Cleanup related to handling characters in GNATprove counterexamples; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par-prag.adb (Prag): Simplify conversion of character codes. * s

[Ada] Remove extra space around binary operators

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
Style cleanups. Violation initially spotted while reading the code for UI_Expon; other occurrences found with grep (and examined manually, because sometimes the extra space is needed for a code layout). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * bindgen.adb, errout.adb,

[Ada] Fully qualify name in JSON representation info

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
The current termination condition of the recursion is wrong. When in JSON mode, names should be fully qualified. This requires to stop not at the first encountered compilation unit but to recurse up to Standard. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * repinfo.adb (L

[Ada] Remove CodePeer annotations for pragma Loop_Variant

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
Pragma Loop_Variant is now expanded into a null statement in CodePeer mode. Remove annotation related to false positives in runtime units. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-expmod.adb: Remove CodePeer annotation for pragma Loop_Variant.diff --

[Ada] Prevent inlining-for-proof for calls inside ELSIF condition

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
In GNATprove we don't want inlining-for-proof to expand subprogram bodies into actions attached to nodes. These actions are attached either to expressions or to statements. For expressions, we prevented inlining by Is_Potentially_Unevaluated. For statements, we prevented inlining by In_While_Loop_

[Ada] Set Error_Msg_Warn before use of << insertion

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
Calls to Error_Msg procedures with a message using the < or << insertions need to set appropriately Error_Msg_Warn. This was not done in one call, which would lead to spurious errors when changing the implementation of a runtime unit. This fixes it so that changes can be applied. Tested on x86_64-

[Ada] Remove redundant guards for empty list

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
Routine Has_Excluded_Declaration iterates over declarations with First/Present/Next, which is safe when declarations are No_List. Cleanup related to excessive inlining-for-proof by GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * inline.adb (Build_Body_To_Inline):

[Ada] Improve error messages to include full package name

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
This patch improves error messages in the compiler so that missing 'with' error messages show the complete package name instead of a limited number of selectors. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * err_vars.ads: Add new error message names and nodes. * er

[Ada] Fix indentation of "Start of processing for ..." labels

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
The "Start of processing for ..." labels should be aligned with the BEGIN that follows. Violations found with: $ grep -Pzo "( *) \-\- Start of processing for \w+\n\n\1begin" *.adb and corrected manually, because some of them had to be entirely removed. Also, remove trailing semicolons found w

[Ada] Fix missing error on actual for In/Out parameter

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
The compiler was failing to give an error on the result of a call to the Input attribute passed as actual for an In/Out parameter. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Is_OK_Variable_For_Out_Formal): Remove test on Comes_From_Source in the co

[Ada] Fix package installation for private array type of private element

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
The problem comes from the construction of Stream operations, which happens at the point a tagged type is frozen. Streams need to see the full view of types, so that for example the Read attribute for an array can be expanded into a loop over the Read attribute for the component type. Now if durin

[Ada] Properly handle unprefixed references to components

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
In some cases, the compiler would incorrectly reject unprefixed uses of component names in an aspect specification for the composite type. Correct this error. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Replace_Type_Ref): In the case of an identifier

[Ada] Fix internal error on declaration of derived discriminated record type

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
When the parent type has a variant part and the derived type is also discriminated but statically selects a variant, the initialization routine of the derived type may attempt to access components of other variants that are no longer present. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/

[Ada] Fix visibility inside declare_expression

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
The first implementation just created a scope for the analysis of the declarations and the expression, so that visibility would just work as it does for all other constructs. However this led to an annoying bug when one of the declarations or the expression itself creates a transient scope: there m

[Ada] Fix check for looking for user defined literals

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
Recall that Has_Possible_Literal_Aspects only comes in if a given node does not have any visible interpretation. If one operand is a literal we assume that there may be a user-defined literal defined for some type to be determined during the downward pass of resolution, but that depends on the exis

[Ada] Refine description of SPARK with static Boolean expressions

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
A number of SPARK pragmas controlled by an optional Boolean expression require those expressions to be static. This is now clarified in the GNAT RM. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Abstract_State, Async_

[Ada] Use "aspect" instead of "pragma" in warnings

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
For warnings related to the Unreferenced, Unmodified, and Unused aspects, refer to the "aspect", not the "pragma". Note that the aspect can be set by an aspect_specification or a pragma, so the term "aspect" is correct even in the pragma case. However, messages in sem_prag.adb use Fix_Error, so th

[Ada] Allow Big_Integer in loop and subprogram variants

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
In SPARK loop and subprogram variants we now allow expressions of any discrete type and of Ada.Numerics.Big_Numbers.Big_Integers.Big_Integer type. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_prag.adb (Expand_Pragma_Loop_Variant, Expand_Pragma_Subprogram_Varia

[Ada] Add utility to preanalyze assert expression without forcing its type

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
In SPARK loop and subprogram variants we now allow expressions of any discrete type or of Ada.Numerics.Big_Numbers.Big_Integers.Big_Integer type. This requires a variant of Preanalyze_Assert_Expression that doesn't force the expression to be of a particular type, similar to the existing variant of

[Ada] vx21.07: stack-checking on ppc

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
On VxWorks >= 7.2 and 653, signal processing code is expected to clear the TCB exception count field when returning control back to user code. This change arranges to do so. It is believed that this is only an issue in Kernel mode, and not RTP because there is no exception count field in RTP mode

[Ada] Remove repeated analysis of attribute prefixes

2022-05-09 Thread Pierre-Marie de Rodat via Gcc-patches
At the beginning of Analyze_Attribute routine we analyze the attribute prefix. There is no need to repeat this analysis in branches for individual attributes. Code cleanup related to various Analyze/Resolve routines. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.

  1   2   >