Re: [PATCH v2] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Richard Biener via Gcc-patches
On Thu, 18 Nov 2021, Giuliano Belinassi wrote: > The `configure` scripts generated with autoconf often tests compiler > features by setting output to `/dev/null`, which then sets the dump > folder as being /dev/* and the compilation halts with an error because > GCC cannot create files in /dev/. T

[PATCH] darwin, d: Support outfile substitution for liphobos

2021-11-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a stage2 bootstrap failure in the D front-end on darwin due to libgphobos being dynamically linked despite -static-libphobos being on the command line. In the gdc driver, this takes the previous fix for the Darwin D bootstrap, and extends it to the -static-libphobos option as

[PATCH] tree-optimization/102436 - restore loop store motion

2021-11-19 Thread Richard Biener via Gcc-patches
This restores a case of conditional store motion we fail to handle after the rewrite. We can recognize the special case of all stores in a loop happening in a single conditionally executed block which ensures stores are not re-ordered by executing them in different loop iterations. Separating out

[PATCH]middle-end: Handle FMA_CONJ correctly after SLP layout update.

2021-11-19 Thread Tamar Christina via Gcc-patches
Hi All, Apologies, I got dinged by the i386 regressions bot for a test I didn't have in my tree at the time I made the previous patch. The bot was telling me that FMA stopped working after I strengthened the FMA check in the previous patch. The reason is that the check is slightly early. The fi

[PATCH][committed][libstdc++] Fix ctype changed after newlib update.

2021-11-19 Thread Tamar Christina via Gcc-patches
Hi All, Newlib changed ctype.h recently[1] by moving the short labels from ctype.h intro the private namespace in ctype_.h. This broke embedded builds due to them no longer being found. Instead they now expose the long names to match glibc. This patch now uses the short or long names depending

RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-11-19 Thread Tamar Christina via Gcc-patches
Ping > -Original Message- > From: Tamar Christina > Sent: Friday, November 12, 2021 7:31 AM > To: Jakub Jelinek > Cc: Jonathan Wakely ; Richard Biener > ; gcc-patches@gcc.gnu.org; nd > Subject: RE: [PATCH] middle-end: fix de-optimizations with bitclear patterns > on signed values > > >

Re: [PATCH]middle-end: Handle FMA_CONJ correctly after SLP layout update.

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, 19 Nov 2021, Tamar Christina wrote: > Hi All, > > Apologies, I got dinged by the i386 regressions bot for a test I didn't have > in > my tree at the time I made the previous patch. The bot was telling me that > FMA > stopped working after I strengthened the FMA check in the previous pa

Re: [PATCH] c++/103326 - fix ICE in tsubst with VECTOR_CST

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 19, 2021 at 08:57:01AM +0100, Richard Biener wrote: > This adds missing handling of VECTOR_CST. > > Bootstrap and regtest pending on x86_64-unknown-linux-gnu, OK? > > Thanks, > Richard. > > 2021-11-19 Richard Biener > > PR c++/103326 > * pt.c (tsubst_copy): Handle VEC

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-11-19 Thread Alexandre Oliva via Gcc-patches
On Oct 18, 2021, Richard Biener via Gcc-patches wrote: > On Mon, Oct 18, 2021 at 10:54 AM Martin Liška wrote: >> >> The macros correspond 1:1 to an option flags and make it harder >> to find all usages of the flags. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >

Re: [PATCH 2/5] gimple-match: Add a gimple_extract_op function

2021-11-19 Thread Richard Biener via Gcc-patches
On Thu, Nov 18, 2021 at 8:01 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Tue, Nov 16, 2021 at 4:51 PM Richard Sandiford > > wrote: > >> > >> Richard Biener writes: > >> > On Wed, Nov 10, 2021 at 1:46 PM Richard Sandiford via Gcc-patches > >> > wrote: > >> >> > >> >> code_help

Re: [PATCH] darwin, d: Support outfile substitution for liphobos

2021-11-19 Thread Iain Sandoe via Gcc-patches
Hi Iain > On 19 Nov 2021, at 08:32, Iain Buclaw wrote: > This patch fixes a stage2 bootstrap failure in the D front-end on > darwin due to libgphobos being dynamically linked despite > -static-libphobos being on the command line. > > In the gdc driver, this takes the previous fix for the Darwin

Re: [PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-19 Thread Richard Biener via Gcc-patches
On Thu, Nov 18, 2021 at 8:30 PM Andrew MacLeod via Gcc-patches wrote: > > At issue here is the dynamic approach we currently use for outgoing edge > calculations. It isn't normally a problem, but once you get a very > large number of possible outgoing values (ie very long unrolled blocks) > with

Re: [PATCH] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Alexandre Oliva via Gcc-patches
On Nov 18, 2021, Richard Biener wrote: > IMHO a more reasonable thing to do would be to not treat > -o /dev/null as a source for -dumpdir and friends. Alex? +1 I think we already have some special-casing for /dev/null somewhere. > You did the last re-org, where'd we put such special casing?

Re: [PATCH] Fix tree-optimization/103314 : Limit folding of (type) X op CST where type is a nop convert to gimple

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, Nov 19, 2021 at 7:34 AM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > There is some re-association code in fold_binary which conflicts with > this optimization due keeping around some "constants" which are not > INTEGER_CST (1 << -1) so we end up in an infinite loop becaus

Re: [PATCH] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, 19 Nov 2021, Alexandre Oliva wrote: > On Nov 18, 2021, Richard Biener wrote: > > > IMHO a more reasonable thing to do would be to not treat > > -o /dev/null as a source for -dumpdir and friends. Alex? > > +1 > > I think we already have some special-casing for /dev/null somewhere. Gre

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, Nov 19, 2021 at 9:59 AM Alexandre Oliva wrote: > > On Oct 18, 2021, Richard Biener via Gcc-patches > wrote: > > > On Mon, Oct 18, 2021 at 10:54 AM Martin Liška wrote: > >> > >> The macros correspond 1:1 to an option flags and make it harder > >> to find all usages of the flags. > >> > >

[PATCH] fortran, debug: Fix up DW_AT_rank [PR103315]

2021-11-19 Thread Jakub Jelinek via Gcc-patches
Hi! For DW_AT_rank we were emitting .uleb128 0x4# DW_AT_rank .byte 0x97# DW_OP_push_object_address .byte 0x23# DW_OP_plus_uconst .uleb128 0x1c .byte 0x6 # DW_OP_deref on 64-bit and .uleb128 0x4# DW_AT_rank .byte 0x

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 19, 2021 at 10:38:41AM +0100, Richard Biener via Gcc-patches wrote: > > Yup. Though there is a 1:1 equivalence right now, conceptually other > > kinds of debug marker stmts, and of debug bind stmts, could be > > introduced, and then the macros would be adjusted to encompass the new > >

[PATCH] IBM Z: Fix load-and-test peephole2 condition

2021-11-19 Thread Stefan Schulze Frielinghaus via Gcc-patches
.md (define_peephole2): Variable insn points to the first matched insn. Use peep2_next_insn(1) to refer to the second matched insn. gcc/testsuite/ChangeLog: * gcc.target/s390/2029.c: New test. --- gcc/config/s390/s390.md | 2 +- gcc/testsuite

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-19 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 2:53 PM Martin Liška wrote: > > On 11/11/21 08:15, Richard Biener wrote: > > If you look at simplify_using_entry_checks then this is really really > > simple, > > so I'd try to abstract this, recording sth like a unswitch_predicate where > > we store the condition we unswi

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-19 Thread Matthias Kretz
On Thursday, 18 November 2021 20:24:36 CET Jason Merrill wrote: > On 11/17/21 17:51, Matthias Kretz wrote: > > Right, I had already added a `gcc_assert (!TMPL_ARGS_HAVE_MULTIPLE_LEVELS > > (args))` to my new set_non_default_template_args_count function and found > > cp/ constraint.cc:2896 (get_mapp

Re: [PATCH] darwin, d: Support outfile substitution for liphobos

2021-11-19 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 19, 2021 10:21 am: > Hi Iain > >> On 19 Nov 2021, at 08:32, Iain Buclaw wrote: > >> This patch fixes a stage2 bootstrap failure in the D front-end on >> darwin due to libgphobos being dynamically linked despite >> -static-libphobos being on the com

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-19 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 3:40 PM Martin Liška wrote: > > On 11/11/21 08:15, Richard Biener wrote: > > So I'd try to do no functional change first, improving the costing and > > setting up the transform to simply pick up the stmts to "fold" as discovered > > during analysis (as I hinted you possibly

[PATCH] c++: Avoid adding implicit attributes during apply_late_template_attributes [PR101180]

2021-11-19 Thread Jakub Jelinek via Gcc-patches
Hi! decl_attributes and its caller cplus_decl_attributes sometimes add implicit attributes, e.g. optimize attribute if #pragma GCC optimize is active, target attribute if #pragma GCC target is active, or e.g. omp declare target attribute if in between #pragma omp declare target and #pragma omp end

Re: [PATCH 4/5] vect: Make reduction code handle calls

2021-11-19 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 5:24 PM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Wed, Nov 10, 2021 at 1:48 PM Richard Sandiford via Gcc-patches > > wrote: > >> > >> This patch extends the reduction code to handle calls. So far > >> it's a structural change only; a late

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-19 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 7:05 PM Richard Sandiford wrote: > > Richard Biener via Gcc-patches writes: > > On Mon, Nov 15, 2021 at 3:00 PM Richard Sandiford > > wrote: > >> > >> Richard Biener via Gcc-patches writes: > >> > On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches > >> >

Re: [PATCH] Fix tree-optimization/101941: IPA splitting out function with error attribute

2021-11-19 Thread Richard Biener via Gcc-patches
On Wed, Nov 17, 2021 at 7:25 AM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > The Linux kernel started to fail compile when the jump threader was improved > (r12-2591-g2e96b5f14e4025691). This failure was due to the IPA splitting code > decided now to split off the basic block whi

Re: [PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-19 Thread Aldy Hernandez via Gcc-patches
On 11/18/21 8:28 PM, Andrew MacLeod wrote: @@ -376,6 +366,14 @@ range_def_chain::get_def_chain (tree name) return NULL; } + // Terminate the def chains if we see too many cascading stmts. + if (m_logical_depth == param_ranger_logical_depth) +return NULL; + + // Increase

Re: [PATCH v1 1/8] bswap: synthesize HImode bswap from SImode or DImode

2021-11-19 Thread Richard Biener via Gcc-patches
On Thu, Nov 11, 2021 at 3:13 PM Philipp Tomsich wrote: > > The RISC-V Zbb extension adds an XLEN (i.e. SImode for rv32, DImode > for rv64) bswap instruction (rev8). While, with the current master, > SImode is synthesized correctly from DImode, HImode is not. > > This change adds an appropriate ex

Re: [PATCH v1 1/8] bswap: synthesize HImode bswap from SImode or DImode

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, Nov 19, 2021 at 11:20 AM Richard Biener wrote: > > On Thu, Nov 11, 2021 at 3:13 PM Philipp Tomsich > wrote: > > > > The RISC-V Zbb extension adds an XLEN (i.e. SImode for rv32, DImode > > for rv64) bswap instruction (rev8). While, with the current master, > > SImode is synthesized correc

Re: [PATCH][_GLIBCXX_DEBUG] Limit performance impact in __erase_nodes_if

2021-11-19 Thread Jonathan Wakely via Gcc-patches
On Thu, 18 Nov 2021 at 22:05, François Dumont via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Hi > > Here is a proposal to limit performance impact of _GLIBCXX_DEBUG > mode on __erase_nodes_if. > > As you can see I am adding erase overloads on the Debug container > to accept base iterato

Re: [PATCH] middle-end: fix de-optimizations with bitclear patterns on signed values

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Fri, Nov 12, 2021 at 07:30:35AM +, Tamar Christina via Gcc-patches wrote: > @@ -2099,7 +2124,7 @@ spaceship_replacement (basic_block cond_bb, basic_block > middle_bb, >|| !tree_fits_shwi_p (rhs) >|| !IN_RANGE (tree_to_shwi (rhs), -1, 1)) > return false; > - if (orig_us

Re: [PATCH][V4] rs6000: Remove unnecessary option manipulation.

2021-11-19 Thread Martin Liška
On 11/18/21 19:59, Segher Boessenkool wrote: Please resend, without line wrapping (format=flawed). Done in the original [v4] email, see here: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584267.html Martin

Re: [PATCH] PR tree-optimization/96779 Adding a missing pattern to match.pd

2021-11-19 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 11:51 PM Navid Rahimi via Gcc-patches wrote: > > Hi GCC community, > > This patch will add the missed pattern described in bug 102232 [1] to the > match.pd. > > Tree-optimization/96779: Adding new optimization to match.pd: > > * match.pd (-x == x) -> (x == 0):

Re: [PATCH][V4] rs6000: Remove unnecessary option manipulation.

2021-11-19 Thread Segher Boessenkool
On Fri, Nov 19, 2021 at 12:32:09PM +0100, Martin Liška wrote: > On 11/18/21 19:59, Segher Boessenkool wrote: > >Please resend, without line wrapping (format=flawed). > > Done in the original [v4] email, see here: > https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584267.html Which you didn

Re: libgo patch committed: redirect mkrsysinfo.sh grep output to /dev/null

2021-11-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 28 Oct 2016 10:55:18 -0700 Ian Lance Taylor wrote: > This patch to libgo redirects the output of a grep command in > mkrsysinfo.sh to /dev/null. The output otherwise appears in the grep -q exists since at least SUSv2, fwiw. thanks, > middle of a build log, where it is harmless but conf

Re: [PATCH] Fix tree-optimization/101941: IPA splitting out function with error attribute

2021-11-19 Thread Andrew Pinski via Gcc-patches
On Fri, Nov 19, 2021 at 2:16 AM Richard Biener via Gcc-patches wrote: > > On Wed, Nov 17, 2021 at 7:25 AM apinski--- via Gcc-patches > wrote: > > > > From: Andrew Pinski > > > > The Linux kernel started to fail compile when the jump threader was improved > > (r12-2591-g2e96b5f14e4025691). This f

Re: [PATCH] options: Make -Ofast switch off -fsemantic-interposition

2021-11-19 Thread Jan Hubicka via Gcc-patches
> > Hi, > > > > On Fri, Nov 12 2021, Martin Jambor wrote: > > > Hi, > > > > > > using -fno-semantic-interposition has been reported by various people > > > to bring about considerable speed up at the cost of strict compliance > > > to the ELF symbol interposition rules See for example > > > https

Re: [PATCH] IBM Z: Fix load-and-test peephole2 condition

2021-11-19 Thread Andreas Krebbel via Gcc-patches
On 11/19/21 10:45, Stefan Schulze Frielinghaus wrote: ... > diff --git a/gcc/testsuite/gcc.target/s390/20211119.c > b/gcc/testsuite/gcc.target/s390/2029.c > new file mode 100644 > index 000..1a6df4f4b89 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/s390/2029

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-19 Thread Matthias Kretz
On Friday, 19 November 2021 10:53:27 CET Matthias Kretz wrote: > > >> Ah, you're trying to omit defaulted parms from the ? I'm not > > >> sure > > >> that's necessary, leaving them out of the [with ...] list should be > > >> sufficient. > > > > > > I was thinking about all the std::allocator defau

Remove gimple_static_chain test disabling modref in ref_maybe_used_in_call_p

2021-11-19 Thread Jan Hubicka via Gcc-patches
Hi, this patch removes test for function not having call chain guarding modref use in ref_maybe_used_by_call_p_1. It never made sense since modref treats call chain accesses explicitly. It was however copied from earlier check for ECF_CONST (which seems dubious too, but I would like to discuss it

Re: [PATCH][V4] rs6000: Remove unnecessary option manipulation.

2021-11-19 Thread Martin Liška
On 11/19/21 12:43, Segher Boessenkool wrote: On Fri, Nov 19, 2021 at 12:32:09PM +0100, Martin Liška wrote: On 11/18/21 19:59, Segher Boessenkool wrote: Please resend, without line wrapping (format=flawed). Done in the original [v4] email, see here: https://gcc.gnu.org/pipermail/gcc-patches/20

Re: [PATCH] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 19 Nov 2021 10:35:26 +0100 (CET) Richard Biener via Gcc-patches wrote: > On Fri, 19 Nov 2021, Alexandre Oliva wrote: > > > On Nov 18, 2021, Richard Biener wrote: > > > > > IMHO a more reasonable thing to do would be to not treat > > > -o /dev/null as a source for -dumpdir and friends

Re: [PATCH][V4] rs6000: Remove unnecessary option manipulation.

2021-11-19 Thread Martin Liška
On 11/19/21 13:25, Martin Liška wrote: Fine. I've just done that. All right, so I can't send an email from my local machine and git imap-send does not work as it goes through Thunderbird. So my last attempt is attaching the email so that you can add the .eml file. Martin--- Begin Message ---

Re: [PATCH][V4] rs6000: Remove unnecessary option manipulation.

2021-11-19 Thread Segher Boessenkool
On Fri, Nov 19, 2021 at 01:31:21PM +0100, Martin Liška wrote: > All right, so I can't send an email from my local machine and git imap-send > does not work as it goes through Thunderbird. Hrm, painful (for you). You should figure out how you can do the basics of the patch-based workflow that we a

Re: Remove gimple_static_chain test disabling modref in ref_maybe_used_in_call_p

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, 19 Nov 2021, Jan Hubicka wrote: > Hi, > this patch removes test for function not having call chain guarding > modref use in ref_maybe_used_by_call_p_1. It never made sense since > modref treats call chain accesses explicitly. It was however copied from > earlier check for ECF_CONST (which

Re: [PATCH] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, 19 Nov 2021, Bernhard Reutner-Fischer wrote: > On Fri, 19 Nov 2021 10:35:26 +0100 (CET) > Richard Biener via Gcc-patches wrote: > > > On Fri, 19 Nov 2021, Alexandre Oliva wrote: > > > > > On Nov 18, 2021, Richard Biener wrote: > > > > > > > IMHO a more reasonable thing to do would b

Re: [PATCH][V4] rs6000: Remove unnecessary option manipulation.

2021-11-19 Thread Martin Liška
On 11/19/21 13:45, Segher Boessenkool wrote: On Fri, Nov 19, 2021 at 01:31:21PM +0100, Martin Liška wrote: All right, so I can't send an email from my local machine and git imap-send does not work as it goes through Thunderbird. Hrm, painful (for you). You should figure out how you can do the

Re: [PATCH] Fix tree-optimization/101941: IPA splitting out function with error attribute

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, Nov 19, 2021 at 12:50 PM Andrew Pinski wrote: > > On Fri, Nov 19, 2021 at 2:16 AM Richard Biener via Gcc-patches > wrote: > > > > On Wed, Nov 17, 2021 at 7:25 AM apinski--- via Gcc-patches > > wrote: > > > > > > From: Andrew Pinski > > > > > > The Linux kernel started to fail compile wh

Re: [PATCH][wwwdocs] remove references to java in htdocs/projects/beginner.html

2021-11-19 Thread Eric Gallager via Gcc-patches
On Fri, Nov 19, 2021 at 1:48 AM Gerald Pfeifer wrote: > > On Thu, 18 Nov 2021, Eric Gallager wrote: > > I'd find it easier to just edit the page linked to in wwwdocs instead, > > so I'm going to start seeing what I can do to update it. I figured I'd > > start by removing the references to Java in

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-11-19 Thread Martin Liška
On 11/19/21 09:59, Alexandre Oliva wrote: So I find the abstraction useful. However, I don't have plans to add other kinds of debug stmts, and I don't know of anyone else who does, so I won't stand in the way if others think removing these abstractions is a positive change. Hello. I've alread

[PR102988] harden cond: detach without decls

2021-11-19 Thread Alexandre Oliva via Gcc-patches
When we create copies of SSA_NAMEs to hold "detached" copies of the values for the hardening tests, we end up with assignments to SSA_NAMEs that refer to the same decls. That would be generally desirable, since it enables the variable to be recognized in dumps, and makes coalescing more likely i

[PATCH v3] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Giuliano Belinassi via Gcc-patches
The `configure` scripts generated with autoconf often tests compiler features by setting output to `/dev/null`, which then sets the dump folder as being /dev/* and the compilation halts with an error because GCC cannot create files in /dev/. This is a problem when configure is testing for compiler

[PATCH, v2, OpenMP 5.0] Remove array section base-pointer mapping semantics, and other front-end adjustments (mainline trunk)

2021-11-19 Thread Chung-Lin Tang
Hi Jakub, attached is a rebased version of this "OpenMP fixes/adjustments" patch. This version removes some of the (ort == C_ORT_OMP || ort == C_ORT_ACC) stuff that's not needed in handle_omp_array_sections_1 and [c_]finish_omp_clauses. Note that this is meant to be patched atop of the recent a

Re: [PATCH, PR90030] Fortran OpenMP/OpenACC array mapping alignment fix

2021-11-19 Thread Chung-Lin Tang
Ping. On 2021/11/4 4:23 PM, Chung-Lin Tang wrote: Hi Jakub, As Thomas reported and submitted a patch a while ago: https://gcc.gnu.org/pipermail/gcc-patches/2019-April/519932.html https://gcc.gnu.org/pipermail/gcc-patches/2019-May/522738.html There's an issue with the Fortran front-end when mapp

[committed] libphobos: Don't call __gthread_key_delete in the emutls destroy function.

2021-11-19 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes a EXC_BAD_ACCESS issue seen on Darwin when the libphobos DSO gets unloaded. Based on reading libgcc's emutls implementation, as it doesn't call __gthread_key_delete directly, neither should libphobos. Bootstrapped and regression tested on x86_64-linux-gnu and x86_64-apple-da

[committed] libphobos: Increase size of defaultStackPages on OSX X86_64 targets.

2021-11-19 Thread Iain Buclaw via Gcc-patches
Hi, As of macOS 11, libunwind now requires more stack space than 16k, so default to a larger stack size. This is only applied to X86 as the PAGESIZE is still 4k, however on AArch64 it is 16k. Regression tested on x86_64-linux-gnu and x86_64-apple-darwin20, committed to mainline and backported to

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, Nov 19, 2021 at 2:22 PM Martin Liška wrote: > > On 11/19/21 09:59, Alexandre Oliva wrote: > > So I find the abstraction useful. However, I don't have plans to add > > other kinds of debug stmts, and I don't know of anyone else who does, so > > I won't stand in the way if others think remo

Re: [PR102988] harden cond: detach without decls

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, Nov 19, 2021 at 2:38 PM Alexandre Oliva via Gcc-patches wrote: > > > When we create copies of SSA_NAMEs to hold "detached" copies of the > values for the hardening tests, we end up with assignments to > SSA_NAMEs that refer to the same decls. That would be generally > desirable, since it

Re: [PATCH v3] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Richard Biener via Gcc-patches
On Fri, 19 Nov 2021, Giuliano Belinassi wrote: > The `configure` scripts generated with autoconf often tests compiler > features by setting output to `/dev/null`, which then sets the dump > folder as being /dev/* and the compilation halts with an error because > GCC cannot create files in /dev/. T

Re: [PATCH] Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS.

2021-11-19 Thread Martin Liška
On 11/19/21 15:06, Richard Biener wrote: Can you please revert it? Sure, done as 79e9f721d1a6f370ce0534745baeeb5a56da948e. Martin

Re: [PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-19 Thread Andrew MacLeod via Gcc-patches
On 11/19/21 05:15, Aldy Hernandez wrote: On 11/18/21 8:28 PM, Andrew MacLeod wrote: @@ -376,6 +366,14 @@ range_def_chain::get_def_chain (tree name)    return NULL; } +  // Terminate the def chains if we see too many cascading stmts. +  if (m_logical_depth == param_ranger_logical_dep

Re: [PATCH v3] Do not abort compilation when dump file is /dev/*

2021-11-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 19 Nov 2021 15:12:35 +0100 (CET) Richard Biener via Gcc-patches wrote: > On Fri, 19 Nov 2021, Giuliano Belinassi wrote: > > -It defaults to the location of the output file; options > > +It defaults to the location of the output file, unless the output > > +file is a special file like @co

[PATCH 0/3] Add zero cycle move support

2021-11-19 Thread Michael Meissner via Gcc-patches
The next set of 3 patches add zero cycle move support to the Power10. Zero cycle moves are where the move to LR/CTR/TAR register that is adjacent to the jump to LR/CTR/TAR register can be fused together. At the moment, these set of three patches add support for zero cycle moves for indirect jumps

[PATCH 1/3] Add power10 zero cycle moves for switches & indirect jumps

2021-11-19 Thread Michael Meissner via Gcc-patches
Add power10 zero cycle moves for switches. Power10 will fuse adjacenet 'mtctr' and 'bctr' instructions to form zero cycle moves. This code exploits this fusion opportunity. I have built bootstrapped compilers with this patch on little endian power9 and power10 systems with no regressions. Can I

[PATCH 2/3] Set power10 fusion if -mtune=power10.

2021-11-19 Thread Michael Meissner via Gcc-patches
Set power10 fusion if -mtune=power10. In doing the patch for zero cycle moves for switch statements and indirect jumps, I noticed the fusion support is only done if -mcpu=power10. This option enables power10 fusion if we use -mtune=power10. I have built and run the testsuites on little endian po

[PATCH 3/3] Use absolute switch table addresses for zero cycle moves.

2021-11-19 Thread Michael Meissner via Gcc-patches
se absolute switch table addresses for zero cycle moves. This option enables using absolute addresses in switch tables if the power10 zero cycle move tuning is turned on. The combination of using absolute addresses in switch tables along with zero cycle moves seems to give the best performance.

Re: [PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-19 Thread Andrew MacLeod via Gcc-patches
On 11/19/21 04:21, Richard Biener wrote: On Thu, Nov 18, 2021 at 8:30 PM Andrew MacLeod via Gcc-patches wrote: At issue here is the dynamic approach we currently use for outgoing edge calculations. It isn't normally a problem, but once you get a very large number of possible outgoing values (i

PING [PATCH v2] implement -Winfinite-recursion [PR88232]

2021-11-19 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/584205.html On 11/11/21 2:46 PM, Martin Sebor wrote: Attached is a v2 of the solution I posted earlier this week with a few tweaks made after a more careful consideration of the problem and possible false negatives and positives. 1)

Re: [PATCH v2] c++: Implement -Wuninitialized for mem-initializers (redux) [PR19808]

2021-11-19 Thread Martin Sebor via Gcc-patches
On 11/18/21 6:56 PM, Jason Merrill via Gcc-patches wrote: On 11/18/21 19:24, Marek Polacek wrote: On Thu, Nov 18, 2021 at 05:10:47PM -0500, Jason Merrill wrote: On 11/8/21 18:41, Marek Polacek wrote: @@ -1311,13 +1462,25 @@ emit_mem_initializers (tree mem_inits) if (!COMPLETE_TYPE_P (curr

Re: [PATCH] c++: Avoid adding implicit attributes during apply_late_template_attributes [PR101180]

2021-11-19 Thread Jason Merrill via Gcc-patches
On 11/19/21 05:06, Jakub Jelinek wrote: Hi! decl_attributes and its caller cplus_decl_attributes sometimes add implicit attributes, e.g. optimize attribute if #pragma GCC optimize is active, target attribute if #pragma GCC target is active, or e.g. omp declare target attribute if in between #pra

Re: [PATCH 00/10] __builtin_dynamic_object_size

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:31:26AM +0530, Siddhesh Poyarekar wrote: > - Instead of bailing out on non-constant sizes with > __builtin_object_size, it should be possible to use ranger to > get an upper and lower bound on the size expression and use that to > implement __builtin_object_size. I

[PATCH] libphobos, testsuite: Add prune clauses for two Darwin cases.

2021-11-19 Thread Iain Sandoe via Gcc-patches
Depending on the permutation of CPU, OS version and shared/non- shared library inclusion, we get can get two warnings from the external tools (ld64, dsymutil) which are not actually GCC issues but relate to the external tools. These are already pruned in the main testsuite, this adds them to the l

Re: [PATCH 01/10] tree-object-size: Replace magic numbers with enums

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:31:27AM +0530, Siddhesh Poyarekar wrote: > A simple cleanup to allow inserting dynamic size code more easily. > > gcc/ChangeLog: > > * tree-object-size.c: New enum. > (object_sizes, computed, addr_object_size, > compute_builtin_object_size, init_object

[PATCH] libstdc++, testsuite: Add a prune expression for external tool bug.

2021-11-19 Thread Iain Sandoe via Gcc-patches
Depending on the permutation of CPU, OS version and shared/non- shared library inclusion, we get can get warnings from the external tools (ld64, dsymutil) which are not actually libstdc++ issues but relate to the external tools themselves. This is already pruned in the main testsuite, this adds it

Re: [PATCH] Fix IPA modref ubsan.

2021-11-19 Thread Martin Sebor via Gcc-patches
On 11/18/21 10:10 AM, Jan Hubicka wrote: I don't know what the guidance is on using vec in IPA passes but with respect to existing practice elsewhere, there are existing uses of vec and auto_vec with non-POD types and vec does work with them (see the vec_default_construct and vec_copy_construct

Re: [PATCH 02/10] tree-object-size: Abstract object_sizes array

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:31:28AM +0530, Siddhesh Poyarekar wrote: > Put all accesses to object_sizes behind functions so that we can add > dynamic capability more easily. > > gcc/ChangeLog: > > * tree-object-size.c (object_sizes_grow, object_sizes_release, > object_sizes_unknown_p,

[PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-19 Thread Andrew MacLeod via Gcc-patches
On 11/19/21 04:21, Richard Biener wrote: On Thu, Nov 18, 2021 at 8:30 PM Andrew MacLeod via Gcc-patches wrote: At issue here is the dynamic approach we currently use for outgoing edge calculations. It isn't normally a problem, but once you get a very large number of possible outgoing values (i

Re: [PATCH 02/10] tree-object-size: Abstract object_sizes array

2021-11-19 Thread Siddhesh Poyarekar
On 11/19/21 21:48, Jakub Jelinek wrote: On Wed, Nov 10, 2021 at 12:31:28AM +0530, Siddhesh Poyarekar wrote: Put all accesses to object_sizes behind functions so that we can add dynamic capability more easily. gcc/ChangeLog: * tree-object-size.c (object_sizes_grow, object_sizes_release,

Re: [PATCH 03/10] tree-object-size: Use tree instead of HOST_WIDE_INT

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Nov 10, 2021 at 12:31:29AM +0530, Siddhesh Poyarekar wrote: > * tree-object-size.h (compute_builtin_object_size): Return tree > instead of HOST_WIDE_INT. > * builtins.c (fold_builtin_object_size): Adjust. > * gimple-fold.c (gimple_fold_builtin_strncat): Likewise. >

Re: [PATCH] coroutines: Handle initial awaiters with non-void returns [PR 100127].

2021-11-19 Thread Iain Sandoe
Hi Jason, > On 18 Nov 2021, at 23:42, Iain Sandoe wrote: > > > >> On 18 Nov 2021, at 22:13, Jason Merrill via Gcc-patches >> wrote: >> >> On 11/5/21 11:46, Iain Sandoe wrote: >>> The way in which a C++20 coroutine is specified discards any value >>> tree aw_r = TREE_VEC_ELT (vec, 2);

Re: libgo patch committed: redirect mkrsysinfo.sh grep output to /dev/null

2021-11-19 Thread Ian Lance Taylor via Gcc-patches
On Fri, Nov 19, 2021 at 3:47 AM Bernhard Reutner-Fischer via Gcc-patches wrote: > > On Fri, 28 Oct 2016 10:55:18 -0700 > Ian Lance Taylor wrote: > > > This patch to libgo redirects the output of a grep command in > > mkrsysinfo.sh to /dev/null. The output otherwise appears in the > > grep -q exi

Re: [PATCH] libstdc++, testsuite: Add a prune expression for external tool bug.

2021-11-19 Thread Jonathan Wakely via Gcc-patches
On Fri, 19 Nov 2021 at 16:04, Iain Sandoe via Libstdc++ wrote: > > Depending on the permutation of CPU, OS version and shared/non- > shared library inclusion, we get can get warnings from the external > tools (ld64, dsymutil) which are not actually libstdc++ issues but > relate to the external too

Re: [PATCH] options: Make -Ofast switch off -fsemantic-interposition

2021-11-19 Thread Martin Jambor
Hi, On Fri, Nov 19 2021, Jan Hubicka wrote: >> > Hi, >> > >> > On Fri, Nov 12 2021, Martin Jambor wrote: >> > > Hi, >> > > >> > > using -fno-semantic-interposition has been reported by various people >> > > to bring about considerable speed up at the cost of strict compliance >> > > to the ELF sy

[wwwdocs PATCH]: Add a caveat that -Ofast implies -fno-semantic-interposition

2021-11-19 Thread Martin Jambor
Hi, can I add the following caveat to the gcc-12/changes.html file? Thanks, Martin diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 5f0214bd..fd7af717 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -72,6 +72,8 @@ a work-in-progress. b

Re: [PATCH] rs6000: Add optimizations for _mm_sad_epu8

2021-11-19 Thread Segher Boessenkool
Hi! On Fri, Oct 22, 2021 at 12:28:49PM -0500, Paul A. Clarke wrote: > Power9 ISA added `vabsdub` instruction which is realized in the > `vec_absd` instrinsic. > > Use `vec_absd` for `_mm_sad_epu8` compatibility intrinsic, when > `_ARCH_PWR9`. > > Also, the realization of `vec_sum2s` on little-en

Re: [PATCH] gcc: vxworks: fix providing stdint.h header

2021-11-19 Thread Olivier Hainque via Gcc-patches
Hi Rasmus, > On 12 Nov 2021, at 17:35, Olivier Hainque wrote: > We have had to use for stdbool a similar trick as we had > for stdint (need to preinclude yyvals.h), which we will need to > propagate somehow. I'm not yet sure how to reconcile that with > your observations. >> In file included fr

Re: [PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-19 Thread Richard Biener via Gcc-patches
On November 19, 2021 4:00:01 PM GMT+01:00, Andrew MacLeod wrote: >On 11/19/21 04:21, Richard Biener wrote: >> On Thu, Nov 18, 2021 at 8:30 PM Andrew MacLeod via Gcc-patches >> wrote: >>> At issue here is the dynamic approach we currently use for outgoing edge >>> calculations. It isn't normally

Re: [PATCH] rs6000: Add Power10 optimization for most _mm_movemask*

2021-11-19 Thread Segher Boessenkool
On Thu, Oct 21, 2021 at 12:22:12PM -0500, Paul A. Clarke wrote: > Power10 ISA added `vextract*` instructions which are realized in the > `vec_extractm` instrinsic. > > Use `vec_extractm` for `_mm_movemask_ps`, `_mm_movemask_pd`, and > `_mm_movemask_epi8` compatibility intrinsics, when `_ARCH_PWR10

[committed] libstdc++: Begin lifetime of chars in constexpr std::string [PR103295]

2021-11-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux (and clang on x86_64-linux), pushed to trunk. Clang gives errors for constexpr std::string because the memory returned by std::allocator::allocate does not contain any objects yet, and attempting to set them using char_traits::assign or char_traits::copy fails with: assi

[committed] libstdc++: Suppress -Wstringop warnings [PR103332]

2021-11-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. libstdc++-v3/ChangeLog: PR libstdc++/103332 PR libstdc++/102958 * testsuite/21_strings/basic_string/capacity/char/1.cc: Add -Wno-stringop-overflow. * testsuite/21_strings/basic_string/operators/char/1.cc: Likew

Re: [PATCH] PR tree-optimization/103254 - Limit depth for all GORI expressions.

2021-11-19 Thread Andrew MacLeod via Gcc-patches
On 11/19/21 13:13, Richard Biener wrote: On November 19, 2021 4:00:01 PM GMT+01:00, Andrew MacLeod wrote: On 11/19/21 04:21, Richard Biener wrote: On Thu, Nov 18, 2021 at 8:30 PM Andrew MacLeod via Gcc-patches wrote: At issue here is the dynamic approach we currently use for outgoing edge c

Re: [PATCH 03/10] tree-object-size: Use tree instead of HOST_WIDE_INT

2021-11-19 Thread Siddhesh Poyarekar
On 11/19/21 22:36, Jakub Jelinek wrote: On Wed, Nov 10, 2021 at 12:31:29AM +0530, Siddhesh Poyarekar wrote: * tree-object-size.h (compute_builtin_object_size): Return tree instead of HOST_WIDE_INT. * builtins.c (fold_builtin_object_size): Adjust. * gimple-fold.c (

Re: [wwwdocs PATCH]: Add a caveat that -Ofast implies -fno-semantic-interposition

2021-11-19 Thread Gerald Pfeifer
On Fri, 19 Nov 2021, Martin Jambor wrote: > can I add the following caveat to the gcc-12/changes.html file? Of course you can. :-) Actually, we should, and I'm glad you thought of it. Thank you, Gerald

Re: [PATCH 03/10] tree-object-size: Use tree instead of HOST_WIDE_INT

2021-11-19 Thread Jakub Jelinek via Gcc-patches
On Sat, Nov 20, 2021 at 12:31:19AM +0530, Siddhesh Poyarekar wrote: > > Neither of these are equivalent to what it used to do before. > > If some target has e.g. pointers wider than size_t, then previously we could > > compute bytes that doesn't fit into size_t and would return NULL which > > event

Re: [PATCH] libphobos, testsuite: Add prune clauses for two Darwin cases.

2021-11-19 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Sandoe's message of November 19, 2021 4:59 pm: > Depending on the permutation of CPU, OS version and shared/non- > shared library inclusion, we get can get two warnings from the > external tools (ld64, dsymutil) which are not actually GCC issues > but relate to the external tools

[PATCH] c++: redundant explicit 'this' capture in C++17 [PR100493]

2021-11-19 Thread Patrick Palka via Gcc-patches
As described in detail in the PR, in C++20 implicitly capturing 'this' via the '=' capture default is deprecated, but in C++17 explicitly capturing 'this' alongside a '=' capture default is ill-formed. This means it's impossible to write a C++17 lambda that captures 'this' and that also has a '='

[PATCH] PR fortran/87851 - [9/10/11/12 Regression] Wrong return type for len_trim

2021-11-19 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, scalariziation of the elemental intrinsic LEN_TRIM was ICEing when the optional KIND argument was present. The cleanest solution is to use the infrastructure added by Mikael's fix for PR97896. In that case it is a 1-liner. :-) That fix is available on mainline and on 11-branc

[pushed] c++: Fix cpp0x/lambda/lambda-nested9.C with C++11

2021-11-19 Thread Marek Polacek via Gcc-patches
Unfortunately dejagnu doesn't honor #if/#endif, so this test was failing with -std=c++11: FAIL: g++.dg/cpp0x/lambda/lambda-nested9.C -std=c++11 (test for errors, line 37) Fixed thus. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/lambda/lambda

[committed] libstdc++: One more change for Clang to support constexpr std::string [PR103295]

2021-11-19 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux (and x86_64-linux clang), pushed to trunk. All writes into the allocated buffer need to be via traits_type::assign to begin lifetimes. libstdc++-v3/ChangeLog: PR libstdc++/103295 * include/bits/basic_string.tcc (_M_construct): Use the traits assi

  1   2   >