[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

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 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

[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

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

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] 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] 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 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] 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] 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

[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 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

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] [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: [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: [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: [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

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

[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

[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

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

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] 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] 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

[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.

<    1   2