Re: [GCC 12] [PATCH] x86: Add -mmwait for -mgeneral-regs-only

2021-04-21 Thread Uros Bizjak via Gcc-patches
On Tue, Apr 20, 2021 at 2:12 PM H.J. Lu wrote: > > Add -mmwait so that the MWAIT and MONITOR intrinsics can be used with > -mgeneral-regs-only and make -msse3 to imply -mmwait. > > gcc/ > > * config.gcc: Install mwaitintrin.h for i[34567]86-*-* and > x86_64-*-* targets. > *

[PATCH 0/3] Come up with startswith function

2021-04-21 Thread Martin Liska
The patchset is tested on x86_64-linux-gnu and I was able to build all cross-compilers. Ready to be installed to master once GCC 11.1 is released? Thanks, Martin Martin Liska (3): Come up with startswith function. LTO plugin: use startswith function. Use startswith in targets. gcc/ada/ada

[PATCH 2/3] LTO plugin: use startswith function.

2021-04-21 Thread Martin Liska
lto-plugin/ChangeLog: * lto-plugin.c (LTO_SEGMENT_NAME): Remove. (LTO_SYMTAB_PREFIX): Likewise. (LTO_SYMTAB_PREFIX_LEN): Likewise. (LTO_SYMTAB_EXT_PREFIX): Likewise. (LTO_SYMTAB_EXT_PREFIX_LEN): Likewise. (LTO_LTO_PREFIX): Likewise. (LTO_LTO

[PATCH 3/3] Use startswith in targets.

2021-04-21 Thread Martin Liska
gcc/ChangeLog: * common/config/aarch64/aarch64-common.c (aarch64_parse_extension): Use startswith function instead of strncmp. * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise. * common/config/riscv/riscv-common.c (riscv_subset_list::parse): Likew

[PATCH 1/3] Come up with startswith function.

2021-04-21 Thread Martin Liska
gcc/ada/ChangeLog: * adadecode.c (has_prefix): Remove has_prefix and replace it with startswith. (__gnat_decode): Likewise. * gcc-interface/utils.c (def_builtin_1): Use startswith function instead of strncmp. * init.c (__gnat_install_handler): Likew

[PATCH] Call toplev::finalize in CHECKING_P mode.

2021-04-21 Thread Martin Liška
Hi. The sanity check calls toplev.finalize () in order to simulate JIT mode in normal compilation mode. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: PR jit/98615 * main.c (main): Call toplev::finaliz

Re: [PATCH v4 2/2] x86: Add general_regs_only function attribute

2021-04-21 Thread Uros Bizjak via Gcc-patches
On Thu, Apr 15, 2021 at 12:39 AM H.J. Lu wrote: > > commit 87c753ac241f25d222d46ba1ac66ceba89d6a200 > Author: H.J. Lu > Date: Fri Aug 21 09:42:49 2020 -0700 > > x86: Add target("general-regs-only") function attribute > > is incomplete since it is impossible to call integer intrinsics from >

Re: [PATCH 1/3] Come up with startswith function.

2021-04-21 Thread Arnaud Charlet
> gcc/ada/ChangeLog: > > * adadecode.c (has_prefix): Remove has_prefix and replace it > with startswith. > (__gnat_decode): Likewise. This change is not OK: adadecode.c is also a runtime file and as such cannot include compiler include files. > * gcc-interface/utils.c (de

Re: [PATCH 0/3] Come up with startswith function

2021-04-21 Thread Arnaud Charlet
> The patchset is tested on x86_64-linux-gnu and I was able to build > all cross-compilers. > > Ready to be installed to master once GCC 11.1 is released? Not for the Ada part as just mentioned under your 1/3 email.

[PATCH] gcov: Use system IO buffering

2021-04-21 Thread Martin Liška
Hey. I/O buffering in gcov seems duplicite to what modern C library can provide. The patch is a simplification and can provide easier interface for system that don't have a filesystem and would like using GCOV. I'm going to install the patch after 11.1 if there are no objections. Patch can boots

[PATCH] Test simlified call in cgraph_node::analyze().

2021-04-21 Thread Martin Liška
As mentioned and explained in the PR, the calls are redundant. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: PR ipa/98815 * cgraphunit.c (cgraph_node::analyze): Remove duplicate free_dominance_

[PATCH] Support LABEL_DECL in %qD directive.

2021-04-21 Thread Martin Liška
Hey. The patch is a refactoring and simplification in tree-cfg.c. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I verified that the error messages are correctly printed. Ready to be installed? Thanks, Martin gcc/cp/ChangeLog: * error.c (dump_decl): Support anon

[PATCH 1/4] gcc-changelog: Remove components that will be removed.

2021-04-21 Thread Martin Liska
contrib/ChangeLog: * gcc-changelog/git_commit.py: Remove components that will be removed. --- contrib/gcc-changelog/git_commit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index b28f7deac23..8946

[PATCH 4/4] Remove dead components from MAINTAINERS.

2021-04-21 Thread Martin Liska
ChangeLog: * MAINTAINERS: Remove entries for removed components (HSA, BRIG, libhsail-rt). --- MAINTAINERS | 5 - 1 file changed, 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index db25583b37b..d3101d5c47f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -150,8 +150,6 @

[PATCH 0/4] Remove BRIG FE and libhsail

2021-04-21 Thread Martin Liska
Based on the discussion with Martin Jambor, I'm suggesting removal of the HSA front-end and BRIG FE. Both were marked as obsolete in GCC 11. Ready to be installed once GCC 11.1 is released? Thanks, Martin Martin Liska (4): gcc-changelog: Remove components that will be removed. Remove BRIG fro

[PATCH 2/4] Remove BRIG front-end.

2021-04-21 Thread Martin Liška
0002-Remove-BRIG-front-end.patch.bz2 Description: application/bzip

[PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Martin Liška
Having c++11, we can now use a handy function called std::thread::hardware_concurrency. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * lto-wrapper.c (cpuset_popcount): Remove. (init_num_threads): Rem

Re: Fix Fortran rounding issues, PR fortran/96983.

2021-04-21 Thread Tobias Burnus
On 20.04.21 08:58, Richard Biener via Fortran wrote: On Mon, Apr 19, 2021 at 9:40 PM Michael Meissner via Fortran wrote: Is there any reason to not only send the email to fortran@ _and_ gcc-patches@ but sending it to 13 Fortran maintainers explicitly? (Now removed) Fix Fortran rounding issues

[PATCH] lto-wrapper: Use vec data type.

2021-04-21 Thread Martin Liška
Now living in the 21st century, we don't longer need using the following tuple: cl_decoded_option **decoded_options, unsigned int *decoded_options_count) but we can rather use a standard (our) vector. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? T

[PATCH] LTO: merge -flto=arg from object files.

2021-04-21 Thread Martin Liška
Hey. It's quite common case that a build system does not a -flto=foo option as part of linker command. We should merge -flto options from the corresponding object files. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog:

[PATCH] Use STATIC_ASSERT for OVL_OP_MAX.

2021-04-21 Thread Martin Liška
Hello. It's addressing the following Clang warning: cp/lex.c:170:45: warning: result of comparison of constant 64 with expression of type 'enum ovl_op_code' is always true [-Wtautological-constant-out-of-range-compare] Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Read

[PATCH] Fix clang warnings.

2021-04-21 Thread Martin Liška
Hello. The patch silents Clang warnings: 1) if (TARGET_MACHO ) ... #if TARGET_MACHO can be replaced with #if TARGET_MACHO 2) add_AT_vms_delta is used only if VMS_DEBUGGING_INFO is defined 3) tree.c:13454:16: warning: result of comparison of constant 42405 with expression of type 'enum tree_cod

[PATCH] c++: remove redundand NULL check.

2021-04-21 Thread Martin Liška
The check is redundant. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/cp/ChangeLog: PR c++/99616 * decl.c (grokdeclarator): Remove redundant NULL check. --- gcc/cp/decl.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 0/4] i386: ISA flags and PTA simplification

2021-04-21 Thread Martin Liska
Hello. I've spent some time reading the i386 back-end and I noticed various boilerplate code can be simplified. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed once GCC 11.1 is released? Thanks, Martin Martin Liska (4): Remove DEF_ENUM from stringo

[PATCH 1/4] Remove DEF_ENUM from stringop.def.

2021-04-21 Thread Martin Liska
gcc/ChangeLog: * config/i386/i386-options.c (DEF_ENUM): Remove it. * config/i386/i386-opts.h (DEF_ENUM): Likewise. * config/i386/stringop.def (DEF_ENUM): Likewise. --- gcc/config/i386/i386-options.c | 2 -- gcc/config/i386/i386-opts.h| 4 gcc/config/i386/stringop

[PATCH 2/4] Generate PTA features from a def file.

2021-04-21 Thread Martin Liska
gcc/ChangeLog: * config/i386/i386.h (PTA_*): Remove. (enum pta_flag): New. (DEF_PTA): Generate PTA_* values from i386.def. * wide-int-bitmask.h (WIDE_INT_BITMASK_FROM_NTH): New macro. * config/i386/i386.def: New file. --- gcc/config/i386/i386.def | 110 +++

[PATCH 4/4] Remove TARGET_foo (ix86_tune == PROCESSOR_foo) macros.

2021-04-21 Thread Martin Liska
gcc/ChangeLog: * config/i386/i386-expand.c (decide_alignment): Use newly named macro TARGET_CPU_P. * config/i386/i386.c (ix86_decompose_address): Likewise. (ix86_address_cost): Likewise. (ix86_lea_outperforms): Likewise. (ix86_avoid_lea_for_addr): L

[PATCH 3/4] Overhaul in isa_flags and handling it.

2021-04-21 Thread Martin Liska
gcc/ChangeLog: * config/i386/i386-options.c (TARGET_EXPLICIT_NO_SAHF_P): Define. (SET_TARGET_NO_SAHF): Likewise. (TARGET_EXPLICIT_PREFETCH_SSE_P): Likewise. (SET_TARGET_PREFETCH_SSE): Likewise. (TARGET_EXPLICIT_NO_TUNE_P): Likewise. (SET_TAR

Re: [PATCH 1/3] Come up with startswith function.

2021-04-21 Thread Martin Liška
On 4/21/21 9:32 AM, Arnaud Charlet wrote: >> gcc/ada/ChangeLog: >> >> * adadecode.c (has_prefix): Remove has_prefix and replace it >> with startswith. >> (__gnat_decode): Likewise. > > This change is not OK: adadecode.c is also a runtime file and as such cannot > include compiler in

Re: [PATCH 0/4] Remove BRIG FE and libhsail

2021-04-21 Thread Martin Jambor
Hi, On Wed, Apr 21 2021, Martin Liska wrote: > Based on the discussion with Martin Jambor, I'm suggesting removal > of the HSA front-end and BRIG FE. Both were marked as obsolete in GCC 11. > > Ready to be installed once GCC 11.1 is released? Yes, it is. Thanks for preparing the big patch. Marti

Re: [PATCH 4/4] Remove dead components from MAINTAINERS.

2021-04-21 Thread Martin Jambor
Hi, On Fri, Mar 12 2021, Martin Liska wrote: > ChangeLog: > > * MAINTAINERS: Remove entries for removed > components (HSA, BRIG, libhsail-rt). Unless he objects, I think you should add Pekka to the Write After Approval section as well. Martin > --- > MAINTAINERS | 5 - > 1 fil

Re: [PATCH] Fix PR88085

2021-04-21 Thread Richard Biener via Gcc-patches
On Tue, Apr 20, 2021 at 5:16 PM Andreas Krebbel via Gcc-patches wrote: > > With the current handling of decl alignments it is impossible to > reduce the alignment requirement as part of a variable declaration. > > This change has been proposed by Richard in the PR. It fixes the > align-1.c testcas

Re: [PATCH 4/4] Remove dead components from MAINTAINERS.

2021-04-21 Thread Martin Liška
On 4/21/21 10:44 AM, Martin Jambor wrote: > Hi, > > On Fri, Mar 12 2021, Martin Liska wrote: >> ChangeLog: >> >> * MAINTAINERS: Remove entries for removed >> components (HSA, BRIG, libhsail-rt). > > Unless he objects, I think you should add Pekka to the Write After > Approval section as

Re: GCC 11.1 Release Candidate available from gcc.gnu.org

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 20, 2021 at 10:12:33PM -0700, Thomas Rodgers wrote: > I think the attached patch (also in BZ) addresses the issue in > bits/semaphore_base.h, but I'm going to defer to Jonathan on why the macro > name is being transformed incorrectly in the first place. Jonathan's call, but for me it l

Re: [GCC 11] Fix PR ada/99360

2021-04-21 Thread Richard Biener via Gcc-patches
On Tue, Apr 20, 2021 at 10:37 PM Eric Botcazou wrote: > > Hi, > > I'd like to apply the attached stopgap fix for PR ada/99360 on the 11 branch, > as the real fix is really stage #1 material. This is a regression there. > > Bootstrapped/regtested on x86-64/Linux, OK for the 11 branch? Apply at yo

Re: [PATCH] Support LABEL_DECL in %qD directive.

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 09:56:23AM +0200, Martin Liška wrote: > The patch is a refactoring and simplification in tree-cfg.c. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > I verified that the error messages are correctly printed. > > Ready to be installed? > Thanks,

Re: GCC 11.1 Release Candidate available from gcc.gnu.org

2021-04-21 Thread Jonathan Wakely via Gcc-patches
On 21/04/21 10:56 +0200, Jakub Jelinek via Libstdc++ wrote: On Tue, Apr 20, 2021 at 10:12:33PM -0700, Thomas Rodgers wrote: I think the attached patch (also in BZ) addresses the issue in bits/semaphore_base.h, but I'm going to defer to Jonathan on why the macro name is being transformed incorrec

Re: [PATCH] Test simlified call in cgraph_node::analyze().

2021-04-21 Thread Martin Jambor
Hi, On Wed, Apr 21 2021, Martin Liška wrote: > As mentioned and explained in the PR, the calls are redundant. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? Yes. Thanks, Martin > Thanks, > Martin > > gcc/ChangeLog: > > PR ipa/98815

[PATCH] cprop: Fix -fcompare-debug bug in constprop_register [PR100148]

2021-04-21 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase shows different behavior between -g and -g0 in constprop_register, if a flags register setter is separated from a conditional jump using those flags with -g by a DEBUG_INSN. As it uses just NEXT_INSN, for -g it will look at the DEBUG_INSN which is not a conditional jump,

Re: [PATCH] cprop: Fix -fcompare-debug bug in constprop_register [PR100148]

2021-04-21 Thread Richard Biener
On Wed, 21 Apr 2021, Jakub Jelinek wrote: > Hi! > > The following testcase shows different behavior between -g and -g0 > in constprop_register, if a flags register setter is separated > from a conditional jump using those flags with -g by a DEBUG_INSN. > As it uses just NEXT_INSN, for -g it will

Re: [PATCH] Support LABEL_DECL in %qD directive.

2021-04-21 Thread Richard Biener via Gcc-patches
On Wed, Apr 21, 2021 at 10:49 AM Martin Liška wrote: > > Hey. > > The patch is a refactoring and simplification in tree-cfg.c. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > I verified that the error messages are correctly printed. > > Ready to be installed? OK. Rich

Re: [PATCH 1/4] Remove DEF_ENUM from stringop.def.

2021-04-21 Thread Uros Bizjak via Gcc-patches
On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: > > > gcc/ChangeLog: > > * config/i386/i386-options.c (DEF_ENUM): Remove it. > * config/i386/i386-opts.h (DEF_ENUM): Likewise. > * config/i386/stringop.def (DEF_ENUM): Likewise. OK. Thanks, Uros. > --- > gcc/config/i3

[PATCH] testsuite/100176 - fix struct-layout-1_generate.c compile

2021-04-21 Thread Richard Biener
With -Werror=return-type we run into compile fails complaining about missing return stmts. tested on x86_64-unknown-linux-gnu, pushed to trunk and branches. 2021-04-21 Richard Biener PR testsuite/100176 * g++.dg/compat/struct-layout-1_generate.c: Add missing return. *

Re: [PATCH 2/4] Generate PTA features from a def file.

2021-04-21 Thread Uros Bizjak via Gcc-patches
On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: > > > gcc/ChangeLog: > > * config/i386/i386.h (PTA_*): Remove. > (enum pta_flag): New. > (DEF_PTA): Generate PTA_* values from i386.def. > * wide-int-bitmask.h (WIDE_INT_BITMASK_FROM_NTH): New macro. > * c

Re: [PATCH] Support LABEL_DECL in %qD directive.

2021-04-21 Thread Martin Liška
On 4/21/21 11:04 AM, Jakub Jelinek wrote: > Wouldn't it be better to be consistent with tree-pretty-print.c on this > or perhaps just call dump_generic_node or whatever is used to dump > those e.g. for C? Yes, I'm going to install patch that does: + if (DECL_NAME (t)) + pp_cxx_tree_id

[PATCH] testsuite: Add -fchecking to dg-ice tests

2021-04-21 Thread Jakub Jelinek via Gcc-patches
Hi! In --enable-checking=release builds (which is the default on release branches), I'm getting various extra FAILs that don't appear in --enable-checking=yes builds. XPASS: g++.dg/cpp0x/constexpr-52830.C -std=c++14 (internal compiler error) FAIL: g++.dg/cpp0x/constexpr-52830.C -std=c++14 (test

Re: [PATCH 4/4] Remove TARGET_foo (ix86_tune == PROCESSOR_foo) macros.

2021-04-21 Thread Uros Bizjak via Gcc-patches
On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: > > > gcc/ChangeLog: > > * config/i386/i386-expand.c (decide_alignment): Use newly named > macro TARGET_CPU_P. > * config/i386/i386.c (ix86_decompose_address): Likewise. > (ix86_address_cost): Likewise. >

Re: [PATCH] Support LABEL_DECL in %qD directive.

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 12:52:42PM +0200, Martin Liška wrote: > On 4/21/21 11:04 AM, Jakub Jelinek wrote: > > Wouldn't it be better to be consistent with tree-pretty-print.c on this > > or perhaps just call dump_generic_node or whatever is used to dump > > those e.g. for C? > > Yes, I'm going to i

Re: [PATCH 3/4] Overhaul in isa_flags and handling it.

2021-04-21 Thread Uros Bizjak via Gcc-patches
On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: > > > gcc/ChangeLog: > > * config/i386/i386-options.c (TARGET_EXPLICIT_NO_SAHF_P): > Define. > (SET_TARGET_NO_SAHF): Likewise. > (TARGET_EXPLICIT_PREFETCH_SSE_P): Likewise. > (SET_TARGET_PREFETCH_SSE): Lik

Re: [PATCH] Support the new ("v0") mangling scheme in rust-demangle.

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 20, 2021 at 05:55:46PM +0200, Andreas Schwab wrote: > On Nov 13 2020, Nikhil Benesch via Gcc-patches wrote: > > > +static void > > +demangle_const_char (struct rust_demangler *rdm) > > +{ > > + size_t hex_len; > > + uint64_t value; > > + > > + hex_len = parse_hex_nibbles (rdm, &valu

Re: [PATCH] Support LABEL_DECL in %qD directive.

2021-04-21 Thread Martin Liška
On 4/21/21 12:56 PM, Jakub Jelinek wrote: > On Wed, Apr 21, 2021 at 12:52:42PM +0200, Martin Liška wrote: >> On 4/21/21 11:04 AM, Jakub Jelinek wrote: >>> Wouldn't it be better to be consistent with tree-pretty-print.c on this >>> or perhaps just call dump_generic_node or whatever is used to dump >

Re: [PATCH] Support LABEL_DECL in %qD directive.

2021-04-21 Thread Martin Liška
On 4/21/21 1:26 PM, Martin Liška wrote: > On 4/21/21 12:56 PM, Jakub Jelinek wrote: >> On Wed, Apr 21, 2021 at 12:52:42PM +0200, Martin Liška wrote: >>> On 4/21/21 11:04 AM, Jakub Jelinek wrote: Wouldn't it be better to be consistent with tree-pretty-print.c on this or perhaps just call d

Re: GCC 11.1 Release Candidate available from gcc.gnu.org

2021-04-21 Thread Jonathan Wakely via Gcc-patches
On 20/04/21 22:12 -0700, Thomas Rodgers wrote: @@ -86,6 +88,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } +_GLIBCXX_ALWAYS_INLINE bool +_M_try_acquire() noexcept +{ + for (;;) + { + auto __err = sem_trywait(&_M_semaphore); + if (__err && (errno ==

Re: [PATCH] aarch64: Avoid duplicating bti j insns for jump tables [PR99988]

2021-04-21 Thread Alex Coplan via Gcc-patches
Hi Richard, On 15/04/2021 18:45, Richard Sandiford wrote: > Looks good in general, but like you say, it's GCC 12 material. Thanks for the review. The attached patch addresses these comments and bootstraps/regtests OK on aarch64-linux-gnu. OK for trunk? Thanks, Alex > > Alex Coplan writes: > >

[PATCH] LTO: fallback to -flto=N if -flto=jobserver does not work.

2021-04-21 Thread Martin Liška
When -flto=jobserver is used and we cannot detect job server, then we can still fallbackto -flto=N mode. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * lto-wrapper.c (run_gcc): When -flto=jobserver is used, b

Re: [RFC] Run pass_sink_code once more after ivopts/fre

2021-04-21 Thread Richard Biener
On Tue, 20 Apr 2021, Xionghu Luo wrote: > > > On 2021/4/15 19:34, Richard Biener wrote: > > On Thu, 15 Apr 2021, Xionghu Luo wrote: > > > >> Thanks, > >> > >> On 2021/4/14 14:41, Richard Biener wrote: > "#538,#235,#234,#233" will all be sunk from bb 35 to bb 37 by rtl-sink, > but it m

[committed] libstdc++: Fix whitespace in license boilerplate

2021-04-21 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/latch: Replace tab characters in license text. * include/std/semaphore: Likewise. Tested x86_64-linux. Committed to trunk. OK for gcc-11 too? commit 88202c883c07da1c03dbb1ad440f1b70189c4399 Author: Jonathan Wakely Date: Wed Apr 21 12:59:

Re: [committed] libstdc++: Fix whitespace in license boilerplate

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 01:01:44PM +0100, Jonathan Wakely via Gcc-patches wrote: > libstdc++-v3/ChangeLog: > > * include/std/latch: Replace tab characters in license text. > * include/std/semaphore: Likewise. > > Tested x86_64-linux. Committed to trunk. > > OK for gcc-11 too? Yes.

Re: [PATCH] aarch64: Avoid duplicating bti j insns for jump tables [PR99988]

2021-04-21 Thread Richard Sandiford via Gcc-patches
Alex Coplan writes: > Hi Richard, > > On 15/04/2021 18:45, Richard Sandiford wrote: >> Looks good in general, but like you say, it's GCC 12 material. > > Thanks for the review. The attached patch addresses these comments and > bootstraps/regtests OK on aarch64-linux-gnu. OK for trunk? OK, thanks.

Re: GCC 11.1 Release Candidate available from gcc.gnu.org

2021-04-21 Thread Jonathan Wakely via Gcc-patches
On 21/04/21 12:38 +0100, Jonathan Wakely wrote: On 20/04/21 22:12 -0700, Thomas Rodgers wrote: @@ -86,6 +88,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } +_GLIBCXX_ALWAYS_INLINE bool +_M_try_acquire() noexcept +{ + for (;;) + { + auto __err = sem_trywait(&

Re: [PATCH][AArch64] Leveraging the use of STP instruction for vec_duplicate

2021-04-21 Thread Richard Sandiford via Gcc-patches
Victor Do Nascimento via Gcc-patches writes: > The backend pattern for storing a pair of identical values in 32 and 64-bit > modes with the machine instruction STP was missing, and multiple instructions > were needed to reproduce this behavior as a result of failed RTL pattern > match in combin

Re: [PATCH] testsuite: Add -fchecking to dg-ice tests

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 4:52 AM, Jakub Jelinek via Gcc-patches wrote: Hi! In --enable-checking=release builds (which is the default on release branches), I'm getting various extra FAILs that don't appear in --enable-checking=yes builds. XPASS: g++.dg/cpp0x/constexpr-52830.C -std=c++14 (internal compile

[PATCH] Avoid -latomic for amdgcn offloading

2021-04-21 Thread Richard Biener
libatomic isn't built for amdgcn but reduction-16.c adds it via -foffload=-latomic when offloading for nvptx is enabled. The following avoids linker errors when offloading to amdgcn is enabled as well. Tested on x86_64-unknown-linux-gnu, OK for trunk and GCC 11 branch? Thanks. Richard. 2021-04-2

Re: [PATCH] Fix clang warnings.

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 2:18 AM, Martin Liška wrote: Hello. The patch silents Clang warnings: 1) if (TARGET_MACHO ) ... #if TARGET_MACHO can be replaced with #if TARGET_MACHO 2) add_AT_vms_delta is used only if VMS_DEBUGGING_INFO is defined 3) tree.c:13454:16: warning: result of comparison of constan

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 2:08 AM, Martin Liška wrote: Having c++11, we can now use a handy function called std::thread::hardware_concurrency. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * lto-wrapper.c (cpuset_popc

Re: [PATCH 2/4] Generate PTA features from a def file.

2021-04-21 Thread Richard Biener via Gcc-patches
On Wed, Apr 21, 2021 at 2:09 PM Uros Bizjak via Gcc-patches wrote: > > On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: > > > > > > gcc/ChangeLog: > > > > * config/i386/i386.h (PTA_*): Remove. > > (enum pta_flag): New. > > (DEF_PTA): Generate PTA_* values from i386.def

Re: [PATCH] testsuite: Add -fchecking to dg-ice tests

2021-04-21 Thread Richard Biener via Gcc-patches
On Wed, Apr 21, 2021 at 2:10 PM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > In --enable-checking=release builds (which is the default on release > branches), I'm getting various extra FAILs that don't appear in > --enable-checking=yes builds. > > XPASS: g++.dg/cpp0x/constexpr-52830.C -std=c+

Re: [PATCH 3/4] Overhaul in isa_flags and handling it.

2021-04-21 Thread H.J. Lu via Gcc-patches
On Wed, Apr 21, 2021 at 3:58 AM Uros Bizjak wrote: > > On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: > > > > > > gcc/ChangeLog: > > > > * config/i386/i386-options.c (TARGET_EXPLICIT_NO_SAHF_P): > > Define. > > (SET_TARGET_NO_SAHF): Likewise. > > (TARGET_EXPL

[PATCH v5 0/3] x86: Add general_regs_only function attribute

2021-04-21 Thread H.J. Lu via Gcc-patches
I realized that commit 87c753ac241f25d222d46ba1ac66ceba89d6a200 Author: H.J. Lu Date: Fri Aug 21 09:42:49 2020 -0700 x86: Add target("general-regs-only") function attribute is incomplete since it is impossible to call integer intrinsics from a function with general-regs-only target attrib

[PATCH v5 3/3] x86: Add general_regs_only attribute to MWAIT intrinsics

2021-04-21 Thread H.J. Lu via Gcc-patches
Add general_regs_only attribute to MWAIT intrinsics for callers with general-regs-only target attribute. gcc/ PR target/9974 * config/i386/mwaitintrin.h (_mm_monitor): Add general_regs_only attribute. (_mm_mwait): Likewise. gcc/testsuite/ PR target/9974

[PATCH v5 1/3] x86: Move OPTION_MASK_* to i386-common.h

2021-04-21 Thread H.J. Lu via Gcc-patches
Move OPTION_MASK_* to i386-common.h so that they can be used in x86 backend. * common/config/i386/i386-common.c (OPTION_MASK_*): Move to ... * common/config/i386/i386-common.h: Here. New file. * config/i386/i386.h: Include common/config/i386/i386-common.h. --- gcc/common/

[PATCH v5 2/3] x86: Add general_regs_only function attribute

2021-04-21 Thread H.J. Lu via Gcc-patches
commit 87c753ac241f25d222d46ba1ac66ceba89d6a200 Author: H.J. Lu Date: Fri Aug 21 09:42:49 2020 -0700 x86: Add target("general-regs-only") function attribute is incomplete since it is impossible to call integer intrinsics from a function with general-regs-only target attribute. 1. Add gene

Re: [PATCH v4 2/2] x86: Add general_regs_only function attribute

2021-04-21 Thread H.J. Lu via Gcc-patches
On Wed, Apr 21, 2021 at 12:30 AM Uros Bizjak wrote: > > On Thu, Apr 15, 2021 at 12:39 AM H.J. Lu wrote: > > > > commit 87c753ac241f25d222d46ba1ac66ceba89d6a200 > > Author: H.J. Lu > > Date: Fri Aug 21 09:42:49 2020 -0700 > > > > x86: Add target("general-regs-only") function attribute > > >

Re: [PATCH 2/4] Generate PTA features from a def file.

2021-04-21 Thread Martin Liška
On 4/21/21 3:03 PM, Richard Biener wrote: > On Wed, Apr 21, 2021 at 2:09 PM Uros Bizjak via Gcc-patches > wrote: >> >> On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: >>> >>> >>> gcc/ChangeLog: >>> >>> * config/i386/i386.h (PTA_*): Remove. >>> (enum pta_flag): New. >>>

Re: GCC 11.1 Release Candidate available from gcc.gnu.org

2021-04-21 Thread Thomas Rodgers
On 2021-04-21 05:12, Jonathan Wakely wrote: On 21/04/21 12:38 +0100, Jonathan Wakely wrote: On 20/04/21 22:12 -0700, Thomas Rodgers wrote: @@ -86,6 +88,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } +_GLIBCXX_ALWAYS_INLINE bool +_M_try_acquire() noexcept +{ + for (;;) +{ +

Re: [PATCH 3/4] Overhaul in isa_flags and handling it.

2021-04-21 Thread Martin Liška
On 4/21/21 3:34 PM, H.J. Lu wrote: > On Wed, Apr 21, 2021 at 3:58 AM Uros Bizjak wrote: >> >> On Wed, Apr 21, 2021 at 10:28 AM Martin Liska wrote: >>> >>> >>> gcc/ChangeLog: >>> >>> * config/i386/i386-options.c (TARGET_EXPLICIT_NO_SAHF_P): >>> Define. >>> (SET_TARGET_NO_SA

Re: GCC 11.1 Release Candidate available from gcc.gnu.org

2021-04-21 Thread David Edelsohn via Gcc-patches
Hi, Jonathan Thanks for the further investigation. I definitely encountered the missing _M_try_acquire in __platform_semaphore. Thanks, David On Wed, Apr 21, 2021 at 8:12 AM Jonathan Wakely wrote: > > On 21/04/21 12:38 +0100, Jonathan Wakely wrote: > >On 20/04/21 22:12 -0700, Thomas Rodgers wr

Re: GCC 11.1 Release Candidate available from gcc.gnu.org

2021-04-21 Thread Jonathan Wakely via Gcc-patches
On 21/04/21 13:12 +0100, Jonathan Wakely wrote: On 21/04/21 12:38 +0100, Jonathan Wakely wrote: On 20/04/21 22:12 -0700, Thomas Rodgers wrote: @@ -86,6 +88,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } +_GLIBCXX_ALWAYS_INLINE bool +_M_try_acquire() noexcept +{ + for (;;

[committed] aarch64: Always use .init/.fini_array for GNU/Linux

2021-04-21 Thread Richard Sandiford via Gcc-patches
I was wondering why the (now fixed) c-c++-common/attr-retain-[78].c failures were showing up in the native results for aarch64-linux-gnu but not in the posted cross results. It turns out that .init/ .fini_array support is disabled by default for cross builds, which in turn stops those tests from r

Re: [committed] aarch64: Always use .init/.fini_array for GNU/Linux

2021-04-21 Thread Andreas Schwab
On Apr 21 2021, Richard Sandiford via Gcc-patches wrote: > However, AArch64 postdates glibc and binutils support for > .init/fini_array by some distance, so it's safe to hard-code the > result to "yes" for cross compilers. Should there be an automatism for any other new architecture added? Andre

[PATCH][pushed] Fix clang warning (-Wstring-plus-int)

2021-04-21 Thread Martin Liška
This fixes: lto-plugin.c:642:7: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] Pushed as obvious, thanks, Martin lto-plugin/ChangeLog: * lto-plugin.c (exec_lto_wrapper): Make a temp variable. --- lto-plugin/lto-plugin.c | 6 +++--- 1 file changed,

Re: [PATCH] testsuite: Add -fchecking to dg-ice tests

2021-04-21 Thread Marek Polacek via Gcc-patches
On Wed, Apr 21, 2021 at 12:52:39PM +0200, Jakub Jelinek wrote: > Hi! > > In --enable-checking=release builds (which is the default on release > branches), I'm getting various extra FAILs that don't appear in > --enable-checking=yes builds. > > XPASS: g++.dg/cpp0x/constexpr-52830.C -std=c++14 (in

Re: [PATCH] Avoid -latomic for amdgcn offloading

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 6:56 AM, Richard Biener wrote: libatomic isn't built for amdgcn but reduction-16.c adds it via -foffload=-latomic when offloading for nvptx is enabled. The following avoids linker errors when offloading to amdgcn is enabled as well. Tested on x86_64-unknown-linux-gnu, OK for trunk

Re: [PATCH] LTO: fallback to -flto=N if -flto=jobserver does not work.

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 5:50 AM, Martin Liška wrote: When -flto=jobserver is used and we cannot detect job server, then we can still fallbackto -flto=N mode. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: * lto-wrappe

Re: [PATCH] Call toplev::finalize in CHECKING_P mode.

2021-04-21 Thread Jeff Law via Gcc-patches
On 4/21/2021 1:28 AM, Martin Liška wrote: Hi. The sanity check calls toplev.finalize () in order to simulate JIT mode in normal compilation mode. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: PR jit/98615

[PATCH][GCC 10] aarch64: Fix SVE ACLE builtins with LTO [PR99216]

2021-04-21 Thread Alex Coplan via Gcc-patches
Hi, Here is a backport of my fix for PR99216. The only change w.r.t the original patch is a bump of lto-streamer.h:LTO_minor_version. Bootstrapped and regtested on aarch64-linux-gnu, no issues. OK for GCC 10 branch? Thanks, Alex --- As discussed in the PR, we currently have two different numb

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread David Edelsohn via Gcc-patches
This patch broke bootstrap on AIX. std::thread is not provided in all instances. GCC is not compiled multi-threaded by default. error: `std::thread' has not been declared. Thanks, David

Re: [PATCH] libstdc++: Install libstdc++*-gdb.py more robustly [PR 99453]

2021-04-21 Thread Jonathan Wakely via Gcc-patches
On 03/04/21 14:56 -0400, Philippe Blain wrote: In order for GDB to auto-load the pretty printers, they must be installed as "libstdc++.$ext-gdb.py", where 'libstdc++.$ext' is the name of the object file that is loaded by GDB [1], i.e. the libstdc++ shared library. The approach taken in libstdc++

Patch freeze request

2021-04-21 Thread David Edelsohn via Gcc-patches
I am requesting a freeze on non-bug fix patches to trunk. In the GCC 12 announcement, Jakub stated: "The trunk has branched for the GCC 11 release and is now open again for general development, stage 1. Please consider not disrupting it too much during the RC phase of GCC 11 so it is possible to

Re: [PATCH][libgomp, nvptx] Fix hang in gomp_team_barrier_wait_end

2021-04-21 Thread Tom de Vries
On 4/20/21 6:11 PM, Alexander Monakov wrote: > Hello Tom, > > Thank you for the investigation and the detailed writeup. It was difficult for > me to infer the internal API contracts here (and still is), Hi Alexander, thanks for the review. Yep, same here. > sorry about the > mistake. > > Most

Re: [PATCH] Use STATIC_ASSERT for OVL_OP_MAX.

2021-04-21 Thread Martin Sebor via Gcc-patches
On 4/21/21 2:15 AM, Martin Liška wrote: Hello. It's addressing the following Clang warning: cp/lex.c:170:45: warning: result of comparison of constant 64 with expression of type 'enum ovl_op_code' is always true [-Wtautological-constant-out-of-range-compare] Patch can bootstrap on x86_64-linu

Re: [PATCH v4 2/2] x86: Add general_regs_only function attribute

2021-04-21 Thread Martin Sebor via Gcc-patches
On 4/21/21 1:30 AM, Uros Bizjak wrote: On Thu, Apr 15, 2021 at 12:39 AM H.J. Lu wrote: commit 87c753ac241f25d222d46ba1ac66ceba89d6a200 Author: H.J. Lu Date: Fri Aug 21 09:42:49 2020 -0700 x86: Add target("general-regs-only") function attribute is incomplete since it is impossible to

Re: [PATCH][libgomp, nvptx] Fix hang in gomp_team_barrier_wait_end

2021-04-21 Thread Alexander Monakov via Gcc-patches
On Wed, 21 Apr 2021, Tom de Vries wrote: > > I don't think implementing futex_wait is possible on nvptx. > > > > Well, I gave it a try, attached below. Can you explain why you think > it's not possible, or pinpoint a problem in the implementation? Responding only to this for now. When I said f

[Patch] libgomp/testsuite: Fix checks for dg-excess-errors

2021-04-21 Thread Tobias Burnus
This was brought up by Richard when testing libgomp with the GCC 11 distribution compiler, which has both nvptx and gcn enabled – but no offloading device was available. This lead to fails for: * testsuite/libgomp.c-c++-common/function-not-offloaded.c: → function (on purpose) not marked for off

Re: [PATCH v4 2/2] x86: Add general_regs_only function attribute

2021-04-21 Thread Martin Sebor via Gcc-patches
On 4/14/21 4:39 PM, H.J. Lu wrote: commit 87c753ac241f25d222d46ba1ac66ceba89d6a200 Author: H.J. Lu Date: Fri Aug 21 09:42:49 2020 -0700 x86: Add target("general-regs-only") function attribute is incomplete since it is impossible to call integer intrinsics from a function with general-re

[PATCH] [libstdc++] Fix test timeout in stop_calback/destroy.cc

2021-04-21 Thread Thomas Rodgers
From: Thomas Rodgers A change was made to __atomic_semaphore::_S_do_try_acquire() to (ideally) let the compare_exchange reload the value of __old rather than always reloading it twice. This causes _M_acquire to spin indefinitely if the value of __old is already 0. libstdc++/ChangeLog: *

Re: [PATCH v2] c++: Prevent bogus -Wtype-limits warning with NTTP [PR100161]

2021-04-21 Thread Marek Polacek via Gcc-patches
On Tue, Apr 20, 2021 at 10:40:52PM -0400, Jason Merrill wrote: > On 4/20/21 8:42 PM, Marek Polacek wrote: > > Recently, we made sure that we never call value_dependent_expression_p > > on an expression that isn't potential_constant_expression. That caused > > this bogus warning with a non-type tem

Re: [Patch] libgomp/testsuite: Fix checks for dg-excess-errors

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 07:04:17PM +0200, Tobias Burnus wrote: > OK for mainline and GCC 11? Ok for 12 and 11.2 (i.e. after 11.1 GA). > libgomp/testsuite: Fix checks for dg-excess-errors > > For the tests modified below, the effective target line has to be effective > when compiling for an offlo

[r12-20 Regression] FAIL: libgomp.fortran/depobj-1.f90 -O (test for excess errors) on Linux/x86_64

2021-04-21 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, a61c4964cd71446232d62ec9b10a7d45b440dd9f is the first bad commit commit a61c4964cd71446232d62ec9b10a7d45b440dd9f Author: Tobias Burnus Date: Wed Apr 21 10:58:29 2021 +0200 Fortran/OpenMP: Add 'omp depobj' and 'depend(mutexinoutset:' caused FAIL: libgomp.fortran/depobj-1.

Re: [PATCH] Use std::thread::hardware_concurrency in lto-wrapper.c.

2021-04-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Apr 21, 2021 at 11:50:02AM -0400, David Edelsohn via Gcc-patches wrote: > This patch broke bootstrap on AIX. > > std::thread is not provided in all instances. GCC is not compiled > multi-threaded by default. > > error: `std::thread' has not been declared. In addition to that, I'm not re

  1   2   >