Re: [PATCH, rs6000] Remove optimize_insn_for_speed_p check on divide -> recip splitter

2016-09-14 Thread Richard Biener
On Tue, Sep 13, 2016 at 5:29 PM, Segher Boessenkool wrote: > On Tue, Sep 13, 2016 at 10:14:57AM -0500, Pat Haugen wrote: >> PRs 77536 and 68212 document cases where the estimated frequencies become >> unreliable to make appropriate decisions based on them. This patch removes >> the optimize_insn

[C++ PATCH] Fix ICE in C++ lookup_name_fuzzy (PR c++/77549, take 2)

2016-09-14 Thread Jakub Jelinek
On Tue, Sep 13, 2016 at 11:46:52PM -0400, Jason Merrill wrote: > On Tue, Sep 13, 2016 at 3:26 PM, Jakub Jelinek wrote: > >for (tree t = lvl->names; t; t = TREE_CHAIN (t)) > > { > > + /* OVERLOADs or decls from using declaration are wrapped into > > +TREE_LIST. */ > > +

Re: [PATCH, rs6000] Remove optimize_insn_for_speed_p check on divide -> recip splitter

2016-09-14 Thread Segher Boessenkool
On Wed, Sep 14, 2016 at 09:35:50AM +0200, Richard Biener wrote: > On Tue, Sep 13, 2016 at 5:29 PM, Segher Boessenkool > wrote: > > On Tue, Sep 13, 2016 at 10:14:57AM -0500, Pat Haugen wrote: > >> PRs 77536 and 68212 document cases where the estimated frequencies become > >> unreliable to make app

Re: Verify package integrity of downloaded prerequisites (partially fixes 61439)

2016-09-14 Thread Richard Biener
On Tue, Sep 13, 2016 at 6:01 PM, Joseph Myers wrote: > On Tue, 13 Sep 2016, Moritz Klammler wrote: > >> I have made an actual diff now, containing also the checksum files. I > > I don't think checksums of lots of miscellaneous files should be included, > just the checksums for those files the cur

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

2016-09-14 Thread Richard Biener
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 numbers which are similar to IEEE-754 i

Re: [PATCH] Add -Wshadow-local and -Wshadow-compatible-local.

2016-09-14 Thread Mark Wielaard
On Wed, 2016-09-14 at 00:00 -0400, Jason Merrill wrote: > I wonder about spelling the options as > -Wshadow={local,compatible-local} rather than with a dash, but > otherwise the patch looks fine. That is a much nicer way to write the option. But if I do that I would like to keep the old names as a

Re: [PATCH] -fsanitize=thread fixes (PR sanitizer/68260, take 2)

2016-09-14 Thread Richard Biener
On Thu, 8 Sep 2016, Jakub Jelinek wrote: > On Thu, Sep 08, 2016 at 02:34:18PM +0200, Jakub Jelinek wrote: > > I can split the patch into two, one dealing just with the > > __atomic_clear/__atomic_test_and_set instrumentation and another for the > > preexisting -fnon-call-exceptions ICEs. For the

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-14 Thread Richard Biener
On Tue, Sep 13, 2016 at 10:37 PM, Jeff Law wrote: > On 09/12/2016 12:57 PM, David Malcolm wrote: >> >> >> I'm not sure I follow - this sounds like a dedicated target for >> selftesting. > > That's exactly what it is. We'd essentially put in knobs so that we could > control the different things we

Re: [patch] Fix PR fortran/72743

2016-09-14 Thread Richard Biener
On Fri, 9 Sep 2016, Chung-Lin Tang wrote: > On 2016/9/1 03:13 PM, Richard Biener wrote: > > On Wed, 31 Aug 2016, Chung-Lin Tang wrote: > > > >> Hi Richard, Martin, > >> this issue is actually sort of like PR 70856, basically the same ICE > >> after IPA-ICF, due to DECL_PT_UIDs not consistent afte

Re: debug container mutex association

2016-09-14 Thread Jonathan Wakely
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 technique to avoid going through _Hash_impl to hash address and get mutex index from it. I

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

2016-09-14 Thread Richard Biener
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 early-vrp patch.

Re: [RFC][SSA] Iterator to visit SSA

2016-09-14 Thread Richard Biener
On Thu, Sep 8, 2016 at 5:29 AM, Kugan Vivekanandarajah wrote: > Hi Richard, > > On 7 September 2016 at 19:35, Richard Biener > wrote: >> On Wed, Sep 7, 2016 at 2:21 AM, Kugan Vivekanandarajah >> wrote: >>> Hi Richard, >>> >>> On 6 September 2016 at 19:08, Richard Biener >>> wrote: On Tue

Re: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6])

2016-09-14 Thread Richard Biener
On Thu, Sep 8, 2016 at 1:43 PM, Thomas Schwinge wrote: > Hi! > > On Wed, 7 Sep 2016 14:23:18 +0200, Richard Biener > wrote: >> On Wed, Sep 7, 2016 at 1:52 PM, Thomas Schwinge >> wrote: >> > I trimmed the CC list -- I'm looking for advice about debugging a lto1 >> > ICE. >> > >> > On Fri, 19 Au

Re: [PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-14 Thread Bernd Schmidt
On 09/13/2016 01:15 PM, Bernd Schmidt wrote: On 09/12/2016 08:57 PM, David Malcolm wrote: I'm not sure I follow - this sounds like a dedicated target for selftesting. Would it be a separate configuration i.e. something like: ../src/configure --target=rtl-selftest or somesuch? The way I im

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

2016-09-14 Thread Richard Biener
On Sat, Sep 10, 2016 at 8:04 AM, Yuan, Pengfei wrote: > Hi, > > Previously I have sent a patch on profile based option tuning: > https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01377.html > > According to Richard Biener's advice, I try investigating where the code size > reduction comes from. After

Re: Debug algorithms

2016-09-14 Thread Jonathan Wakely
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? Would it avoid all the changes to Parallel Mode?

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-14 Thread Segher Boessenkool
On Tue, Sep 13, 2016 at 02:38:54PM -0600, Jeff Law wrote: > I believe a doc update of some kind is in order. With the doc update > the entire series is OK. Good catch, thanks. My tests finished, all results identical. I'll add the following patch for the doc update (I hope the wording is stron

Re: Debug algorithms

2016-09-14 Thread Jonathan Wakely
On 14/09/16 11:33 +0100, Jonathan Wakely wrote: We need to get better at documenting things. The interaction between the different namespaces in Debug Mode, Parallel Mode etc is already confusing, and I think this patch would make it worse. The namespaces used for the math special functions shoul

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

2016-09-14 Thread Jonathan Wakely
On 13/09/16 11:02 -0700, Cong Wang wrote: In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls _M_mutate(), which could allocate memory as we do COW. This hurts performance when string::clear() is on the hot path. This patch improves it by using _S_empty_rep directly when _GLIBCXX_FU

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-14 Thread Richard Biener
On Fri, Sep 2, 2016 at 10:09 AM, Kugan Vivekanandarajah wrote: > Hi Richard, > > On 25 August 2016 at 22:24, Richard Biener wrote: >> On Thu, Aug 11, 2016 at 1:09 AM, kugan >> wrote: >>> Hi, >>> >>> >>> On 10/08/16 20:28, Richard Biener wrote: On Wed, Aug 10, 2016 at 10:57 AM, Jakub Je

Re: [PATCH] fix-it hints for warn_uninit

2016-09-14 Thread Bernd Schmidt
On 09/14/2016 02:45 AM, David Malcolm wrote: In combination with -fdiagnostics-generate-patch this can generate output like this: --- ../../src/gcc/testsuite/c-c++-common/fix-missing-initializer-1.c +++ ../../src/gcc/testsuite/c-c++-common/fix-missing-initializer-1.c @@ -2,7 +2,7 @@ in

Re: [PATCH] fix-it hints for warn_uninit

2016-09-14 Thread Trevor Saunders
On Tue, Sep 13, 2016 at 08:45:25PM -0400, David Malcolm wrote: > We warn about uses of uninitialized variables from the middle end, via > warn_uninit. > > This patch adds the ability for such warnings to contain fix-it hints, > showing the user how to zero-initialize the relevant variables. > Natu

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

2016-09-14 Thread Rainer Orth
Hi Jonathan, >>* For 64-bit, I get >> >>+FAIL: g++.dg/cpp1z/aligned-new5.C -std=gnu++11 execution test >>+FAIL: g++.dg/cpp1z/aligned-new5.C -std=gnu++14 execution test >>+FAIL: g++.dg/cpp1z/aligned-new5.C -std=gnu++98 execution test >> >> which fails like this: >> >>terminate called after thro

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

2016-09-14 Thread Richard Biener
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, >>> >>> On 12/08/16 20:43, Richard Biener wrote: On Wed, Aug 3, 2016 at 3:17 AM, kugan wr

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

2016-09-14 Thread Andreas Schwab
On Sep 13 2016, Jason Merrill wrote: > On Tue, Sep 13, 2016 at 9:03 AM, Andreas Schwab wrote: >> On Sep 13 2016, Jason Merrill wrote: >> >>> Does this help? >> >> Unfortunatly no. > > It occurs to me that this function doesn't need to restrict types at > all. I'm checking this in; hopefully it

Re: [PATCH] Add -Wshadow-local and -Wshadow-compatible-local.

2016-09-14 Thread Eric Gallager
On 9/14/16, Jason Merrill wrote: > On Mon, Sep 12, 2016 at 1:38 PM, Jim Meyering wrote: >> On Mon, Sep 12, 2016 at 7:05 AM, Eric Gallager >> wrote: >>> On 9/11/16, Manuel López-Ibáñez wrote: On 11/09/16 14:02, Mark Wielaard wrote: > -Wshadow-local which warns if a local variable shad

Re: [Patch, Fortran] Test for implied sequence in structures in common blocks

2016-09-14 Thread Fritz Reese
Committed revision 240134. --- Fritz Reese On Tue, Sep 13, 2016 at 10:52 AM, Jerry DeLisle wrote: > On 09/13/2016 07:33 AM, Fritz Reese wrote: >> >> Jim, >> >> While the test exhibits no particular regression, IMVHO I don't see >> any reason not to add it. None of my previous testcases include

Re: [PATCH] df: Keep return address register undefined until epilogue_completed

2016-09-14 Thread Segher Boessenkool
On Mon, Sep 12, 2016 at 10:30:56AM -0600, Jeff Law wrote: > On 09/10/2016 01:17 AM, Segher Boessenkool wrote: > >On Fri, Sep 09, 2016 at 04:40:12PM -0600, Jeff Law wrote: > >>Right now the dataflow is conservatively correct WRT the return register. > > > >And conservatively incorrect wrt all other

Re: [PATCH] Add -Wshadow-local and -Wshadow-compatible-local.

2016-09-14 Thread Ian Lance Taylor
On Wed, Sep 14, 2016 at 1:30 AM, Mark Wielaard wrote: > On Wed, 2016-09-14 at 00:00 -0400, Jason Merrill wrote: >> I wonder about spelling the options as >> -Wshadow={local,compatible-local} rather than with a dash, but >> otherwise the patch looks fine. > > That is a much nicer way to write the o

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-14 Thread Peter Bergner
On 9/14/16 5:35 AM, Segher Boessenkool wrote: On Tue, Sep 13, 2016 at 02:38:54PM -0600, Jeff Law wrote: I believe a doc update of some kind is in order. With the doc update the entire series is OK. Good catch, thanks. My tests finished, all results identical. I'll add the following patch fo

Re: [PATCH] Add -Wshadow-local and -Wshadow-compatible-local.

2016-09-14 Thread Mark Wielaard
On Wed, 2016-09-14 at 05:39 -0700, Ian Lance Taylor wrote: > On Wed, Sep 14, 2016 at 1:30 AM, Mark Wielaard wrote: > > On Wed, 2016-09-14 at 00:00 -0400, Jason Merrill wrote: > >> I wonder about spelling the options as > >> -Wshadow={local,compatible-local} rather than with a dash, but > >> otherw

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

2016-09-14 Thread Andrew Burgess
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 most people reading this will already know this, but hopefully, if my understanding is wrong someone can point it out. I've

Re: [PATCH] Tree-level fix for PR 69526

2016-09-14 Thread Richard Biener
On Mon, Aug 22, 2016 at 4:58 PM, Robin Dapp wrote: >> if !inner_ovf (just set that to false if !check_inner_ovf to simplify >> checks please). >> you know it's valid to transform the op to (T)@0 innerop (T)@1 outerop @2 >> (if T is wider than the inner type which I think you should check and >> wh

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

2016-09-14 Thread Segher Boessenkool
On Mon, Sep 12, 2016 at 10:33:22AM -0600, Jeff Law wrote: > The answer is to debug the problem, and yes it may be painful. Yes, the three weeks pretty much full-time I spent on that already attest to that. > I'd > probably start by fixing the dataflow issues and see if that fixes the > regrenam

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

2016-09-14 Thread Jakub Jelinek
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 most people reading this will > already know this, but

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

2016-09-14 Thread Bernd Schmidt
On 09/14/2016 03:04 PM, Segher Boessenkool wrote: Then rs6000 (and many other ports probably) will just turn it off again. It is actively harmful. The data that was posted showed a code size decrease on a number of targets. I'm really not sure where this irrational hate for regrename comes fr

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

2016-09-14 Thread Marek Polacek
On Tue, Sep 13, 2016 at 01:55:56PM -0600, Martin Sebor wrote: > > - /* Forbid using -- on `bool'. */ > > + /* Forbid using -- or ++ in C++17 on `bool'. */ > > if (TREE_CODE (declared_type) == BOOLEAN_TYPE) > > { > > if (code == POSTDECREMENT_EXPR || code == PREDECREMENT_EXPR

Re: [libstdc++-v3] Fix dg-require before dg-run directives in testsuite.

2016-09-14 Thread Christophe Lyon
On 6 September 2016 at 12:15, Jonathan Wakely wrote: > On 02/09/16 14:17 +0100, Matthew Wahab wrote: >> >> Hello, >> >> Tests in the libstdc++-v3 testsuite were recently changed to use { dg-do >> .. { target c++11 } } instead of using a dg-options to set -std >> (https://gcc.gnu.org/ml/libstdc++/2

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-14 Thread Segher Boessenkool
On Mon, Sep 12, 2016 at 10:49:46AM -0600, Jeff Law wrote: > On 09/09/2016 02:56 PM, Segher Boessenkool wrote: > >On Fri, Sep 09, 2016 at 12:57:32PM -0600, Jeff Law wrote: > >>I think the lack of test coverage is something we'll want to address. > > > >Building and running the compiler, the various

Re: [PATCH GCC 6/9]Simplify control flow graph for vectorized loop

2016-09-14 Thread Richard Biener
On Tue, Sep 6, 2016 at 8:52 PM, Bin Cheng wrote: > Hi, > This is the main patch improving control flow graph for vectorized loop. It > generally rewrites loop peeling stuff in vectorizer. As described in patch, > for a typical loop to be vectorized like: > >preheader: > LOOP: >

C/C++ PATCH to change {cp,}build_unary_op's parameter

2016-09-14 Thread Marek Polacek
I promised I'd do the int -> bool conversion for build_unary_op (and so even for cp_build_unary_op), so here it is. Bootstrapped/regtested on x86_64-linux and ppc64-linux, ok for trunk? 2016-09-14 Marek Polacek * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.

Re: [PATCH 6/9] sel-sched: Don't mess with register restores

2016-09-14 Thread Segher Boessenkool
On Mon, Sep 12, 2016 at 11:24:01AM -0600, Jeff Law wrote: > >sel-sched-ir.c says > > > >/* Certain instructions cannot be cloned, and frame related insns and > > the insn adjacent to NOTE_INSN_EPILOGUE_BEG cannot be moved out of > > their block. */ > >if (prologue_epilogue_cont

Re: [patch] [gsoc] [gimplefe] GIMPLE FE Project

2016-09-14 Thread Richard Biener
On Fri, Sep 9, 2016 at 12:38 PM, Prasad Ghangal wrote: > On 26 August 2016 at 14:28, Richard Biener wrote: >> On Fri, Aug 26, 2016 at 5:08 AM, Prasad Ghangal >> wrote: >>> On 24 August 2016 at 15:32, Richard Biener >>> wrote: On Mon, Aug 22, 2016 at 8:40 PM, Prasad Ghangal wrote: >>

Re: [libstdc++-v3] Fix dg-require before dg-run directives in testsuite.

2016-09-14 Thread Jonathan Wakely
On 14/09/16 15:17 +0200, Christophe Lyon wrote: It seems some tests still have dg-require or dg-skip before dg-do. The attached patch fixes that, the only effect is that 25_algorithms/lower_bound/debug/irreflexive.cc is now UNSUPPORTED instead of PASS on arm* and aarch64* targets. I'm not sure i

Re: [patch] [gsoc] [gimplefe] GIMPLE FE Project

2016-09-14 Thread Marek Polacek
On Wed, Sep 14, 2016 at 03:24:18PM +0200, Richard Biener wrote: > > PING. > > > > https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01837.html > > (that was a ping for the C FE maintainers) > > Prasad, can you update the git branch with the changes from the last patch you > sent out? I don't think y

Re: [patch] [gsoc] [gimplefe] GIMPLE FE Project

2016-09-14 Thread Richard Biener
On Wed, Sep 14, 2016 at 3:28 PM, Marek Polacek wrote: > On Wed, Sep 14, 2016 at 03:24:18PM +0200, Richard Biener wrote: >> > PING. >> > >> > https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01837.html >> >> (that was a ping for the C FE maintainers) >> >> Prasad, can you update the git branch with th

Re: [libstdc++-v3] Fix dg-require before dg-run directives in testsuite.

2016-09-14 Thread Christophe Lyon
On 14 September 2016 at 15:27, Jonathan Wakely wrote: > On 14/09/16 15:17 +0200, Christophe Lyon wrote: >> >> It seems some tests still have dg-require or dg-skip before dg-do. >> The attached patch fixes that, the only effect is that >> 25_algorithms/lower_bound/debug/irreflexive.cc >> is now UNS

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

2016-09-14 Thread Segher Boessenkool
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 idom and not in the dominated block

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

2016-09-14 Thread Richard Biener
On Tue, Sep 13, 2016 at 2:36 PM, Wilco Dijkstra wrote: > Richard Biener wrote: >> On Wed, May 18, 2016 at 2:29 PM, Wilco Dijkstra >> wrote: >>> Richard Biener wrote: >>> Yeah ;) I'm currently bootstrapping/testing the patch that makes it possible to write all this in match.pd.

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

2016-09-14 Thread Jakub Jelinek
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 + > > strlen (a) rewrite, > > ie. completely unrelated to

Re: [PATCH 1/3] Put a TARGET_LRA_P into every target

2016-09-14 Thread Segher Boessenkool
On Wed, Sep 14, 2016 at 07:46:13AM -0500, Peter Bergner wrote: > On 9/14/16 5:35 AM, Segher Boessenkool wrote: > > (I hope the wording is strong enough). > Maybe s/New ports should use LRA/New ports must use LRA/ ? Yeah maybe. Does anyone else have an opinion on this? Cc:ing gcc@... > >+ New p

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

2016-09-14 Thread Segher Boessenkool
On Wed, Sep 14, 2016 at 03:08:21PM +0200, Bernd Schmidt wrote: > On 09/14/2016 03:04 PM, Segher Boessenkool wrote: > >Then rs6000 (and many other ports probably) will just turn it off again. > >It is actively harmful. > > The data that was posted showed a code size decrease on a number of > targe

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-09-14 Thread Georg-Johann Lay
On 09.08.2016 15:43, kugan wrote: Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as follows, which looks OK. + unsigned int _16; + unsigned int _17; + u

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

2016-09-14 Thread Bernd Schmidt
On 09/14/2016 03:55 PM, Segher Boessenkool wrote: On Wed, Sep 14, 2016 at 03:08:21PM +0200, Bernd Schmidt wrote: The data that was posted showed a code size decrease on a number of targets. I'm really not sure where this irrational hate for regrename comes from. It increases the number of acti

PR c++/77539

2016-09-14 Thread Nathan Sidwell
I've committed this backport to the gcc-6 branch. I'll commit the new testcase to trunk, so we don't regress in future. nathan 2016-09-14 Nathan Sidwell cp/ PR c++/77539 * constexpr.c (get_fundef_copy): Use the original function for non-recursive evaluations. (save_fundef_copy): Always

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

2016-09-14 Thread Marek Polacek
On Wed, Sep 14, 2016 at 10:54:35AM -0400, Jason Merrill wrote: > Martin's point, which I agree with, is that for C++ we want to use > "bool" rather than either of those. Sure, I'm testing another version of this patch which has this fixed. Marek

Re: C/C++ PATCH to change {cp,}build_unary_op's parameter

2016-09-14 Thread Jason Merrill
On Wed, Sep 14, 2016 at 9:22 AM, Marek Polacek wrote: > * c-common.h (build_unary_op): Change a parameter type to bool. > (build_unary_op): Change a parameter type to bool, use true/false > (cp_build_unary_op): Change a parameter type to bool. Use true > instead >

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

2016-09-14 Thread Jason Merrill
On Wed, Sep 14, 2016 at 9:08 AM, Marek Polacek wrote: > On Tue, Sep 13, 2016 at 01:55:56PM -0600, Martin Sebor wrote: >> > - /* Forbid using -- on `bool'. */ >> > + /* Forbid using -- or ++ in C++17 on `bool'. */ >> > if (TREE_CODE (declared_type) == BOOLEAN_TYPE) >> > { >> >

Re: C/C++ PATCH to change {cp,}build_unary_op's parameter

2016-09-14 Thread Marek Polacek
On Wed, Sep 14, 2016 at 10:58:39AM -0400, Jason Merrill wrote: > On Wed, Sep 14, 2016 at 9:22 AM, Marek Polacek wrote: > > * c-common.h (build_unary_op): Change a parameter type to bool. > > (build_unary_op): Change a parameter type to bool, use true/false > > (cp_build_una

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

2016-09-14 Thread Marek Polacek
On Tue, Sep 13, 2016 at 11:37:20PM -0400, Jason Merrill wrote: > On Tue, Sep 13, 2016 at 3:55 PM, Martin Sebor wrote: > > Having said all that, since this is C++ the message could and > > arguably should refer to a bool expression (or type) instead > > and avoid having to deal with this altogether

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

2016-09-14 Thread Christophe Lyon
On 14 September 2016 at 14:11, Andreas Schwab wrote: > On Sep 13 2016, Jason Merrill wrote: > >> On Tue, Sep 13, 2016 at 9:03 AM, Andreas Schwab >> wrote: >>> On Sep 13 2016, Jason Merrill wrote: >>> Does this help? >>> >>> Unfortunatly no. >> >> It occurs to me that this function doesn't

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

2016-09-14 Thread Cong Wang
On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely wrote: > On 13/09/16 11:02 -0700, Cong Wang wrote: >> >> In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls >> _M_mutate(), which could allocate memory as we do COW. This hurts >> performance when string::clear() is on the hot path. >>

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

2016-09-14 Thread Bernd Edlinger
Hi Jeff, it turned out, that the changed symmetric condition in the warning hit at several places, but also caused two false positives which I had to address first. I tried also building a recent glibc, which hit a false positive when using __builtin_isinf_sign in boolean context, which is used e

Re: [PATCH 3/4][Ada,DJGPP] Ada support for DJGPP

2016-09-14 Thread Andris Pavenis
ples which uses exceptions. These examples worked for DJGPP as expected with today build of gcc-7.0.0-20160914. ZCX_By_Default in system-djgpp.ads had value true as in last version of patch. Andris

Re: [PATCH] fix-it hints for warn_uninit

2016-09-14 Thread Jeff Law
On 09/14/2016 05:34 AM, Bernd Schmidt wrote: On 09/14/2016 02:45 AM, David Malcolm wrote: In combination with -fdiagnostics-generate-patch this can generate output like this: --- ../../src/gcc/testsuite/c-c++-common/fix-missing-initializer-1.c +++ ../../src/gcc/testsuite/c-c++-common/fix-mi

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

2016-09-14 Thread Segher Boessenkool
Hi Bernd, On Wed, Sep 14, 2016 at 04:01:34PM +0200, Bernd Schmidt wrote: > On 09/14/2016 03:55 PM, Segher Boessenkool wrote: > >On Wed, Sep 14, 2016 at 03:08:21PM +0200, Bernd Schmidt wrote: > >>The data that was posted showed a code size decrease on a number of > >>targets. I'm really not sure wh

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

2016-09-14 Thread Jason Merrill
On Wed, Sep 14, 2016 at 12:08 PM, Christophe Lyon wrote: > On 14 September 2016 at 14:11, Andreas Schwab wrote: >> On Sep 13 2016, Jason Merrill wrote: >> >>> On Tue, Sep 13, 2016 at 9:03 AM, Andreas Schwab >>> wrote: On Sep 13 2016, Jason Merrill wrote: > Does this help? >

Re: RFC: PATCH to consider MAX_OFILE_ALIGNMENT for targetm.absolute_biggest_alignment

2016-09-14 Thread Thomas Schwinge
Hi! On Tue, 13 Sep 2016 16:27:39 +0200, Bernd Schmidt wrote: > On 09/13/2016 04:24 PM, Jason Merrill wrote: > > > But we could define TARGET_ABSOLUTE_BIGGEST_ALIGNMENT on nvptx instead > > of on x86; is this OK? > > That's what I had in mind. It would be good if Thomas or Nathan could > give t

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

2016-09-14 Thread Jason Merrill
On Wed, Sep 14, 2016 at 12:10 PM, Bernd Edlinger wrote: > The other false positive was in dwarf2out, where we have this: > > ../../gcc-trunk/gcc/dwarf2out.c:26166:35: error: ?: using integer > constants in boolean context [-Werror=int-in-bool-context] >if (s->refcount >== ((DEBUG_STR_S

Re: [PATCH GCC 6/9]Simplify control flow graph for vectorized loop

2016-09-14 Thread Jeff Law
On 09/14/2016 07:21 AM, Richard Biener wrote: On Tue, Sep 6, 2016 at 8:52 PM, Bin Cheng wrote: Hi, This is the main patch improving control flow graph for vectorized loop. It generally rewrites loop peeling stuff in vectorizer. As described in patch, for a typical loop to be vectorized like

Re: [PATCH] Tree-level fix for PR 69526

2016-09-14 Thread Jeff Law
[ Another patch I'd started working through, but hadn't completed... ] On 09/14/2016 07:05 AM, Richard Biener wrote: On Mon, Aug 22, 2016 at 4:58 PM, Robin Dapp wrote: if !inner_ovf (just set that to false if !check_inner_ovf to simplify checks please). you know it's valid to transform the op

Re: Verify package integrity of downloaded prerequisites (partially fixes 61439)

2016-09-14 Thread Moritz Klammler
Richard Biener writes: > On Tue, Sep 13, 2016 at 6:01 PM, Joseph Myers wrote: >> On Tue, 13 Sep 2016, Moritz Klammler wrote: >> >>> I have made an actual diff now, containing also the checksum files. >>> I >> >> I don't think checksums of lots of miscellaneous files should be >> included, just t

Re: [PATCH] accept flexible arrays in struct in unions (c++/71912 - [6/7 regression])

2016-09-14 Thread Martin Sebor
Attached is an updated patch that does away with the "overlapping" warning and instead issues the same warnings as the C front end (though with more context). In struct flexmems_t I've retained the NEXT array even though only the first element is used to diagnose problems. The second element is

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

2016-09-14 Thread Szabolcs Nagy
On 14/09/16 14:45, Jakub Jelinek wrote: > I think for the middle-end, using strchr (a, 0) as canonical instead of a + > strlen (a) > is better, and at expansion time we can decide what to use (a + strlen (a) > if you'd expand strlen inline, rather than as a function call, or > __rawmemchr (which i

[PATCH] Fix incorrect setting of edge probability in loop unroller

2016-09-14 Thread Pat Haugen
The following patch corrects a problem with setting the probability on the pred edge instead of the newly created fallthru succ edge. Bootstrap/regtest on powerpc64le with no new regressions. Committed as obvious. -Pat 2016-09-14 Pat Haugen * loop-unroll.c (unroll_loop_runtime_iter

Re: Verify package integrity of downloaded prerequisites (partially fixes 61439)

2016-09-14 Thread Joseph Myers
On Wed, 14 Sep 2016, Moritz Klammler wrote: > be cleaner to only include those checksums that are actually needed. On > the other hand, it means an increased maintenance burden each time the > version of the dependency is changed. In order to mitigate this and I really don't see it as an increa

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

2016-09-14 Thread Jonathan Wakely
On 14/09/16 09:09 -0700, Cong Wang wrote: On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely wrote: On 13/09/16 11:02 -0700, Cong Wang wrote: In !_GLIBCXX_USE_CXX11_ABI implementation, string::clear() calls _M_mutate(), which could allocate memory as we do COW. This hurts performance when strin

Re: Verify package integrity of downloaded prerequisites (partially fixes 61439)

2016-09-14 Thread Moritz Klammler
Joseph Myers writes: > On Wed, 14 Sep 2016, Moritz Klammler wrote: > >> be cleaner to only include those checksums that are actually needed. On >> the other hand, it means an increased maintenance burden each time the >> version of the dependency is changed. In order to mitigate this and > > I

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

2016-09-14 Thread Bernd Edlinger
On 09/14/16 18:37, Jason Merrill wrote: > On Wed, Sep 14, 2016 at 12:10 PM, Bernd Edlinger > wrote: >> The other false positive was in dwarf2out, where we have this: >> >> ../../gcc-trunk/gcc/dwarf2out.c:26166:35: error: ?: using integer >> constants in boolean context [-Werror=int-in-bool-context

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

2016-09-14 Thread Jason Merrill
OK, thanks. On Wed, Sep 14, 2016 at 11:28 AM, Marek Polacek wrote: > On Tue, Sep 13, 2016 at 11:37:20PM -0400, Jason Merrill wrote: >> On Tue, Sep 13, 2016 at 3:55 PM, Martin Sebor wrote: >> > Having said all that, since this is C++ the message could and >> > arguably should refer to a bool expr

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

2016-09-14 Thread Steve Kargl
On Wed, Sep 14, 2016 at 04:10:46PM +, Bernd Edlinger wrote: > > fortran: > 2016-09-14 Bernd Edlinger > > PR c++/77434 > * simplify.c (gfc_simplify_repeat): Fix a warning. > > Index: gcc/fortran/simplify.c > === >

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

2016-09-14 Thread Jeff Law
On 09/14/2016 07:55 AM, Segher Boessenkool wrote: On Wed, Sep 14, 2016 at 03:08:21PM +0200, Bernd Schmidt wrote: On 09/14/2016 03:04 PM, Segher Boessenkool wrote: Then rs6000 (and many other ports probably) will just turn it off again. It is actively harmful. The data that was posted showed a

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

2016-09-14 Thread Bernd Edlinger
On 09/14/16 19:40, Steve Kargl wrote: > On Wed, Sep 14, 2016 at 04:10:46PM +, Bernd Edlinger wrote: >> >> fortran: >> 2016-09-14 Bernd Edlinger >> >> PR c++/77434 >> * simplify.c (gfc_simplify_repeat): Fix a warning. >> >> Index: gcc/fortran/simplify.c >> ==

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

2016-09-14 Thread Cong Wang
On Wed, Sep 14, 2016 at 10:28 AM, Jonathan Wakely wrote: > On 14/09/16 09:09 -0700, Cong Wang wrote: >> >> On Wed, Sep 14, 2016 at 4:06 AM, Jonathan Wakely >> wrote: >>> >>> If I understand the purpose of the change correctly, it's similar to >>> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg0027

Re: [C++ PATCH] Fix ICE in C++ lookup_name_fuzzy (PR c++/77549, take 2)

2016-09-14 Thread Jason Merrill
OK, thanks. On Wed, Sep 14, 2016 at 3:43 AM, Jakub Jelinek wrote: > On Tue, Sep 13, 2016 at 11:46:52PM -0400, Jason Merrill wrote: >> On Tue, Sep 13, 2016 at 3:26 PM, Jakub Jelinek wrote: >> >for (tree t = lvl->names; t; t = TREE_CHAIN (t)) >> > { >> > + /* OVERLOADs or decls from

Re: Verify package integrity of downloaded prerequisites (partially fixes 61439)

2016-09-14 Thread Joseph Myers
On Wed, 14 Sep 2016, Moritz Klammler wrote: > Ok, I didn't know about the workflow. Do you think I should dike the > `--strip-sums` option out again then? I don't see any use for such an option. Anyone changing the versions should always have a copy of the new tarball (obtained securely if po

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

2016-09-14 Thread Jeff Law
On 09/14/2016 07:04 AM, Segher Boessenkool wrote: I'd probably start by fixing the dataflow issues and see if that fixes the regrename thing as a side effect. Have you seen https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00091.html ? I missed it. My interpretation The uses at each "strange

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

2016-09-14 Thread Jason Merrill
On Wed, Sep 14, 2016 at 1:37 PM, Bernd Edlinger wrote: > On 09/14/16 18:37, Jason Merrill wrote: >> On Wed, Sep 14, 2016 at 12:10 PM, Bernd Edlinger >> wrote: >>> The other false positive was in dwarf2out, where we have this: >>> >>> ../../gcc-trunk/gcc/dwarf2out.c:26166:35: error: ?: using integ

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

2016-09-14 Thread Jeff Law
On 09/14/2016 08:01 AM, Bernd Schmidt wrote: On 09/14/2016 03:55 PM, Segher Boessenkool wrote: On Wed, Sep 14, 2016 at 03:08:21PM +0200, Bernd Schmidt wrote: The data that was posted showed a code size decrease on a number of targets. I'm really not sure where this irrational hate for regrename

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

2016-09-14 Thread Segher Boessenkool
On Wed, Sep 14, 2016 at 12:11:50PM -0600, Jeff Law wrote: > On 09/14/2016 07:04 AM, Segher Boessenkool wrote: > >>I'd > >>probably start by fixing the dataflow issues and see if that fixes the > >>regrename thing as a side effect. > > > >Have you seen https://gcc.gnu.org/ml/gcc-patches/2016-07/msg0

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

2016-09-14 Thread Segher Boessenkool
On Wed, Sep 14, 2016 at 11:52:02AM -0600, Jeff Law wrote: > Yea, it'll certainly do that and I can imagine a design which would have > that property. And there's other designs which benefit from spreading > across the register file as much as possible. > > Which argues there needs to be a way t

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

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders Hi, 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. patches bootstrapped and regtested individually on x86_64-linux-gnu, and the series was run through config-l

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

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-06 Trevor Saunders * bb-reorder.c (fix_crossing_unconditional_branches): Make type of jump_insn rtx_jump_insn *. * reorg.c (steal_delay_list_from_target): Make type of insn rtx_jump_insn *. (follow_jumps): M

[PATCH 2/8] use rtx_insn * more

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-06 Trevor Saunders * config/arc/arc-protos.h (arc_label_align): Change type of variables from rtx to rtx_insn *. * config/arc/arc.c (arc_label_align): Likewise. * config/arm/arm.c (any_sibcall_could_use_r3): Likewis

[PATCH 4/8] make next/prev nondebug_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-13 Trevor Saunders * emit-rtl.c (next_nondebug_insn): Change argument type to rtx_insn *. (prev_nondebug_insn): Likewise. * loop-doloop.c (doloop_condition_get): Likewise. * rtl.h: Adjust prototype.

[PATCH 3/8] make next/prev _nonnote_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-13 Trevor Saunders * emit-rtl.c (next_nonnote_insn): Change argument type to rtx_insn *. (prev_nonnote_insn): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. (reversed_comparison): Likewise.

[PATCH 6/8] make next/prev nonnote_nondebug_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-14 Trevor Saunders * config/cris/cris.c (cris_asm_output_case_end): Change argument type to rtx_insn *. * emit-rtl.c (next_nonnote_nondebug_insn): Likewise. (prev_nonnote_nondebug_insn): Likewise. * config/cris/cris

[PATCH 8/8] make next_cc0_user take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-14 Trevor Saunders * emit-rtl.c (next_cc0_user): Make argument type rtx_insn *. * rtl.h: Adjust prototype. --- gcc/emit-rtl.c | 4 +--- gcc/rtl.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/emit

[PATCH 5/8] make prev_real_insn take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-13 Trevor Saunders * emit-rtl.c (prev_real_insn): Change argument type to rtx_insn *. * rtl.h: Adjust prototype. * config/sh/sh.md: Adjust. * dwarf2out.c (add_var_loc_to_decl): Likewise. --- gcc/config/sh/sh.md | 3

[PATCH 7/8] make next/prev active_insn and active_insn_p take rtx_insn *

2016-09-14 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2016-09-14 Trevor Saunders * emit-rtl.c (next_active_insn): Change argument type to rtx_insn *. (prev_active_insn): Likewise. (active_insn_p): Likewise. * rtl.h: Adjust prototypes. * cfgcleanup.c (merge_bloc

  1   2   >