Re: [PATCH] Don't clobber dominator info in the combiner (PR target/77526)

2016-09-15 Thread Richard Biener
On Fri, 16 Sep 2016, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, combiner sometimes calls > purge_all_dead_edges or purge_dead_edges that can invalidate the dominator > info if it is computed. Other passes like CSE in that case free the > dominance info, this patch does the same in th

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-09-15 Thread Felipe Magno de Almeida
Hello, Another patch. On Fri, Sep 16, 2016 at 2:53 AM, Felipe Magno de Almeida wrote: > On Fri, Sep 16, 2016 at 2:42 AM, Marc Glisse wrote: >> On Thu, 15 Sep 2016, Felipe Magno de Almeida wrote: >> >> + || sizeof(uint32_t) == sizeof(void*) >> +|| sizeof(uint16_t) =

Re: [PATCH] have __builtin_object_size handle POINTER_PLUS with non-const offset

2016-09-15 Thread kugan
Hi, On 16/09/16 13:29, Martin Sebor wrote: __builtin_object_size fails for POINTER_PLUS expressions involving non-constant offsets into objects of known size, causing GCC to fail to detect (and add instrumentation to prevent) buffer overflow in some basic cases such as the following: void f

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-09-15 Thread kugan
Hi Richard, Thanks for the review. On 14/09/16 22:04, Richard Biener wrote: On Tue, Aug 23, 2016 at 4:11 AM, Kugan Vivekanandarajah wrote: Hi, On 19 August 2016 at 21:41, Richard Biener wrote: On Tue, Aug 16, 2016 at 9:45 AM, kugan wrote: Hi Richard, I am now having -ftree-evrp which

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-09-15 Thread Felipe Magno de Almeida
On Fri, Sep 16, 2016 at 2:42 AM, Marc Glisse wrote: > On Thu, 15 Sep 2016, Felipe Magno de Almeida wrote: > > + || sizeof(uint32_t) == sizeof(void*) > +|| sizeof(uint16_t) == sizeof(void*), > > Indentation is off? > >> Call _M_extract_* functions family through tempor

Re: [PATCH] Fix neg overflow expansion (PR middle-end/77594)

2016-09-15 Thread Richard Biener
On September 16, 2016 12:48:04 AM GMT+02:00, Jakub Jelinek wrote: >Hi! > >As mentioned in the PR, during expand_arith_overflow expansion >expand_neg_overflow falls through into expand_addsub_overflow, so >expands >roughly the same code twice and keeps perhaps the less efficient >version >around.

Re: Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-09-15 Thread Marc Glisse
On Thu, 15 Sep 2016, Felipe Magno de Almeida wrote: + || sizeof(uint32_t) == sizeof(void*) +|| sizeof(uint16_t) == sizeof(void*), Indentation is off? Call _M_extract_* functions family through temporary int objects Would it make sense to use a template type inst

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-15 Thread Yuan, Pengfei
> > Setting PARAM_EARLY_INLINING_INSNS to 0 when FDO is enabled should be > > equivalent to my patch. > > Yes. This means it's easy to experiment with other values than zero. > Basically > early inlining is supposed to remove abstraction penalty to > > a) reduce FDO instrumentation overhead >

[PATCH] have __builtin_object_size handle POINTER_PLUS with non-const offset

2016-09-15 Thread Martin Sebor
__builtin_object_size fails for POINTER_PLUS expressions involving non-constant offsets into objects of known size, causing GCC to fail to detect (and add instrumentation to prevent) buffer overflow in some basic cases such as the following: void f (unsigned i) { char d [3]; memcpy (d

Fix compilation errors with libstdc++v3 for AVR target and allow --enable-libstdcxx

2016-09-15 Thread Felipe Magno de Almeida
Hello, I've fixed a few compilation errors with libstdc++v3 with AVR-Libc and was even able to use boost.spirit x3 with small patches to boost as well. Attached is the patch. Please don't hesitate to ask modifications for upstream inclusion. Right now std::cout is not working (and just include'

Re: [patch,gomp4] Fix PR74600

2016-09-15 Thread Cesar Philippidis
On 09/09/2016 03:34 PM, Cesar Philippidis wrote: > By design, the libgomp OpenACC runtime prohibits data clauses with > aliased addresses from being used in the same construct. E.g., the user > is not allowed to specify > > #pragma acc parallel copy(var[0:10]) copy(pvar[0:10]) > > where pvar is

Fortran, committed: ICE out of memory on displaced implicit character (pr 69963)

2016-09-15 Thread Louis Krupp
Fixed in revision 240168.

[committed] fix-it hints can't contain newlines (yet)

2016-09-15 Thread David Malcolm
I hope to implement newline support within fix-it hints at some point, but currently it's not supported, and leads to misleading diagnostic output, so for now, fail gracefully. Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. Committed to trunk as r240169. gcc/ChangeLog: * diagn

Re: [PATCH] Don't clobber dominator info in the combiner (PR target/77526)

2016-09-15 Thread Jakub Jelinek
On Thu, Sep 15, 2016 at 06:20:11PM -0500, Segher Boessenkool wrote: > On Fri, Sep 16, 2016 at 12:50:44AM +0200, Jakub Jelinek wrote: > > As mentioned in the PR, combiner sometimes calls > > purge_all_dead_edges or purge_dead_edges that can invalidate the dominator > > info if it is computed. Other

Re: [PATCH] Don't clobber dominator info in the combiner (PR target/77526)

2016-09-15 Thread Segher Boessenkool
Hi Jakub, On Fri, Sep 16, 2016 at 12:50:44AM +0200, Jakub Jelinek wrote: > As mentioned in the PR, combiner sometimes calls > purge_all_dead_edges or purge_dead_edges that can invalidate the dominator > info if it is computed. Other passes like CSE in that case free the > dominance info, this pat

[PATCH PR other/77609] Let the assembler choose ELF section types for miscellaneous named sections

2016-09-15 Thread Roland McGrath
This fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77609 (which I've just filed). OK for trunk? I'm not sure if this kind of fix is appropriate for gcc-6-branch or not, but I'd like to backport it there too if it is acceptable. Thanks, Roland gcc/ 2016-09-15 Roland McGrath < P

[PATCH] Don't clobber dominator info in the combiner (PR target/77526)

2016-09-15 Thread Jakub Jelinek
Hi! As mentioned in the PR, combiner sometimes calls purge_all_dead_edges or purge_dead_edges that can invalidate the dominator info if it is computed. Other passes like CSE in that case free the dominance info, this patch does the same in the combiner. Bootstrapped/regtested on x86_64-linux and

[PATCH] Fix neg overflow expansion (PR middle-end/77594)

2016-09-15 Thread Jakub Jelinek
Hi! As mentioned in the PR, during expand_arith_overflow expansion expand_neg_overflow falls through into expand_addsub_overflow, so expands roughly the same code twice and keeps perhaps the less efficient version around. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for

Re: C/C++ PATCH to implement -Wbool-operation (PR c/77490)

2016-09-15 Thread Eric Gallager
Hi, I have some comments/questions in-line: On 9/15/16, Marek Polacek wrote: > Now that the C++ FE boolean in/decrement changes are in, I can move > forwards with this patch which implements a new warning named -Wbool-operation > (better names?) which warns about nonsensical code such as ~bool, ~

Re: Debug algorithms

2016-09-15 Thread François Dumont
On 14/09/2016 12:33, Jonathan Wakely wrote: On 06/09/16 22:26 +0200, François Dumont wrote: Hi Any final decision regarding this patch ? Note that __std_a namespace is optional, I can remove this change from the patch if you want. Can you describe what difference that would make? Th

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-15 Thread Bernd Edlinger
On 09/15/16 21:54, Jason Merrill wrote: > On Thu, Sep 15, 2016 at 1:42 PM, Joseph Myers wrote: >> On Thu, 15 Sep 2016, Bernd Edlinger wrote: >> >>> So level 1 could be enabled with -Wall and level 2 could be enabled >>> with -pedantic and/or -Wpedantic. >> >> But this warning has absolutely nothin

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-15 Thread Jason Merrill
On Thu, Sep 15, 2016 at 1:42 PM, Joseph Myers wrote: > On Thu, 15 Sep 2016, Bernd Edlinger wrote: > >> So level 1 could be enabled with -Wall and level 2 could be enabled >> with -pedantic and/or -Wpedantic. > > But this warning has absolutely nothing to do with things that are > prohibited by, or

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-15 Thread Jason Merrill
OK, one more: On Thu, Sep 15, 2016 at 8:12 AM, Christophe Lyon wrote: > On 15 September 2016 at 11:26, Rainer Orth > wrote: >> Hi Jason, >> I confirm no change on arm* either. On aarch64, gen-attrs-[25]1.C, and devirt-33 now work. name-clash11.C still fails on both targets >>> >>

Re: C/C++ PATCH for c/77423 (bogus warning with -Wlogical-not-parentheses)

2016-09-15 Thread Jeff Law
On 09/05/2016 08:28 AM, Marek Polacek wrote: test.c:10:8: note: add parentheses around left hand side expression to silence this warning r += !a == ~b; ^~ ( ) this will not fix it, but make it worse. I think a better warning would be warning: ~ on boolean value, did you me

Re: [PATCH] C: fixits for modernizing structure member designators

2016-09-15 Thread David Malcolm
On Thu, 2016-09-15 at 11:27 -0600, Jeff Law wrote: > On 08/30/2016 08:38 AM, David Malcolm wrote: > > This patch adds fix-it hints to our warning for old-style structure > > member designators, showing how to modernize them to C99 form. > > > > For example: > > > > modernize-named-inits.c:19:5: w

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-15 Thread Joseph Myers
On Thu, 15 Sep 2016, Bernd Edlinger wrote: > So level 1 could be enabled with -Wall and level 2 could be enabled > with -pedantic and/or -Wpedantic. But this warning has absolutely nothing to do with things that are prohibited by, or undefined in, ISO standards, and so it would be completely in

Re: [PATCH] C: fixits for modernizing structure member designators

2016-09-15 Thread Jeff Law
On 08/30/2016 08:38 AM, David Malcolm wrote: This patch adds fix-it hints to our warning for old-style structure member designators, showing how to modernize them to C99 form. For example: modernize-named-inits.c:19:5: warning: obsolete use of designated initializer with ‘:’ [-Wpedantic] foo

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-15 Thread Trevor Saunders
On Thu, Sep 15, 2016 at 10:27:56AM -0600, Jeff Law wrote: > On 09/15/2016 10:10 AM, Trevor Saunders wrote: > > On Thu, Sep 15, 2016 at 12:52:59PM +0200, Bernd Schmidt wrote: > > > On 09/14/2016 09:21 PM, tbsaunde+...@tbsaunde.org wrote: > > > > > > > Basically $subject. First change variable's ty

Re: [PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped

2016-09-15 Thread Jeff Law
On 09/14/2016 04:11 PM, Segher Boessenkool wrote: On Wed, Sep 14, 2016 at 01:33:04PM -0600, Jeff Law wrote: On 09/14/2016 01:03 PM, Segher Boessenkool wrote: If you think about it, conceptually we want the return insn to make the callee saved registers "used" so that DCE, regrename and friends

Re: [PATCH] Improve string::clear() performance

2016-09-15 Thread Cong Wang
On Thu, Sep 15, 2016 at 2:08 AM, Jonathan Wakely wrote: > On 14/09/16 10:41 -0700, Cong Wang wrote: >> >> For long term, I think gcc should have something as simple as >> 'Signed-off-by' for Linux kernel, otherwise too much work for first-time >> contributors like me. We all want to save time on t

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-15 Thread Bernd Edlinger
On 09/15/16 18:23, Jeff Law wrote: > On 09/15/2016 10:00 AM, Bernd Edlinger wrote: >> On 09/15/16 17:44, Jeff Law wrote: >>> On 09/14/2016 12:11 PM, Jason Merrill wrote: I think we could have both, where the weaker form is part of -Wall and people can explicitly select the stronger f

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate components

2016-09-15 Thread Jeff Law
On 09/14/2016 07:38 AM, Segher Boessenkool wrote: On Mon, Sep 12, 2016 at 12:02:50PM -0600, Jeff Law wrote: As a final optimisation, if a block needs a prologue and its immediate dominator has the block as a post-dominator, the dominator gets the prologue as well. So why not just put it in the

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Wilco Dijkstra
Jakub Jelinek > > Those are the generic definitions, all targets that care about performance > obviously should replace them with assembly code. No, that's exactly my point, it is not true that it is always best to write assembly code. For example there is absolutely no benefit in writing an opt

Re: [PATCH] Allow FP to be used as a call-saved registe

2016-09-15 Thread Jeff Law
On 09/13/2016 05:10 AM, Tamar Christina wrote: Hi Jeff, On 12/09/16 18:16, Jeff Law wrote: On 09/05/2016 08:59 AM, Tamar Christina wrote: Hi All, This patch allows the FP register to be used as a call-saved register when -fomit-frame-pointer is used. The change is done in such a way that th

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-15 Thread Jeff Law
On 09/15/2016 10:10 AM, Trevor Saunders wrote: On Thu, Sep 15, 2016 at 12:52:59PM +0200, Bernd Schmidt wrote: On 09/14/2016 09:21 PM, tbsaunde+...@tbsaunde.org wrote: Basically $subject. First change variable's type to rtx_insn * where possible. Then change the functions and fixup callers whe

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-15 Thread Jeff Law
On 09/15/2016 10:00 AM, Bernd Edlinger wrote: On 09/15/16 17:44, Jeff Law wrote: On 09/14/2016 12:11 PM, Jason Merrill wrote: I think we could have both, where the weaker form is part of -Wall and people can explicitly select the stronger form. That's been a fairly standard way to handle this

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-15 Thread Richard Biener
On September 15, 2016 5:52:34 PM GMT+02:00, Jeff Law wrote: >On 09/14/2016 02:24 AM, Richard Biener wrote: >> On Tue, Sep 13, 2016 at 6:15 PM, Jeff Law wrote: >>> On 09/13/2016 02:41 AM, Jakub Jelinek wrote: On Mon, Sep 12, 2016 at 04:19:32PM +, Tamar Christina wrote: > > Th

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-15 Thread Trevor Saunders
On Thu, Sep 15, 2016 at 12:52:59PM +0200, Bernd Schmidt wrote: > On 09/14/2016 09:21 PM, tbsaunde+...@tbsaunde.org wrote: > > > Basically $subject. First change variable's type to rtx_insn * where > > possible. > > Then change the functions and fixup callers where it is still necessary to > > ca

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-15 Thread Bernd Edlinger
On 09/15/16 17:44, Jeff Law wrote: > On 09/14/2016 12:11 PM, Jason Merrill wrote: >> >> I think we could have both, where the weaker form is part of -Wall and >> people can explicitly select the stronger form. > That's been a fairly standard way to handle this kind of thing. It > works for me. > >

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-15 Thread Jeff Law
On 09/14/2016 02:24 AM, Richard Biener wrote: On Tue, Sep 13, 2016 at 6:15 PM, Jeff Law wrote: On 09/13/2016 02:41 AM, Jakub Jelinek wrote: On Mon, Sep 12, 2016 at 04:19:32PM +, Tamar Christina wrote: This patch adds an optimized route to the fpclassify builtin for floating point number

Re: [TREE-SSA-CCP] Issue warning when folding condition

2016-09-15 Thread Jeff Law
On 09/14/2016 03:00 AM, Richard Biener wrote: On Tue, 13 Sep 2016, kugan wrote: Hi Richard, On 19/08/16 18:00, Richard Biener wrote: On Fri, 19 Aug 2016, Kugan Vivekanandarajah wrote: On 19 August 2016 at 12:09, Kugan Vivekanandarajah wrote: The testcase pr33738.C for warning fails with

Re: [PATCH, updated] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-15 Thread Jeff Law
On 09/14/2016 12:11 PM, Jason Merrill wrote: I think we could have both, where the weaker form is part of -Wall and people can explicitly select the stronger form. That's been a fairly standard way to handle this kind of thing. It works for me. Jeff

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Jakub Jelinek
On Thu, Sep 15, 2016 at 03:27:52PM +, Wilco Dijkstra wrote: > That's best done GCC as a general optimization as currently mempcpy is not > handled efficiently (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70140), > and it avoids having to repeat this for every C library out there... > > g

C/C++ PATCH to implement -Wbool-operation (PR c/77490)

2016-09-15 Thread Marek Polacek
Now that the C++ FE boolean in/decrement changes are in, I can move forwards with this patch which implements a new warning named -Wbool-operation (better names?) which warns about nonsensical code such as ~bool, ~(i == 10), or bool-- (in C). It could also warn for other operations such as * or /

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Wilco Dijkstra
From: Jakub Jelinek > On Thu, Sep 15, 2016 at 02:55:48PM +, Wilco Dijkstra wrote: >> stpcpy is not conceptually the same, but for mempcpy, yes. By default >> it's converted into memcpy in the GLIBC headers and the generic >> implementation. >> >> stpcpy uses strlen and memcpy which is genera

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Wilco Dijkstra
Jakub Jelinek wrote: On Thu, Sep 15, 2016 at 03:16:52PM +0100, Szabolcs Nagy wrote: > > > > from libc point of view, rawmemchr is a rarely used > > nonstandard function that should be optimized for size. > > (glibc does not do this now, but it should in my opinion.) > > rawmemchr with 0 is to strl

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Jakub Jelinek
On Thu, Sep 15, 2016 at 02:55:48PM +, Wilco Dijkstra wrote: > Jakub Jelinek wrote: > On Thu, Sep 15, 2016 at 03:16:52PM +0100, Szabolcs Nagy wrote: > > > > > > from libc point of view, rawmemchr is a rarely used > > > nonstandard function that should be optimized for size. > > > (glibc does no

[patch,gomp4] add support for fortran common blocks

2016-09-15 Thread Cesar Philippidis
Currently gfortran largely lacks support for fortran common blocks in OpenACC. The notable exception is acc declare link which does support common block arguments to some extent. This patch does two things: 1) Adds support for common blocks in the appropriate OpenACC data clauses. 2) Privat

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-09-15 Thread Jeff Law
On 09/14/2016 11:55 PM, Richard Biener wrote: On September 14, 2016 11:36:16 PM GMT+02:00, Jan Hubicka wrote: + /* Visit PHI stmts and discover any new VRs possible. */ + gimple_stmt_iterator gsi; + for (gphi_iterator gpi = gsi_start_phis (bb); + !gsi_end_p (gpi); gsi_next (&gpi)) +

Re: [PATCH, GCC/LRA] Teach LRA to not use same register value for multiple output operands of an insn

2016-09-15 Thread Thomas Preudhomme
Hi Vladimir & release managers, The patch applies cleanly to gcc-6-branch. Ok to backport? Best regards, Thomas On 14/07/16 17:25, Vladimir Makarov wrote: On 07/08/2016 11:07 AM, Thomas Preudhomme wrote: Hi, While investigating the root cause a testsuite regression for the ARM/embedded-5-br

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Jakub Jelinek
On Thu, Sep 15, 2016 at 03:16:52PM +0100, Szabolcs Nagy wrote: > On 15/09/16 14:49, Jakub Jelinek wrote: > > On Thu, Sep 15, 2016 at 01:38:45PM +, Wilco Dijkstra wrote: > >> __rawmemchr is not the fastest on any target I tried, including x86, so > >> GLIBC's > >> current default behaviour of a

Re: Ping: Re: [PATCH 1/2] gcc: Remove unneeded global flag.

2016-09-15 Thread Andrew Burgess
* Jakub Jelinek [2016-09-14 15:07:56 +0200]: > On Wed, Sep 14, 2016 at 02:00:48PM +0100, Andrew Burgess wrote: > > In an attempt to get this patch merged (as I still think that its > > correct) I've investigated, and documented a little more about how I > > think things currently work. I'm sure

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Szabolcs Nagy
On 15/09/16 14:49, Jakub Jelinek wrote: > On Thu, Sep 15, 2016 at 01:38:45PM +, Wilco Dijkstra wrote: >> __rawmemchr is not the fastest on any target I tried, including x86, so >> GLIBC's >> current default behaviour of always using __rawmemchr is inefficient. GCC >> doesn't >> support __rawm

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Bernd Schmidt
On 09/15/2016 03:38 PM, Wilco Dijkstra wrote: __rawmemchr is not the fastest on any target I tried, including x86, Interesting. Care to share your test program? I just looked at the libc sources and strlen/rawmemchr are practically identical code so I'd expect any difference to be lost in the

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Jakub Jelinek
On Thu, Sep 15, 2016 at 01:38:45PM +, Wilco Dijkstra wrote: > __rawmemchr is not the fastest on any target I tried, including x86, so > GLIBC's > current default behaviour of always using __rawmemchr is inefficient. GCC > doesn't > support __rawmemchr at all, so the strlen optimization can't

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Wilco Dijkstra
Richard Biener wrote: > On Wed, Sep 14, 2016 at 3:45 PM, Jakub Jelinek wrote: > > On Wed, Sep 14, 2016 at 03:41:33PM +0200, Richard Biener wrote: > >> > We've seen several different proposals for where/how to do this > >> > simplification, why did you > >> > say strlenopt is best? It would be an

[PATCH] Fix late dwarf generated early from optimized out globals

2016-09-15 Thread Richard Biener
This addresses sth I needed to address with the early LTO debug patches (you might now figure I'm piecemail merging stuff from that patch). When the cgraph code optimizes out a global we call the late_global_decl debug hook to eventually add a DW_AT_const_value to its DIE (we don't really expect

Re: [PATCH] Partially improve scalability of the unwinder (PR libgcc/71744)

2016-09-15 Thread Ian Lance Taylor
Jakub Jelinek writes: > 2016-09-15 Jakub Jelinek > > PR libgcc/71744 > * unwind-dw2-fde.c (ATOMIC_FDE_FAST_PATH): Define if __register_frame* > is not the primary registry and atomics are available. > (any_objects_registered): New variable. > (__register_frame_inf

Ping Re: Define TS 18661-1 CR_DECIMAL_DIG in

2016-09-15 Thread Joseph Myers
Ping. This patch is pending review. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-15 Thread Joseph Myers
On Thu, 15 Sep 2016, Tamar Christina wrote: > a rather large costs in complexity. Also wouldn't this be problematic > for other functions as well such as expand_builtin_signbit? expand_builtin_signbit computes a word number and the bit position in that word. It has no problem with 128-bit type

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-15 Thread Joseph Myers
On Thu, 15 Sep 2016, Wilco Dijkstra wrote: > Yes, if there are targets which don't implement TImode operations then > surely they should be automatically split into DImode operations before > or during Expand? The operations generally don't exist if the mode fails the scalar_mode_supported_p h

[PATCH] Fix PR77544

2016-09-15 Thread Richard Biener
This fixes an endless recursion through fold-const.c associate code. While the testcase is fixed if we "properly" split the TREE_CONSTANT ~(unsigned int) (302806 >> 0) into *conp and *minus_lit this runs into endless recursion during Ada bootstrap as the condition /* Only do something i

Re: [PING] set libfunc entry for sdivmod_optab to NULL in optabs.def

2016-09-15 Thread Richard Biener
On Thu, Sep 15, 2016 at 1:21 PM, Prathamesh Kulkarni wrote: > On 15 September 2016 at 16:31, Richard Sandiford > wrote: >> Prathamesh Kulkarni writes: >>> On 15 September 2016 at 04:21, Richard Sandiford >>> wrote: Richard Sandiford writes: > Prathamesh Kulkarni writes: >> Hi, >>

Re: C/C++ PATCH to implement -Wpointer-compare warning (PR c++/64767)

2016-09-15 Thread Marek Polacek
On Wed, Sep 14, 2016 at 12:07:49AM -0400, Jason Merrill wrote: > On Sat, Sep 10, 2016 at 10:58 AM, Marek Polacek wrote: > > Spurred by the recent findings, I > > decided to > > implement a warning that warns when a pointer is compared with a zero > > character

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-15 Thread Christophe Lyon
On 15 September 2016 at 11:26, Rainer Orth wrote: > Hi Jason, > >>> I confirm no change on arm* either. >>> On aarch64, gen-attrs-[25]1.C, and devirt-33 now work. >>> name-clash11.C still fails on both targets >> >> Ah, I needed to remove the limit on field alignment as well. This >> seems to fi

Re: [PING] set libfunc entry for sdivmod_optab to NULL in optabs.def

2016-09-15 Thread Prathamesh Kulkarni
On 15 September 2016 at 16:31, Richard Sandiford wrote: > Prathamesh Kulkarni writes: >> On 15 September 2016 at 04:21, Richard Sandiford >> wrote: >>> Richard Sandiford writes: Prathamesh Kulkarni writes: > Hi, > I would like to ping the following patch: > https://gcc.gnu.org

Re: [PING] set libfunc entry for sdivmod_optab to NULL in optabs.def

2016-09-15 Thread Richard Sandiford
Prathamesh Kulkarni writes: > On 15 September 2016 at 04:21, Richard Sandiford > wrote: >> Richard Sandiford writes: >>> Prathamesh Kulkarni writes: Hi, I would like to ping the following patch: https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01015.html While implementing

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-15 Thread Wilco Dijkstra
Tamar Christina wrote: > On 13/09/16 13:43, Joseph Myers wrote: > > On Tue, 13 Sep 2016, Tamar Christina wrote: >> > >> On 12/09/16 23:33, Joseph Myers wrote: > >>> Why is this boolean false for ieee_quad_format, mips_quad_format and > >>> ieee_half_format?  They should meet your description (even

Re: [PATCH 0/8] make next_*_insn take rtx_insn * arguments

2016-09-15 Thread Bernd Schmidt
On 09/14/2016 09:21 PM, tbsaunde+...@tbsaunde.org wrote: Basically $subject. First change variable's type to rtx_insn * where possible. Then change the functions and fixup callers where it is still necessary to cast. #2, #4 and #8 look good and can be applied if they work independently of th

Re: Patch ping

2016-09-15 Thread Bernd Schmidt
On 09/14/2016 11:47 PM, Jakub Jelinek wrote: http://gcc.gnu.org/ml/gcc-patches/2016-09/msg00088.html - PR77425 - fix UB in sd_iterator_cond Ok. Bernd

Re: [PING] set libfunc entry for sdivmod_optab to NULL in optabs.def

2016-09-15 Thread Prathamesh Kulkarni
On 15 September 2016 at 04:21, Richard Sandiford wrote: > Richard Sandiford writes: >> Prathamesh Kulkarni writes: >>> Hi, >>> I would like to ping the following patch: >>> https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01015.html >>> >>> While implementing divmod transform: >>> https://gcc.gnu.o

Re: [PATCH PR77503]Record reduction code for CONST_COND_REDUCTION at analysis stage and use it at transform

2016-09-15 Thread Richard Biener
On Thu, Sep 15, 2016 at 12:07 PM, Bin Cheng wrote: > Hi, > This patch fixes PR77503. Root cause is loop peeling changes the initial > value for reduction PHI node, resulting in different statement for > vect_transform_stmt to vect_analyze_stmt. Similar issue stands for loop > control IV, we r

[PATCH] Editorial fixes to libstdc++ debug mode docs

2016-09-15 Thread Jonathan Wakely
* doc/xml/manual/debug_mode.xml: Minor editorial fixes. * doc/html/*: Regenerate. Committed to trunk. commit d2fadc3e0b0d69c834c398f79d53e38d900c5951 Author: Jonathan Wakely Date: Thu Sep 15 11:29:29 2016 +0100 Editorial fixes to libstdc++ debug mode docs * d

Re: [PATCH] Fix PR64078

2016-09-15 Thread Tom de Vries
On 31/08/16 07:42, Tom de Vries wrote: On 30/08/16 11:38, Bernd Edlinger wrote: On 08/30/16 10:21, Tom de Vries wrote: On 29/08/16 18:43, Bernd Edlinger wrote: Thanks! Actually my patch missed to fix one combination: -m32 with -fpic make check-gcc-c++ RUNTESTFLAGS="ubsan.exp=object-size-9.c

Re: C++ PATCH to forbid use of bool with the ++ operator

2016-09-15 Thread Jonathan Wakely
On 14/09/16 17:28 +0200, Marek Polacek wrote: diff --git gcc/libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc gcc/libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.cc index 9893293..c939c22 100644 --- gcc/libstdc++-v3/testsuite/23_containers/vector/debug/insert6_neg.c

[PATCH PR77503]Record reduction code for CONST_COND_REDUCTION at analysis stage and use it at transform

2016-09-15 Thread Bin Cheng
Hi, This patch fixes PR77503. Root cause is loop peeling changes the initial value for reduction PHI node, resulting in different statement for vect_transform_stmt to vect_analyze_stmt. Similar issue stands for loop control IV, we record the original information in LOOP_PHI_EVOLUTION_BASE_UNC

[RFC] Speed-up -fprofile-update=atomic

2016-09-15 Thread Martin Liška
On 09/07/2016 02:09 PM, Richard Biener wrote: > On Wed, Sep 7, 2016 at 1:37 PM, Martin Liška wrote: >> On 08/18/2016 06:06 PM, Richard Biener wrote: >>> On August 18, 2016 5:54:49 PM GMT+02:00, Jakub Jelinek >>> wrote: On Thu, Aug 18, 2016 at 08:51:31AM -0700, Andi Kleen wrote: >> I'd p

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-15 Thread Yuan, Pengfei
> Yes. This means it's easy to experiment with other values than zero. > Basically > early inlining is supposed to remove abstraction penalty to > > a) reduce FDO instrumentation overhead > b) get more realistic size estimates for the inliner > > a) was particularly important back in time fo

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-15 Thread Rainer Orth
Hi Jason, >> I confirm no change on arm* either. >> On aarch64, gen-attrs-[25]1.C, and devirt-33 now work. >> name-clash11.C still fails on both targets > > Ah, I needed to remove the limit on field alignment as well. This > seems to fix things. The failures are gone on Solaris/SPARC (sparc-sun-

[PATCH] Fix gcc.dg/fold-reassoc-2.c

2016-09-15 Thread Richard Biener
It's supposed to test for the transform in two cases. Applied to trunk. Richard. 2016-09-15 Richard Biener * gcc.dg/fold-reassoc-2.c: Fix dump scan. Index: gcc/testsuite/gcc.dg/fold-reassoc-2.c === --- gcc/testsuite/gc

Re: [PATCH 1/8] change a few rtx_insn * to rtx_jump_insn *

2016-09-15 Thread Trevor Saunders
On Thu, Sep 15, 2016 at 10:28:19AM +0200, Richard Biener wrote: > On Thu, Sep 15, 2016 at 6:31 AM, Trevor Saunders > wrote: > > On Thu, Sep 15, 2016 at 01:04:04PM +0900, Kaz Kojima wrote: > >> tbsaunde+...@tbsaunde.org wrote: > >> > @@ -2201,8 +2201,7 @@ fix_crossing_unconditional_branches (void)

Re: [PATCH] Improve string::clear() performance

2016-09-15 Thread Jonathan Wakely
On 14/09/16 10:41 -0700, Cong Wang wrote: For long term, I think gcc should have something as simple as 'Signed-off-by' for Linux kernel, otherwise too much work for first-time contributors like me. We all want to save time on this, don't we? ;) Signed-off-by wouldn't help. The copyright assign

Re: debug container mutex association

2016-09-15 Thread Jonathan Wakely
On 14/09/16 22:17 +0200, François Dumont wrote: On 14/09/2016 11:00, Jonathan Wakely wrote: On 13/09/16 22:37 +0200, François Dumont wrote: Hi When I proposed to change std::hash for pointers my plan was to use this approach for the debug containers. So here is the patch leveraging on this

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-15 Thread Tamar Christina
On 13/09/16 13:43, Joseph Myers wrote: On Tue, 13 Sep 2016, Tamar Christina wrote: On 12/09/16 23:33, Joseph Myers wrote: Why is this boolean false for ieee_quad_format, mips_quad_format and ieee_half_format? They should meet your description (even if the x86 / m68k "extended" formats don'

Re: [PATCH 1/8] change a few rtx_insn * to rtx_jump_insn *

2016-09-15 Thread Richard Biener
On Thu, Sep 15, 2016 at 6:31 AM, Trevor Saunders wrote: > On Thu, Sep 15, 2016 at 01:04:04PM +0900, Kaz Kojima wrote: >> tbsaunde+...@tbsaunde.org wrote: >> > @@ -2201,8 +2201,7 @@ fix_crossing_unconditional_branches (void) >> > { >> > if (!BARRIER_P (cur_insn)) >> >

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-15 Thread Richard Biener
On Thu, Sep 15, 2016 at 2:21 AM, Yuan, Pengfei wrote: >> I think the approach is reasonable though it might still have >> interesting effects on >> optimization for very small growth. So for further experimenting it >> would be nice > > Test it on SPEC CPU with FDO enabled? > >> to have a separat

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Jakub Jelinek
On Thu, Sep 15, 2016 at 09:52:34AM +0200, Richard Biener wrote: > On Wed, Sep 14, 2016 at 3:45 PM, Jakub Jelinek wrote: > > On Wed, Sep 14, 2016 at 03:41:33PM +0200, Richard Biener wrote: > >> > We've seen several different proposals for where/how to do this > >> > simplification, why did you > >

Re: [PATCH] Optimize strchr (s, 0) to strlen

2016-09-15 Thread Richard Biener
On Wed, Sep 14, 2016 at 3:45 PM, Jakub Jelinek wrote: > On Wed, Sep 14, 2016 at 03:41:33PM +0200, Richard Biener wrote: >> > We've seen several different proposals for where/how to do this >> > simplification, why did you >> > say strlenopt is best? It would be an unconditional strchr (a, 0) -> a

Re: [PATCH][2/n] Change dw2_asm_output_offset to allow assembling extra offset

2016-09-15 Thread Richard Biener
On Wed, Aug 19, 2015 at 4:25 PM, Richard Biener wrote: > > This is needed so that we can output references to $early-debug-symbol + > constant offset where $early-debug-symbol is the beginning of a > .debug_info section containing early debug info from the compile-stage. > Constant offsets are alw

[PATCH] Partially improve scalability of the unwinder (PR libgcc/71744)

2016-09-15 Thread Jakub Jelinek
Hi! These days on many targets that use dl_iterate_phdr to find .eh_frame_hdr that way in most of the programs the old style EH registry is never used, yet we still lock a global mutex and unlock it soon afterwards to find out it is the case. This patch adds a fast path to that, by replacing that

[PATCH] Fix PR77514

2016-09-15 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2016-09-15 Richard Biener PR tree-optimization/77514 * tree-ssa-pre.c (create_expression_by_pieces): Handle garbage only forced_stmts sequence. * gcc.dg/torture/pr77514.c: New tes