[PATCH] tree-optimization/97733 - fix SLP of reductions with zero relevant

2020-11-05 Thread Richard Biener
This adds a missing check. Bootstrap & regtest running on x86_64-unknown-linux-gnu. 2020-11-06 Richard Biener PR tree-optimization/97733 * tree-vect-slp.c (vect_analyze_slp_instance): If less than two reductions were relevant or live do nothing. --- gcc/tree-vect-slp.

Re: [PATCH] Clean up loop-closed PHIs at loopdone pass

2020-11-05 Thread Jiufu Guo via Gcc-patches
On 2020-11-05 21:43, Richard Biener wrote: Hi Richard, Thanks for your comments and suggestions! On Thu, Nov 5, 2020 at 2:19 PM guojiufu via Gcc-patches wrote: In PR87473, there are discussions about loop-closed PHIs which are generated for loop optimization passes. It would be helpful to

Re: [Patch] Fortran: Fix type-decl for PDT / wrong-code pdt_14.f03 issue [PR97652]

2020-11-05 Thread Richard Biener via Gcc-patches
On Fri, Nov 6, 2020 at 2:04 AM Tobias Burnus wrote: > > Recent IPA work exposed this issue by causing wrong-code for > gfortran.dg/pdt_15.f03 > with optimization turned on; this shows up rather prominently with an endless > loop, > until after 300s (per optimization level) the timeout kicks in.

Re: [PATCH] mixing of labels and code in C2X

2020-11-05 Thread Uecker, Martin
Hi Joseph, here is the revised patch. I remove the 'fallthrough' code as suggested, so everything becomes even simpler. Some tests had to be changed then, but it seems Ok to me. Best, Martin diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index ca844ca775a..c656b5f4cc5 100644 --- a/gcc/c/Change

Re: [PATCH v2] libgcc: Expose the instruction pointer and stack pointer in SEH _Unwind_Backtrace

2020-11-05 Thread Jonathan Yong via Gcc-patches
On 11/6/20 3:27 AM, Jeff Law wrote: On 11/2/20 5:05 AM, Kai Tietz via Gcc-patches wrote: Hello, as noone seems to be able to review this patch, I will do so, even if this is no longer a task of mine. The patch itself is reasonable and seems to fix a pending issue we have on CFA support. I had

[PATCH] c++: Small tweak to can_convert_eh [PR81660]

2020-11-05 Thread Marek Polacek via Gcc-patches
While messing with check_handlers_1, I spotted this bug report which complains that we don't warn about the case when we have two duplicated handlers of type int. can_convert_eh implements [except.handle] and that says: A handler is a match for an exception object of type E if - The handler is of

[PATCH]ira: recompute regstat as max_regno changes [PR97705]

2020-11-05 Thread Kewen.Lin via Gcc-patches
Hi, As PR97705 shows, my commit r11-4637 caused some dumping comparison difference error on pass ira. It exposed one issue about the newly introduced function remove_scratches, which can increase the largest pseudo reg number if it succeeds, later some function will use the max_reg_num() to get t

Split DWARF and rnglists, gcc vs clang

2020-11-05 Thread Simon Marchi via Gcc-patches
Hi, I'm currently squashing some bugs related to .debug_rnglists in GDB, and I happened to notice that clang and gcc do different things when generating rnglists with split DWARF. I'd like to know if the two behaviors are acceptable, and therefore if we need to make GDB accept both. Or maybe one

Re: [patch] i386 tests: Add dg-require-profiling to i386 tests using -pg

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/29/20 9:00 AM, Olivier Hainque wrote: > Hello, > > This patch is a proposal to add > > /* { dg-require-profiling "-pg" } */ > > to a few tests in gcc.target/i386 that use -pg explicitly. > > This matches what other tests checking profiling related > options do and prevents these specific

Re: [PING] [PATCH] S/390: Do not turn maybe-uninitialized warnings into errors

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/30/20 7:01 AM, Richard Biener wrote: > > It's not that more / different inlining inherently exposes _more_ > false positives in the middle-end warnings. They simply expose > others and the GCC codebase is cleansed (by those who change > inliner heuristics / tunings) from those by either fi

Re: [EXTERNAL] Re: [PATCH] [tree-optimization] Fix for PR97223

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/29/20 1:45 PM, Eugene Rozenfeld via Gcc-patches wrote: > Thank you for the review Richard! > > I re-worked the patch based on your suggestions. I combined the two patterns. > Neither one requires a signedness check as long as the type of the 'add' has > overflow wrap semantics. > > I had

Re: [PATCH] [tree-optimization] Fix for PR96701

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/29/20 8:36 PM, Eugene Rozenfeld via Gcc-patches wrote: > This patch adds a pattern for folding > > x >> x > > to > > 0 > > as described in PR96701. > > > Without this patch the x86_64-pc-linux-gnu code generated for this function > > > > int > > foo (int i) > >

Re: [PATCH v2] libgcc: Expose the instruction pointer and stack pointer in SEH _Unwind_Backtrace

2020-11-05 Thread Jeff Law via Gcc-patches
On 9/8/20 6:21 AM, Martin Storsjö wrote: > Previously, the SEH version of _Unwind_Backtrace did unwind > the stack and call the provided callback function as intended, > but there was little the caller could do within the callback to > actually get any info about that particular level in the unwi

Re: [PATCH v2] libgcc: Expose the instruction pointer and stack pointer in SEH _Unwind_Backtrace

2020-11-05 Thread Jeff Law via Gcc-patches
On 11/2/20 5:05 AM, Kai Tietz via Gcc-patches wrote: > Hello, > > as noone seems to be able to review this patch, I will do so, even if > this is no longer a task of mine. > The patch itself is reasonable and seems to fix a pending issue we > have on CFA support. I had already private discussion

[committed] RISC-V: Mark non-export symbol static and const in riscv-common.c

2020-11-05 Thread Kito Cheng
gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_implied_info): Add static and const. (riscv_subset_list::handle_implied_ext): Add const due to riscv_implied_info changed to const. --- gcc/common/config/riscv/riscv-common.c | 4 ++-- 1 file changed, 2 ins

Re: [PATCH] PR target/96307: Fix KASAN option checking.

2020-11-05 Thread Kito Cheng
Committed, thanks :) On Fri, Nov 6, 2020 at 6:21 AM Jeff Law wrote: > > On 10/16/20 3:01 AM, Martin Liška wrote: > > On 10/16/20 9:41 AM, Kito Cheng wrote: > >> I think it is still useful for other targets which are not supporting > >> libsanitizer yet, so in this patch I also moved related test

Re: [patch] g++ tests: Add dg-require-effective-target fpic to a few g++ tests

2020-11-05 Thread Jeff Law via Gcc-patches
On 11/3/20 10:23 AM, Olivier Hainque wrote: > Hello, > > This change is a proposal to add > > /* { dg-require-effective-target fpic } */ > > to a few tests in g++.dg that use -fpic or -fPIC > but don't currently query the target support. > > This corresponds to what most other fpic tests do >

Re: [PATCH v2] Add bypass_p cost check in flag_sched_last_insn_heuristic

2020-11-05 Thread Jeff Law via Gcc-patches
On 11/5/20 7:52 PM, Jim Wilson wrote: > On Thu, Nov 5, 2020 at 6:10 PM Jojo R > wrote: > >         gcc/ >         * haifa-sched.c (rank_for_schedule): Add bypass_p >         cost check in flag_sched_last_insn_heuristic. > > +         || (INSN_CODE (D

Re: [PATCH v2] Replace dep_list_size with dep_list_costs for better scheduling

2020-11-05 Thread Jeff Law via Gcc-patches
On 11/5/20 7:50 PM, Jim Wilson wrote: > On Thu, Nov 5, 2020 at 6:03 PM Jojo R > wrote: > >         gcc/ >         * haifa-sched.c (dep_list_costs): New. >         (rank_for_schedule): Use dep_list_costs. > > > When you post a patch, you should explain wh

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Andrew MacLeod via Gcc-patches
On 11/5/20 7:50 PM, Martin Sebor wrote: On 11/5/20 5:02 PM, Andrew MacLeod wrote: On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  >

Re: [PATCH v2] Add bypass_p cost check in flag_sched_last_insn_heuristic

2020-11-05 Thread Jim Wilson
On Thu, Nov 5, 2020 at 6:10 PM Jojo R wrote: > gcc/ > * haifa-sched.c (rank_for_schedule): Add bypass_p > cost check in flag_sched_last_insn_heuristic. > > + || (INSN_CODE (DEP_PRO (dep1)) >= 0 && bypass_p (DEP_PRO (dep1)) > + && recog_memoized (DEP_CON

Re: [PATCH v2] Replace dep_list_size with dep_list_costs for better scheduling

2020-11-05 Thread Jim Wilson
On Thu, Nov 5, 2020 at 6:03 PM Jojo R wrote: > gcc/ > * haifa-sched.c (dep_list_costs): New. > (rank_for_schedule): Use dep_list_costs. > When you post a patch, you should explain what the patch is doing and why this is better than the code that was there before. It is h

[PATCH v2] Add bypass_p cost check in flag_sched_last_insn_heuristic

2020-11-05 Thread Jojo R
gcc/ * haifa-sched.c (rank_for_schedule): Add bypass_p cost check in flag_sched_last_insn_heuristic. --- gcc/haifa-sched.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 62d1816a55d..adf63659d15 1

[PATCH v2] Replace dep_list_size with dep_list_costs for better scheduling

2020-11-05 Thread Jojo R
gcc/ * haifa-sched.c (dep_list_costs): New. (rank_for_schedule): Use dep_list_costs. --- gcc/haifa-sched.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 350178c82b8..32cd640b

RE: gcc-wwwdocs branch master updated. 88e29096c36837553fc841bd1fa5df6caa776b44

2020-11-05 Thread Liu, Hongtao via Gcc-patches
>-Original Message- >From: Liu, Hongtao >Sent: Friday, November 6, 2020 9:22 AM >To: Gerald Pfeifer ; Hongtao Liu ; >hongtao Liu >Cc: gcc-patches@gcc.gnu.org >Subject: RE: gcc-wwwdocs branch master updated. >88e29096c36837553fc841bd1fa5df6caa776b44 > > > >>-Original Message- >>F

[PATCH 3/4 v2] c++: Use two levels of caching in satisfy_atom

2020-11-05 Thread Patrick Palka via Gcc-patches
This improves the effectiveness of caching in satisfy_atom by querying the cache again after we've instantiated the atom's parameter mapping. Before instantiating its mapping, the identity of an (atom,args) pair within the satisfaction cache is determined by idiosyncratic things like the level and

[PATCH 4/4 v2] c++: Consider only relevant template arguments in sat_hasher

2020-11-05 Thread Patrick Palka via Gcc-patches
A large source of cache misses in satisfy_atom is caused by the identity of an (atom,args) pair within the satisfaction cache being determined by the entire set of supplied template arguments rather than by the subset of template arguments that the atom actually depends on. For instance, consider

[PATCH 2/4 v2] c++: Reuse identical ATOMIC_CONSTRs during normalization

2020-11-05 Thread Patrick Palka via Gcc-patches
Profiling revealed that sat_hasher::equal accounts for nearly 40% of compile time in some cmcstl2 tests. This patch eliminates this bottleneck by caching the ATOMIC_CONSTRs returned by normalize_atom. This in turn allows us to replace the expensive atomic_constraints_identical_p check in sat_hash

[PATCH 1/4] c++: Fix ICE with variadic concepts and aliases [PR93907]

2020-11-05 Thread Patrick Palka via Gcc-patches
This patch (naively) extends the PR93907 fix to also apply to variadic concepts invoked with a type argument pack. Without this, we ICE on the below testcase (a variadic version of concepts-using2.C) in the same manner as we used to on concepts-using2.C before r10-7133. Patch series bootstrapped

Re: [PATCH] c++: Reuse identical ATOMIC_CONSTRs during normalization

2020-11-05 Thread Patrick Palka via Gcc-patches
On Thu, 5 Nov 2020, Patrick Palka wrote: > On Thu, 5 Nov 2020, Jason Merrill wrote: > > > On 11/3/20 3:43 PM, Patrick Palka wrote: > > > Profiling revealed that sat_hasher::equal accounts for nearly 40% of > > > compile time in some cmcstl2 tests. > > > > > > This patch eliminates this bottlenec

RE: gcc-wwwdocs branch master updated. 88e29096c36837553fc841bd1fa5df6caa776b44

2020-11-05 Thread Liu, Hongtao via Gcc-patches
>-Original Message- >From: Gerald Pfeifer >Sent: Friday, November 6, 2020 5:57 AM >To: Hongtao Liu ; hongtao Liu > >Cc: gcc-patches@gcc.gnu.org >Subject: Re: gcc-wwwdocs branch master updated. >88e29096c36837553fc841bd1fa5df6caa776b44 > >On Thu, 29 Oct 2020, hongtao Liu via Gcc-cvs-wwwd

Re: [PATCH] Put absolute address jump table in data.rel.ro.local if targets support relocations

2020-11-05 Thread HAO CHEN GUI via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556744.html Thanks Gui Haochen On 22/10/2020 上午 10:53, HAO CHEN GUI wrote: I had a wrong email setting and got your reply later. I modified the patch according to your advice. Could you please review it again? Than

Re: [PATCH, rs6000] Add non-relative jump table support on Power Linux

2020-11-05 Thread HAO CHEN GUI via Gcc-patches
Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556236.html Thanks. Gui Haochen On 15/10/2020 下午 4:46, HAO CHEN GUI wrote: Segher,     I re-wrote the patch based on parameterized name.     The attachments are the patch diff file and change log file.     Boots

[Patch] Fortran: Fix type-decl for PDT / wrong-code pdt_14.f03 issue [PR97652]

2020-11-05 Thread Tobias Burnus
Recent IPA work exposed this issue by causing wrong-code for gfortran.dg/pdt_15.f03 with optimization turned on; this shows up rather prominently with an endless loop, until after 300s (per optimization level) the timeout kicks in. OK? It probably should be backported to GCC 9 + 10, I think, ev

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Martin Sebor via Gcc-patches
On 11/5/20 5:02 PM, Andrew MacLeod wrote: On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via G

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Andrew MacLeod via Gcc-patches
On 11/5/20 2:29 PM, Martin Sebor wrote: signed char g (signed char min, signed char max) {   signed char i = x;   return i < min || max < i ? min : i; } void gg (void) {   __builtin_sprintf (a, "%i", g (0, 9));   // bogus warning } Im looking at this. its actually completely different code tha

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Andrew MacLeod via Gcc-patches
On 11/5/20 4:02 PM, Martin Sebor wrote: On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote:  >>> Thanks for doing all

Handle fnspec in ipa-modref II

2020-11-05 Thread Jan Hubicka
Hi, this patch adds the IPA propagation support for fnspecs in ipa-modref. Fnspec string are collected to a new edge summary (since they do depend on the call statement and not only the called function) and stored to summaries. Since ipa-modref is first pass that now cares about jump funitions to

Re: [PATCH] c++: Add -Wexceptions warning option [PR97675]

2020-11-05 Thread Marek Polacek via Gcc-patches
On Thu, Nov 05, 2020 at 06:13:41PM -0500, David Malcolm via Gcc-patches wrote: > On Thu, 2020-11-05 at 11:03 -0500, Marek Polacek via Gcc-patches wrote: > > This PR asks that we add a warning option for an existing (very old) > > warning, so that it can be disabled selectively. clang++ uses > > -W

Move size time tables from ggc to heap

2020-11-05 Thread Jan Hubicka
Hi, this patch moves size time tables out of ggc allocated memory. This makes sources bit cleaner and saves about 60MB of GGC memory that turns to about 45MB of heap memory for cc1plus LTO build. Bootstrapped/regtested x86_64-linux, plan to commit it shortly. Honza 2020-11-06 Jan Hubicka

float.h: C2x decimal signaling NaN macros

2020-11-05 Thread Joseph Myers
C2x adds macros for decimal floating-point signaling NaNs to . Add these macros to GCC's implementation. Note that the current C2x draft has these under incorrect names D32_SNAN, D64_SNAN, D128_SNAN. The intent was to change the naming convention to be consistent with other macros when they we

Re: [PATCH] c++: Add -Wexceptions warning option [PR97675]

2020-11-05 Thread David Malcolm via Gcc-patches
On Thu, 2020-11-05 at 11:03 -0500, Marek Polacek via Gcc-patches wrote: > This PR asks that we add a warning option for an existing (very old) > warning, so that it can be disabled selectively. clang++ uses > -Wexceptions for this, so I added this new option rather than using > e.g. -Wnoexcept. >

Re: [PATCH] c++: Reuse identical ATOMIC_CONSTRs during normalization

2020-11-05 Thread Patrick Palka via Gcc-patches
On Thu, 5 Nov 2020, Jason Merrill wrote: > On 11/3/20 3:43 PM, Patrick Palka wrote: > > Profiling revealed that sat_hasher::equal accounts for nearly 40% of > > compile time in some cmcstl2 tests. > > > > This patch eliminates this bottleneck by caching the ATOMIC_CONSTRs > > returned by normaliz

Re: [PATCH,rs6000] Add patterns for combine to support p10 fusion

2020-11-05 Thread will schmidt via Gcc-patches
On Wed, 2020-11-04 at 12:12 -0600, Aaron Sawdey via Gcc-patches wrote: > Ping. > > Aaron Sawdey, Ph.D. saw...@linux.ibm.com > IBM Linux on POWER Toolchain > > > > On Oct 26, 2020, at 4:44 PM, acsaw...@linux.ibm.com wrote: > > > > From: Aaron Sawdey > > Hi, > > This patch adds the first co

Re: [PATCH] c++: Use two levels of caching in satisfy_atom

2020-11-05 Thread Patrick Palka via Gcc-patches
On Thu, 5 Nov 2020, Jason Merrill wrote: > On 11/4/20 2:19 PM, Patrick Palka wrote: > > [ This patch depends on > > > >c++: Reuse identical ATOMIC_CONSTRs during normalization > > > >https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557929.html ] > > > > This improves the effecti

Re: [PATCH, rs6000] Update instruction attributes for Power10

2020-11-05 Thread will schmidt via Gcc-patches
On Wed, 2020-11-04 at 14:42 -0600, Pat Haugen via Gcc-patches wrote: > Update instruction attributes for Power10. > > > This patch updates the type/prefixed/dot/size attributes for various new > instructions (and a couple existing that were incorrect) in preparation for > the Power10 scheduling

Re: [PATCH] Remove vr_values::extract_range_builtin.

2020-11-05 Thread Aldy Hernandez via Gcc-patches
Ug. Well, we need to wait for something later than the 25th's snapshot since I committed the asset patch later. Aldy On Thu, Nov 5, 2020, 22:43 Jeff Law wrote: > > On 11/5/20 2:40 PM, Aldy Hernandez wrote: > > I'll wait for the 11/01 snapshot to finish then. > > I'm worried that the 11/01 s

Re: [PATCH] PR target/96307: Fix KASAN option checking.

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/16/20 3:01 AM, Martin Liška wrote: > On 10/16/20 9:41 AM, Kito Cheng wrote: >> I think it is still useful for other targets which are not supporting >> libsanitizer yet, so in this patch I also moved related testcases >> from gcc.target to gcc.dg. > > All right, I can't approve the patch, b

Re: [PATCH] configure: Suppress output from multi-do recipes

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/14/20 11:55 AM, Jonathan Wakely via Gcc-patches wrote: > On 14/10/20 17:29 +0100, Jonathan Wakely wrote: >> The FIXME comment saying "Leave out until this is tested a bit more" is >> from 1997. I think it's been sufficiently tested. >> >> ChangeLog: >> >>     * config-ml.in (multi-do):

Re: [PATCH, rs6000] Optimize pcrel access of globals (updated, ping)

2020-11-05 Thread will schmidt via Gcc-patches
On Wed, 2020-11-04 at 12:10 -0600, acsawdey--- via Gcc-patches wrote: > From: Aaron Sawdey > > Ping, as it has been a while. > This also includes a slight fix to make sure that all references can get > optimized. > I've read over what I could. a few nits below, nothing significant jumped out

[Patch] Fortran: Fix function decl's location [PR95847]

2020-11-05 Thread Tobias Burnus
In gfc_get_symbol_decl, if an external procedure is invoked and sym->backend_decl is NULL_TREE, gfc_get_extern_function_decl is called. This searches the translation unit (or gsym) to find the declaration – and if found, it returns it. Well, that worked and the module procedure's decl is return

Re: gcc-wwwdocs branch master updated. 88e29096c36837553fc841bd1fa5df6caa776b44

2020-11-05 Thread Gerald Pfeifer
On Thu, 29 Oct 2020, hongtao Liu via Gcc-cvs-wwwdocs wrote: > The branch, master has been updated >via 88e29096c36837553fc841bd1fa5df6caa776b44 (commit) > from 053c956f6e9c71efac5be01f8a8ba79f15d87f4b (commit) >GCC now supports the Intel CPU named Alderlake through > -marc

Re: [PATCH] c++: Consider only relevant template arguments in sat_hasher

2020-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/20 11:18 AM, Patrick Palka wrote: [ This patch depends on c++: Use two levels of caching in satisfy_atom https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558096.html ] A large source of cache misses in satisfy_atom is caused by the identity of an (atom,args) pair within t

Re: [PATCH] Remove vr_values::extract_range_builtin.

2020-11-05 Thread Jeff Law via Gcc-patches
On 11/5/20 2:40 PM, Aldy Hernandez wrote: > I'll wait for the 11/01 snapshot to finish then. I'm worried that the 11/01 snapshot is going to generate so many failures that it may not be useful.  I'm not sure what's going on, but I'm getting a ton of what appear to be codegen correctness issues.

Re: [PATCH] c++: Use two levels of caching in satisfy_atom

2020-11-05 Thread Jason Merrill via Gcc-patches
On 11/4/20 2:19 PM, Patrick Palka wrote: [ This patch depends on c++: Reuse identical ATOMIC_CONSTRs during normalization https://gcc.gnu.org/pipermail/gcc-patches/2020-November/557929.html ] This improves the effectiveness of caching in satisfy_atom by querying the cache again after we

Re: [PATCH] Remove vr_values::extract_range_builtin.

2020-11-05 Thread Aldy Hernandez via Gcc-patches
I'll wait for the 11/01 snapshot to finish then. Thanks. Aldy On Thu, Nov 5, 2020, 21:53 Jeff Law wrote: > > On 10/20/20 10:43 AM, Aldy Hernandez via Gcc-patches wrote: > > As promised. > > > > Now that we know the vr_values and ranger versions are in sync, it > > is safe to remove the vr_value

Re: [PATCH] c++: Fix decltype(auto) deduction with rvalue ref [PR78209]

2020-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/20 3:52 PM, Marek Polacek wrote: Here's a small deficiency in decltype(auto). [dcl.type.auto.deduct]/5: If the placeholder-type-specifier is of the form decltype(auto), [...] the type deduced for T is determined [...] as though E had been the operand of the decltype. So: int &&i = 0

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Martin Sebor via Gcc-patches
On 11/5/20 12:29 PM, Martin Sebor wrote: On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote:  >>> Thanks for doing all this!  There isn't anything I don't unde

Re: [committed] libstdc++: Fix constraints on std::optional comparisons [PR 96269]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
On 05/11/20 22:12 +0200, Ville Voutilainen via Libstdc++ wrote: On Thu, 5 Nov 2020 at 21:52, Jonathan Wakely via Libstdc++ wrote: On 05/11/20 19:09 +, Jonathan Wakely wrote: >The relational operators for std::optional were using the wrong types >in the declval expressions used to constrain

Re: Use EAF_RETURN_ARG in tree-ssa-ccp.c

2020-11-05 Thread Jan Hubicka
> > On 10/27/20 3:01 AM, Richard Biener wrote: > > On Tue, 27 Oct 2020, Jan Hubicka wrote: > > > >>> On Mon, 26 Oct 2020, Jan Hubicka wrote: > >>> > Hi, > while looking for special cases of buitins I noticed that tree-ssa-ccp > can use EAF_RETURNS_ARG. I wonder if same should be do

Re: [PATCH] Remove vr_values::extract_range_builtin.

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/20/20 10:43 AM, Aldy Hernandez via Gcc-patches wrote: > As promised. > > Now that we know the vr_values and ranger versions are in sync, it > is safe to remove the vr_values version and just call the ranger one. > > I am holding off on pushing this for a week or two, or until Fedora gets >

[PATCH] c++: Fix decltype(auto) deduction with rvalue ref [PR78209]

2020-11-05 Thread Marek Polacek via Gcc-patches
Here's a small deficiency in decltype(auto). [dcl.type.auto.deduct]/5: If the placeholder-type-specifier is of the form decltype(auto), [...] the type deduced for T is determined [...] as though E had been the operand of the decltype. So: int &&i = 0; decltype(auto) j = i; // should behave l

Re: Use EAF_RETURN_ARG in tree-ssa-ccp.c

2020-11-05 Thread Jeff Law via Gcc-patches
On 10/27/20 3:01 AM, Richard Biener wrote: > On Tue, 27 Oct 2020, Jan Hubicka wrote: > >>> On Mon, 26 Oct 2020, Jan Hubicka wrote: >>> Hi, while looking for special cases of buitins I noticed that tree-ssa-ccp can use EAF_RETURNS_ARG. I wonder if same should be done by value

Re: [PATCH] c++: Add -Wexceptions warning option [PR97675]

2020-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/20 11:03 AM, Marek Polacek wrote: This PR asks that we add a warning option for an existing (very old) warning, so that it can be disabled selectively. clang++ uses -Wexceptions for this, so I added this new option rather than using e.g. -Wnoexcept. OK. gcc/c-family/ChangeLog:

Re: [PATCH] c++: Reuse identical ATOMIC_CONSTRs during normalization

2020-11-05 Thread Jason Merrill via Gcc-patches
On 11/3/20 3:43 PM, Patrick Palka wrote: Profiling revealed that sat_hasher::equal accounts for nearly 40% of compile time in some cmcstl2 tests. This patch eliminates this bottleneck by caching the ATOMIC_CONSTRs returned by normalize_atom. This in turn allows us to replace the expensive atomi

[PATCH] Pass multi-range from range_query::value_* routines

2020-11-05 Thread Andrew MacLeod via Gcc-patches
As detailed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97725 This was a latent bug where we were passing a value_range into to range_ops for aq calculation. This was being used by the not_equal::fold() routine as an intermediary as one point, and it couldnt represent the full range, and i

Re: [PATCH v4] c++: Implement -Wvexing-parse [PR25814]

2020-11-05 Thread Jason Merrill via Gcc-patches
On 11/5/20 10:46 AM, Marek Polacek wrote: On Fri, Oct 30, 2020 at 04:33:48PM -0400, Jason Merrill wrote: On 10/29/20 11:00 PM, Marek Polacek wrote: Gotcha. Now we do most of the work in warn_about_ambiguous_parse. Thanks, just a few tweaks left. --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4

Re: [PATCH] arm: [testcase] Better narrow some bfloat16 testcase

2020-11-05 Thread Christophe Lyon via Gcc-patches
On Thu, 5 Nov 2020 at 15:30, Andrea Corallo wrote: > > Christophe Lyon writes: > > > On Thu, 5 Nov 2020 at 12:11, Andrea Corallo wrote: > >> > >> Christophe Lyon writes: > >> > >> [...] > >> > >> >> I think you need to add -mfloat-abi=hard to the dg-additional-options > >> >> otherwise vld1_lan

Re: [committed] libstdc++: Fix constraints on std::optional comparisons [PR 96269]

2020-11-05 Thread Ville Voutilainen via Gcc-patches
On Thu, 5 Nov 2020 at 21:52, Jonathan Wakely via Libstdc++ wrote: > > On 05/11/20 19:09 +, Jonathan Wakely wrote: > >The relational operators for std::optional were using the wrong types > >in the declval expressions used to constrain them. Instead of using > >const lvalues they were using non

Re: [PATCH][AArch64] ACLE intrinsics: get low/high half from BFloat16 vector

2020-11-05 Thread Christophe Lyon via Gcc-patches
On Tue, 3 Nov 2020 at 12:17, Dennis Zhang via Gcc-patches wrote: > > Hi Richard, > > On 10/30/20 2:07 PM, Richard Sandiford wrote: > > Dennis Zhang writes: > >> diff --git a/gcc/config/aarch64/aarch64-simd-builtins.def > >> b/gcc/config/aarch64/aarch64-simd-builtins.def > >> index 332a0b6b1ea..3

Re: [committed] libstdc++: Fix constraints on std::optional comparisons [PR 96269]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
On 05/11/20 19:09 +, Jonathan Wakely wrote: The relational operators for std::optional were using the wrong types in the declval expressions used to constrain them. Instead of using const lvalues they were using non-const rvalues, which meant that a type might satisfy the constraints but then

Re: [PATCH] generalized range_query class for multiple contexts

2020-11-05 Thread Martin Sebor via Gcc-patches
On 10/1/20 11:25 AM, Martin Sebor wrote: On 10/1/20 9:34 AM, Aldy Hernandez wrote: On 10/1/20 3:22 PM, Andrew MacLeod wrote:  > On 10/1/20 5:05 AM, Aldy Hernandez via Gcc-patches wrote:  >>> Thanks for doing all this!  There isn't anything I don't understand  >>> in the sprintf changes so no q

[r11-4733 Regression] FAIL: gcc.dg/guality/pr54519-4.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects -DPREVENT_OPTIMIZATION line 17 y == 25 on Linux/x86_64

2020-11-05 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 1436ef2a57e79b6b8ce5b03e32a38dd64f46c97c is the first bad commit commit 1436ef2a57e79b6b8ce5b03e32a38dd64f46c97c Author: Richard Biener Date: Thu Nov 5 09:27:28 2020 +0100 debug/97718 - fix abstract origin references after last change caused FAIL: gcc.dg/guality/pr54519-

[committed] libstdc++: Fix constraints on std::optional comparisons [PR 96269]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
The relational operators for std::optional were using the wrong types in the declval expressions used to constrain them. Instead of using const lvalues they were using non-const rvalues, which meant that a type might satisfy the constraints but then give an error when the function body was instanti

Re: [00/32] C++ 20 Modules

2020-11-05 Thread Richard Biener via Gcc-patches
On November 5, 2020 4:25:23 PM GMT+01:00, Nathan Sidwell wrote: >On 11/5/20 8:33 AM, Richard Biener wrote: > >> Moving the module mapper to a more easily (build-)testable location >> and to a place where host dependences can be more easily fixed >> & customized than in a bootstrapped directory wou

[patch] vxworks, aarch64: Handle use of r18 as a TCB pointer

2020-11-05 Thread Olivier Hainque
Instead of #define TARGET_OS_USES_R18 which is not handled, pick R9 as an alternate static chain regnum and document that the port needs to be configured to issue -ffixed-r18 by default. r9 is now available after the approval at https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558094.ht

Re: deprecations in OpenMP 5.0

2020-11-05 Thread Jakub Jelinek via Gcc-patches
On Thu, Nov 05, 2020 at 06:18:11PM +, Kwok Cheung Yeung wrote: > I have run the tests (with _OPENMP >= 201511) and added > -Wno-deprecated-declarations option to the testcases that trigger the > deprecation warning. > > I also found a bug in the previous version of the patch - C++ doesn't like

Re: deprecations in OpenMP 5.0

2020-11-05 Thread Kwok Cheung Yeung
On 04/11/2020 2:33 pm, Jakub Jelinek wrote: LGTM, except: + omp_lock_hint_contended __GOMP_DEPRECATED_5_0 = omp_sync_hint_contended, omp_sync_hint_nonspeculative = 4, - omp_lock_hint_nonspeculative = omp_sync_hint_nonspeculative, + omp_lock_hint_nonspeculative __GOMP_DEPRECATED_5_0 = om

Re: [committed 1/2] libstdc++: Fix multiple definitions of std::exception_ptr functions [PR 97729]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
This fixes some multiple definition errors caused by the changes for PR libstdc++/90295. The previous solution for inlining the members of std::exception_ptr but still exporting them from the library was to suppress the 'inline' keyword on those functions when compiling libsupc++/eh_ptr.cc, so the

[committed] libstdc++: Use non-throwing increment in recursive_directory_iterator [PR 97731]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
As described in the PR, the recursive_directory_iterator constructor calls advance(ec), but ec is a pointer so it calls _Dir::advance(bool). The intention was to either call advance() or advance(*ec) depending whether the pointer is null or not. This fixes the bug and renames the parameter to ecpt

[committed 1/2] libstdc++: Export basic_stringbuf constructor [PR 97729]

2020-11-05 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: PR libstdc++/97729 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports. * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate private constructor taking __xfer_bufptrs. Tested powerpc64le-linux. Committed to trunk. commit 50b840ac5e

Re: Fix uninitialized memory use in ipa-modref

2020-11-05 Thread Jan Hubicka
> > On 11/5/20 3:27 PM, Jan Hubicka wrote: > > > poly_int64 offset; > > > struct modref_parm_map parm_map; > > > + parm_map.parm_offset_known = false; > > > + parm_map.parm_offset = 0; > > > + > > > > I'm curious, can't we use a proper C++ class construction. > > The IPA pass is new and

Re: [ping] aarch64: move and adjust PROBE_STACK_*_REG

2020-11-05 Thread Olivier Hainque
Hi Richard, > On 4 Nov 2020, at 20:04, Richard Sandiford wrote: > > It's a bit concerning that the second register now overlaps > STACK_CLASH_SVE_CFA_REGNUM, but I agree that isn't a problem > in practice, since the two uses are currently mutually-exclusive. > I think it might be worth having a

Re: Fix uninitialized memory use in ipa-modref

2020-11-05 Thread Jan Hubicka
> On 11/5/20 3:27 PM, Jan Hubicka wrote: > > poly_int64 offset; > > struct modref_parm_map parm_map; > > + parm_map.parm_offset_known = false; > > + parm_map.parm_offset = 0; > > + > > I'm curious, can't we use a proper C++ class construction. > The IPA pass is new and so we can make it

Re: [00/32] C++ 20 Modules

2020-11-05 Thread Nathan Sidwell
On 11/5/20 2:08 AM, Boris Kolpackov wrote: To give an example of such a likely change, currently the mapper has a notion of the central module repository directory that is used to resolve all the relative CMI (compiled module interface[1]) paths (even paths like ./foo.gcm). However, this model

[committed][PATCH] middle-end: guard slp-11b.c testcase on vec_lanes

2020-11-05 Thread Tamar Christina via Gcc-patches
Hi All, They say third time is the charm.. It looks like the testcase disables the cost model and so AArch64 we end up being able to do the permute but on x86 we can't. However when analyzing the testcase I didn't disable the cost model hence the difference. So I now guard the testcase on vect_l

Re: Fix uninitialized memory use in ipa-modref

2020-11-05 Thread Martin Liška
On 11/5/20 3:27 PM, Jan Hubicka wrote: poly_int64 offset; struct modref_parm_map parm_map; + parm_map.parm_offset_known = false; + parm_map.parm_offset = 0; + I'm curious, can't we use a proper C++ class construction. The IPA pass is new and so we can make it more C++-ish? Similar

Re: [PATCH] cache compute_objsize results in strlen/sprintf (PR 97373)

2020-11-05 Thread Martin Sebor via Gcc-patches
On 11/5/20 8:29 AM, Jakub Jelinek wrote: On Thu, Nov 05, 2020 at 08:20:20AM -0700, Martin Sebor via Gcc-patches wrote: compute_objsize() and the objsz pass are completely independent. The pass is also quite limited in that it doesn't make use of ranges. That limitation was also the main reason

[PATCH] Drop overflow from constants while building ranges in ranger.

2020-11-05 Thread Aldy Hernandez via Gcc-patches
Sometimes the overflow flag will leak into the IL. Drop it while creating ranges. There are various places we could plug this. This patch just plugs things at get_tree_range which is the entry point for ranges from tree expressions. It fixes the PR, and probably fixes the ranger entirely, but we

[PATCH] c++: Consider only relevant template arguments in sat_hasher

2020-11-05 Thread Patrick Palka via Gcc-patches
[ This patch depends on c++: Use two levels of caching in satisfy_atom https://gcc.gnu.org/pipermail/gcc-patches/2020-November/558096.html ] A large source of cache misses in satisfy_atom is caused by the identity of an (atom,args) pair within the satisfaction cache being determined by the

Re: [PATCH][AArch64] Use intrinsics for upper saturating shift right

2020-11-05 Thread David Candler via Gcc-patches
Hi Richard, Thanks for the feedback. Richard Sandiford writes: > > diff --git a/gcc/config/aarch64/aarch64-builtins.c > > b/gcc/config/aarch64/aarch64-builtins.c > > index 4f33dd936c7..f93f4e29c89 100644 > > --- a/gcc/config/aarch64/aarch64-builtins.c > > +++ b/gcc/config/aarch64/aarch64-builti

[PATCH] c++: Add -Wexceptions warning option [PR97675]

2020-11-05 Thread Marek Polacek via Gcc-patches
This PR asks that we add a warning option for an existing (very old) warning, so that it can be disabled selectively. clang++ uses -Wexceptions for this, so I added this new option rather than using e.g. -Wnoexcept. gcc/c-family/ChangeLog: PR c++/97675 * c.opt (Wexceptions): New

[PATCH] AArch64: Improve inline memcpy expansion

2020-11-05 Thread Wilco Dijkstra via Gcc-patches
Improve the inline memcpy expansion. Use integer load/store for copies <= 24 bytes instead of SIMD. Set the maximum copy to expand to 256 by default, except that -Os or no Neon expands up to 128 bytes. When using LDP/STP of Q-registers, also use Q-register accesses for the unaligned tail, sav

Re: [PATCH v4] c++: Implement -Wvexing-parse [PR25814]

2020-11-05 Thread Marek Polacek via Gcc-patches
On Fri, Oct 30, 2020 at 04:33:48PM -0400, Jason Merrill wrote: > On 10/29/20 11:00 PM, Marek Polacek wrote: > > Gotcha. Now we do most of the work in warn_about_ambiguous_parse. > > Thanks, just a few tweaks left. > > --- a/gcc/cp/decl.c > > +++ b/gcc/cp/decl.c > > @@ -4378,6 +4378,9 @@ cxx_init_

Re: [PATCH] cache compute_objsize results in strlen/sprintf (PR 97373)

2020-11-05 Thread Jakub Jelinek via Gcc-patches
On Thu, Nov 05, 2020 at 08:20:20AM -0700, Martin Sebor via Gcc-patches wrote: > compute_objsize() and the objsz pass are completely independent. > The pass is also quite limited in that it doesn't make use of > ranges. That limitation was also the main reason for introducing > the compute_objsize(

Re: [00/32] C++ 20 Modules

2020-11-05 Thread Nathan Sidwell
On 11/5/20 8:33 AM, Richard Biener wrote: Moving the module mapper to a more easily (build-)testable location and to a place where host dependences can be more easily fixed & customized than in a bootstrapped directory would be nice. Thus, I think the module mapper should be in the toplevel som

Re: [PATCH] cache compute_objsize results in strlen/sprintf (PR 97373)

2020-11-05 Thread Martin Sebor via Gcc-patches
On 11/5/20 12:31 AM, Richard Biener wrote: On Thu, Nov 5, 2020 at 1:59 AM Martin Sebor via Gcc-patches wrote: To determine the target of a pointer expression and the offset into it, the increasingly widely used compute_objsize function traverses the IL following the DEF statements of pointer v

[committed] diagnostic paths: loosen coupling between path-printing and path_summary

2020-11-05 Thread David Malcolm via Gcc-patches
Doing this makes followup work to add HTML path-printing cleaner. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as f8cc59ef4941c19d068b9dfe4e13753c9fd402c6. gcc/ChangeLog: * tree-diagnostic-path.cc (struct path_summary::event_range): Move out of p

[committed] analyzer: fix ICE comparing COMPLEX_CSTs [PR97668]

2020-11-05 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as r11-4740-g54cbdb528df16686290ad26e2130a1896915639d. gcc/analyzer/ChangeLog: PR analyzer/97668 * svalue.cc (cmp_cst): Handle COMPLEX_CST. gcc/testsuite/ChangeLog: PR analyzer/97668 *

Re: [PATCH] "used" attribute saves decl from linker garbage collection

2020-11-05 Thread H.J. Lu via Gcc-patches
On Thu, Nov 5, 2020 at 3:37 AM Jozef Lawrynowicz wrote: > > On Thu, Nov 05, 2020 at 06:21:21AM -0500, Hans-Peter Nilsson wrote: > > On Wed, 4 Nov 2020, H.J. Lu wrote: > > > .retain is ill-defined. For example, > > > > > > [hjl@gnu-cfl-2 gcc]$ cat /tmp/x.c > > > static int xyzzy __attribute__((__

  1   2   >