Re: [PATCH] Objective-C : Implement NSObject attribute.

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/10/20 4:43 PM, Iain Sandoe wrote: > Hi Jeff, > > Jeff Law wrote: >>> >>> This attribute allows pointers to be marked as pointers to >>> an NSObject-compatible object.  This allows for additional > >> >> OK with a suitable update to documentation.  I have no idea the >> attribute is suppose

[committed] libstdc++: Avoid bad_alloc exceptions when changing locales

2020-11-10 Thread Jonathan Wakely via Gcc-patches
For the --enable-clocale=generic configuration, the current code can fail with a bad_alloc exception. This patch uses the nothrow version of operator new and reports allocation failures by setting failbit in the iostate variable. * config/locale/generic/c_locale.cc (__set_C_locale()): New

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-10 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 10, 2020 at 04:48:10PM -0700, Jeff Law via Gcc-patches wrote: > > @@ -486,10 +425,10 @@ > > SItype > > __bswapsi2 (SItype u) > > { > > - return u) & 0xff00) >> 24) > > - | (((u) & 0x00ff) >> 8) > > - | (((u) & 0xff00) << 8) > > - | (((u) & 0x00ff) <

Re: [PATCH] Better __ashlDI3, __ashrDI3 and __lshrDI3 functions, plus fixed __bswapsi2 function

2020-11-10 Thread Andreas Schwab
On Nov 10 2020, Stefan Kanthak wrote: > Eric Botcazou wrote: > >>> The implementation of the __ashlDI3(), __ashrDI3() and __lshrDI3() functions >>> is rather bad, it yields bad machine code at least on i386 and AMD64. Since >>> GCC knows how to shift integers twice the register size these functio

Re: [PATCH] Add a new pattern in 4-insn combine

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/8/20 7:48 PM, HAO CHEN GUI via Gcc-patches wrote: > Hi, > > This patch adds a new pattern in 4-insn combine. It supports the > following sign_extend(op: zero_extend, zero_extend) optimization. In > the patch, newpat is split twice. The first split becomes newi1pat and > the second becomes n

[committed] libstdc++: Implement std::emit_on_flush etc.

2020-11-10 Thread Jonathan Wakely via Gcc-patches
This adds the manipulators for use with basic_osyncstream. In order to detect when an arbitrary basic_ostream is the base class of a basic_syncbuf object, introduce a new intermediate base class that stores the data members. The new base class stores a pointer and two bools, which wastes (sizeof(vo

Re: [Patch, testsuite]: Update MicroBlaze strings test

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/8/20 10:58 PM, Nagaraju Mekala wrote: > Hello All, > > for new scan-assembly output resulting in use of $LC label > > gcc/testsuite/ChangeLog: > * gcc.target/microblaze/others/strings1.c: Update > to include $LC label. Thanks.  Installed on the trunk. jeff

Re: [PATCH] c++: Improve static_assert diagnostic [PR97518]

2020-11-10 Thread Marek Polacek via Gcc-patches
On Tue, Nov 10, 2020 at 02:30:30PM -0500, Jason Merrill via Gcc-patches wrote: > On 11/10/20 2:28 PM, Marek Polacek wrote: > > On Tue, Nov 10, 2020 at 02:15:56PM -0500, Jason Merrill wrote: > > > On 11/10/20 1:59 PM, Marek Polacek wrote: > > > > On Tue, Nov 10, 2020 at 11:32:04AM -0500, Jason Merri

Re: [PATCH][MIPS] PR target/77510 Reduce size of MIPS core automaton

2020-11-10 Thread Paul Koning via Gcc-patches
> On Nov 10, 2020, at 6:09 PM, Jeff Law via Gcc-patches > wrote: > >> ... >> ChangeLog >> >> gcc/ >> PR target/77510 >> * config/mips/gs464.md: Reduce reservation >> duration to 10 cycles. >> * config/mips/i6400.md: Likewise. >> * config/mips/m5100.md: Likewise. >> * con

Re: [PATCH][MIPS] PR target/77510 Reduce size of MIPS core automaton

2020-11-10 Thread Xu Chenghua
Hi: I test spec cpu 2000 on Loongson 3A1000(gs464),  there is no difference in performance. On 11/10/20 11:45 PM, Paul Koning wrote: On Nov 10, 2020, at 6:42 AM, Xu Chenghua wrote: Hi: This patch reduce reservation of model do not more than 10 cycles. The memory of genautomata down to 1

introduce overridable clear_cache emitter

2020-11-10 Thread Alexandre Oliva
This patch introduces maybe_emit_call_builtin___clear_cache for the builtin expander machinery and the trampoline initializers to use to clear the instruction cache, removing a source of inconsistencies and subtle errors in low-level machinery. I've adjusted all trampoline_init implementations t

Re: testsuite: Adjust pr96789.c to exclude vect_load_lanes

2020-11-10 Thread Kewen.Lin via Gcc-patches
Hi Richard, Thanks for the review! on 2020/11/10 下午7:31, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi, >> >> As Lyon pointed out, the newly introduced test case >> gcc.dg/tree-ssa/pr96789.c fails on arm-none-linux-gnueabihf. >> Loop vectorizer is able to vectorize the two loops which >>

[PATCH] RISC-V: Enable ifunc if it was supported in the binutils for linux toolchain.

2020-11-10 Thread Nelson Chu
gcc/ * configure: Regenerated. * configure.ac: If ifunc was supported in the binutils for linux toolchain, then set enable_gnu_indirect_function to yes. --- gcc/configure| 37 + gcc/configure.ac | 35 ++

Re: [Patch, microblaze]: Correct the const high double immediate value

2020-11-10 Thread Michael Eager
On 11/8/20 9:43 PM, Nagaraju Mekala wrote: diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index a0f81b7..d9341ec 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -2440,15 +2440,18 @@ print_operand (FILE * file, rtx

Re: [PATCH 2/3] Refactor section name ref counting

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/12/19 11:28 PM, Strager Neds wrote: > symtab_node::set_section_for_node manages the reference count of > section_hash_entry objects. I plan to add another function which needs > to manage the reference count of these objects. To avoid duplicating > code, factor the existing logic into reusa

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Alan Modra via Gcc-patches
On Tue, Nov 10, 2020 at 11:45:37AM -0700, Jeff Law wrote: > > On 11/12/19 11:28 PM, Strager Neds wrote: > > * gcc/cgraph.h (symtab_node::get_section): Constify. > > (symtab_node::set_section): Declare new overload. > > * gcc/symtab.c (symtab_node::set_section): Define new overload. > > (symtab_nod

Re: [PATCH][MIPS] PR target/77510 Reduce size of MIPS core automaton

2020-11-10 Thread Paul Hua via Gcc-patches
> > This patch reduce reservation of model do not more than 10 cycles. The > > memory of genautomata down to 1GB. > > How bad is the memory consumption before this change? > almost 2.4GB. see bugzilla comment #4. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77510#c4

Re: [PATCH 3/3] Improve efficiency of copying section from another tree

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/12/19 11:29 PM, Strager Neds wrote: > Several parts of GCC need to copy a section name from one tree (or > symtab_node) to another. Currently, this is implemented naively: > > 1. Query the source's section name > 2. Hash the section name string > 3. Find the section_hash_entry in the symbol

Re: [PATCH][MIPS] PR target/77510 Reduce size of MIPS core automaton

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/10/20 8:57 PM, Paul Hua wrote: >>> This patch reduce reservation of model do not more than 10 cycles. The >>> memory of genautomata down to 1GB. >> How bad is the memory consumption before this change? >> > almost 2.4GB. > see bugzilla comment #4. > https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: [PATCH] Objective-C++ : Allow prefix attrs on linkage specs.

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/7/20 8:11 AM, Iain Sandoe wrote: > Hi, > > For Objective-C++/C, we cater for the possibility that a class interface > (@interface) might be preceded by prefix attributes. In the case of > Objective-C++, the reference implementation (a.k.a. clang) also allows > (and combines) prefix attribu

Re: [PATCH] CFI-handling : Add a hook to allow target-specific Personality and LSDA indirections.

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/7/20 8:41 AM, Iain Sandoe wrote: > Hi > > ** Actually, this was originally posted during last stage-1, but I forgot to > keep >pinging it… > > > > At present, the output of .cfi_personality and .cfi_lsda assumes > ELF semantics for indirections. This isn't suitable for all target

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Jeff Law via Gcc-patches
On 11/10/20 8:57 PM, Alan Modra wrote: > On Tue, Nov 10, 2020 at 11:45:37AM -0700, Jeff Law wrote: >> On 11/12/19 11:28 PM, Strager Neds wrote: >>> * gcc/cgraph.h (symtab_node::get_section): Constify. >>> (symtab_node::set_section): Declare new overload. >>> * gcc/symtab.c (symtab_node::set_secti

Re: [PATCH 1/3] Refactor copying decl section names

2020-11-10 Thread Alan Modra via Gcc-patches
On Tue, Nov 10, 2020 at 09:19:37PM -0700, Jeff Law wrote: > I think the const char * is fine. That should force resolution to the > same routine we were using earlier. Do you want to commit that fix or > shall I? Commited 693a79a355e1. -- Alan Modra Australia Development Lab, IBM

RE: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-11-10 Thread xiezhiheng
> -Original Message- > From: Richard Sandiford [mailto:richard.sandif...@arm.com] > Sent: Tuesday, November 10, 2020 7:54 PM > To: xiezhiheng > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions > emitted at -O3 > > xiezhiheng writes: > >>

<    1   2