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

2016-09-16 Thread Martin Sebor
On 09/16/2016 04:29 AM, Richard Biener wrote: On Fri, Sep 16, 2016 at 5:29 AM, 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

[PATCH] Fix typo in Libstdc++ Profile Mode docs

2016-09-16 Thread Jonathan Wakely
* doc/xml/manual/profile_mode.xml: Fix typo. * doc/html/manual/profile_mode_devel.html: Regenerate. Committed to trunk. commit 70bd84b48945ab73c35f0c841614dc51f72697ca Author: redi Date: Fri Sep 16 22:09:15 2016 + Fix typo

[patch] Fix ICE on ACATS test for Aarch64 at -O

2016-09-16 Thread Eric Botcazou
Hi, for the attached reduced testcase, the ICE is: eric@polaris:~/gnat/bugs/P901-028> ~/build/gcc/aarch64-linux/gcc/gnat1 -quiet p.adb -O -I ~/build/gcc/aarch64-linux/gcc/ada/rts +===GNAT BUG DETECTED==+ | 7.0.0 20160914 (experimental) [trunk

Re: [PATCH 1/9] Introduce class rtx_reader

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: Bundle up various global variables within gensupport.c into a class rtx_reader, with a view towards making it easier to run the code more than once in-process. gcc/ChangeLog: * genconstants.c (main): Introduce noop_reader and convert call

[build] Fix race condition during libgcc build

2016-09-16 Thread Eric Botcazou
Hi, we have some new machines which seem to be very good at stumbling upon race conditions during bootstrap. Another example with libgcc: /azun.a/gnatmail/sandbox/gnatcross-cont/x86-linux/gcc/build/./gcc/xgcc - B/azun.a/gnatmail/sandbox/gnatcross-cont/x86-linux/gcc/build/./gcc/ -

Re: [PATCH 5/9] Introduce class function_reader

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 15:28 -0600, Jeff Law wrote: > On 09/08/2016 06:30 PM, David Malcolm wrote: > > This patch generalizes the RTL-reading capabilities so that they > > can be run on the host as well as the build machine. > > The available rtx in rtl.def changes dramatically between these > >

Delete useless .split2 dump file at -O0 on non-x86 targets

2016-09-16 Thread Eric Botcazou
Doing -fdump-rtl-all at -O0 on a non-x86 target yields a .split2 file which is mightily confusing since nothing is split, so you can easily burn a dozen of minutes trying to pinpoint the first split point after reload... Tested on x86-64/Linux and SPARC/Solaris, applied on the mainline.

[PATCH] Fix documentation for overflow-checking builtins

2016-09-16 Thread Jonathan Wakely
This fixes a pasto in the manual. Approved by Jakub on IRC. Committed to trunk and gcc-6-branch and gcc-5-branch. commit 7bb31ae6738252bcb7839699cab5e50e8702b51a Author: Jonathan Wakely Date: Fri Sep 16 22:34:24 2016 +0100 Fix documentation for overflow-checking

Re: [PATCH 8/9] final.c selftests

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 14:45 -0600, Jeff Law wrote: > On 09/08/2016 06:30 PM, David Malcolm wrote: > > gcc/ChangeLog: > > * final.c: Include selftest.h and selftest-rtl.h. > > (class selftest::temp_asm_out): New subclass of > > selftest::named_temp_file. > >

Re: [PATCH 7/9] combine.c selftests

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 14:40 -0600, Jeff Law wrote: > On 09/08/2016 06:30 PM, David Malcolm wrote: > > gcc/ChangeLog: > > * combine.c: Include selftest.h and selftest-rtl.h. > > (try_combine): Add assertion on this_basic_block. > > (class selftest::combine_test): New subclass of > >

Re: [PATCH 6/9] df selftests

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 14:34 -0600, Jeff Law wrote: > On 09/08/2016 06:30 PM, David Malcolm wrote: > > gcc/ChangeLog: > > * df-core.c: Include selftest.h and selftest-rtl.h. > > (selftest::dataflow_test::dataflow_test): New ctor. > > (selftest::dataflow_test::~dataflow_test): New dtor.

Re: [PATCH 5/9] Introduce class function_reader

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: This patch generalizes the RTL-reading capabilities so that they can be run on the host as well as the build machine. The available rtx in rtl.def changes dramatically between these two configurations, so a fair amount of #ifdef GENERATOR_FILE is

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

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 14:05 -0600, Jeff Law wrote: > On 09/13/2016 05:15 AM, Bernd Schmidt wrote: > > > > > > Note that the loader now resets INSN_CODE to -1, regardless of > > > the > > > actual code passed in, to force re-recognition, and to isolate > > > the > > > dumps somewhat from changes

Re: [PATCH 9/9] cse.c selftests

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 14:26 -0600, Jeff Law wrote: > On 09/08/2016 06:30 PM, David Malcolm wrote: > > This patch uses rtl_dump_test to start building out a test suite > > for cse. > > > > I attempted to create a reproducer for PR 71779; however I'm not > > yet > > able to replicate the bogus cse

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

2016-09-16 Thread David Malcolm
On Fri, 2016-09-16 at 14:00 -0600, Jeff Law wrote: > On 09/14/2016 02:37 AM, Richard Biener wrote: > > > > Note that while the "snippets" may largely work (not sure how many > > you tried to come up with) I see the issue that a lot of RTL "unit > > tests" would need some trees set up, like to

Re: [PATCH 2/9] Add selftest::read_file

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: This is used later in the kit by the selftests for final.c gcc/ChangeLog: * selftest.c (selftest::read_file): New function. (selftest::test_read_file): New function. (selftest::selftest_c_tests): Call test_read_file. *

Re: [PATCH 8/9] final.c selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: gcc/ChangeLog: * final.c: Include selftest.h and selftest-rtl.h. (class selftest::temp_asm_out): New subclass of selftest::named_temp_file. (selftest::temp_asm_out::temp_asm_out): New ctor.

Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 03:51:11PM -0400, Jason Merrill wrote: > On Mon, Sep 5, 2016 at 1:11 PM, Jakub Jelinek wrote: > > + /* If body is a statement other than STATEMENT_LIST or BIND_EXPR, > > + it should be skipped. E.g. switch (a) b = a; */ > > + if (TREE_CODE (body)

Re: [PATCH 7/9] combine.c selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: gcc/ChangeLog: * combine.c: Include selftest.h and selftest-rtl.h. (try_combine): Add assertion on this_basic_block. (class selftest::combine_test): New subclass of selftest::tl_dump_test.

Re: [PATCH] Fix warning breaking profiled bootstrap

2016-09-16 Thread Andi Kleen
On Fri, Sep 16, 2016 at 10:44:34AM -0600, Jeff Law wrote: > On 08/21/2016 02:30 PM, Eric Botcazou wrote: > > > Consider the case where sym1 results in a non-null return value (and > > > initializes neg1/inv1), but sym2 results in a null return value, leaving > > > neg2/inv2 undefined, but cst2 is

Re: [PATCH 6/9] df selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: gcc/ChangeLog: * df-core.c: Include selftest.h and selftest-rtl.h. (selftest::dataflow_test::dataflow_test): New ctor. (selftest::dataflow_test::~dataflow_test): New dtor. (selftest::test_df_single_set): New function.

Re: [PATCH 3/9] selftest.h: add temp_override fixture

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: We have a lot of global state in our code. Ideally we'd reduce the amount of such global state, but a prerequisite for sane refactoring is having automated testing in place to ensure that the refactoring doesn't break anything. However, the global

Re: [PATCH 9/9] cse.c selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: This patch uses rtl_dump_test to start building out a test suite for cse. I attempted to create a reproducer for PR 71779; however I'm not yet able to replicate the bogus cse reported there via the test case. gcc/ChangeLog: * cse.c: Include

Re: [PATCH 4/9] Expose forcibly_ggc_collect and run it after all selftests

2016-09-16 Thread Jeff Law
On 09/08/2016 06:30 PM, David Malcolm wrote: Force a GC at the end of the selftests, to shake out GC-related issues. For example, if any GC-managed items have buggy (or missing) finalizers, this last collection will ensure that things that were failed to be finalized can be detected by

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

2016-09-16 Thread Jeff Law
On 09/13/2016 05:15 AM, Bernd Schmidt wrote: Note that the loader now resets INSN_CODE to -1, regardless of the actual code passed in, to force re-recognition, and to isolate the dumps somewhat from changes to the .md files. So although the above says insn 641 and 642 (for some snapshot of the

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

2016-09-16 Thread Jeff Law
On 09/14/2016 02:37 AM, Richard Biener wrote: Note that while the "snippets" may largely work (not sure how many you tried to come up with) I see the issue that a lot of RTL "unit tests" would need some trees set up, like to properly form MEM_EXPRs or REG_DECL or even SYMBOL_REFs. So I fear

Re: [C++ PATCH] Fix ICE in cp/error.c (PR c++/77482)

2016-09-16 Thread Jason Merrill
OK. On Mon, Sep 5, 2016 at 1:17 PM, Jakub Jelinek wrote: > Hi! > > The recent concept changes that were also backported to 6.2 break > diagnostics e.g. on the following testcase, sometimes it ICEs during > reporting of the first error, so isn't just a normal low prio error >

Re: [C++ PATCH] Fix constexpr switch handling (PR c++/77467)

2016-09-16 Thread Jason Merrill
On Mon, Sep 5, 2016 at 1:11 PM, Jakub Jelinek wrote: > + /* If body is a statement other than STATEMENT_LIST or BIND_EXPR, > + it should be skipped. E.g. switch (a) b = a; */ > + if (TREE_CODE (body) == STATEMENT_LIST > + || TREE_CODE (body) == BIND_EXPR) I'm

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

2016-09-16 Thread Jeff Law
On 09/12/2016 10:19 AM, Tamar Christina wrote: Hi All, This patch adds an optimized route to the fpclassify builtin for floating point numbers which are similar to IEEE-754 in format. The goal is to make it faster by: 1. Trying to determine the most common case first (e.g. the float is a

Re: [PATCH] Fix abi_tag23* test failure (PR c++/77379)

2016-09-16 Thread Jason Merrill
OK. On Mon, Aug 29, 2016 at 4:10 PM, Jakub Jelinek wrote: > On Mon, Aug 29, 2016 at 12:42:28PM -0400, Jason Merrill wrote: >> Another missing ABI tag, sigh. >> >> Tested x86_64-pc-linux-gnu, applying to trunk. > >> commit 1337a943a2d3926537b63d6e1f0d7f46ef10a06d >> Author:

Re: [C++ PATCH] Fix ICE with PARM_DECL with incomplete type (PR c++/77338)

2016-09-16 Thread Jason Merrill
OK. On Mon, Aug 29, 2016 at 3:46 PM, Jakub Jelinek wrote: > Hi! > > In r239289 you've done something similar for the VAR_DECL etc. case, but > for PARM_DECL we can still call is_really_empty_class on incomplete types > and ICE because TYPE_BINFO is NULL. > > Fixed thusly,

Re: [C++ PATCH] Propagate CLASSTYPE_HAS_MUTABLE from bases to derived classes (PR c++/77375)

2016-09-16 Thread Jason Merrill
OK. On Mon, Aug 29, 2016 at 3:37 PM, Jakub Jelinek wrote: > Hi! > > The following testcase fails (foo is allocated in .rodata and modified) > because while we clear TREE_READONLY for classes with mutable members, we > don't do that if they only have bases with mutable members.

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

2016-09-16 Thread Mike Stump
On Sep 16, 2016, at 6:40 AM, Segher Boessenkool wrote: > > Does just "The default version of this target hook returns true." sound > better? I.e. delete "always". That is fine.

[Patch, reload, tentative, PR 71627] Tweak conditions in find_valid_class_1

2016-09-16 Thread Senthil Kumar Selvaraj
Hi, The below patch fixes what I think are a couple of problems with reload.c:find_valid_class_1. First, even if no regno is in_hard_reg_set_p, it goes ahead and considers rclass as valid. bad is set only if a regno is in the reg class *and* HARD_REGNO_MODE_OK is false - if both are

[PATCH] Fix cgraph_node::rtl_info (PR target/77587)

2016-09-16 Thread Jakub Jelinek
Hi! On the following testcase the weak alias can be overridden, so we shouldn't assume because we see bar to be alias to foo and have foo definition that call to bar will bind to the current TU's foo. cgraph_node::rtl_info calls ultimate_alias_target without checking if it can be overridden or

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

2016-09-16 Thread Torvald Riegel
On Thu, 2016-09-15 at 06:05 -0700, Ian Lance Taylor wrote: > 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

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-16 Thread David Malcolm
On Sun, 2016-09-11 at 20:03 -0600, Martin Sebor wrote: > On 09/08/2016 04:10 PM, Joseph Myers wrote: > > On Thu, 8 Sep 2016, Martin Sebor wrote: > > > > > diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in > > > index da133a4..4607495 100644 > > > --- a/gcc/doc/tm.texi.in > > > +++

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

2016-09-16 Thread Jason Merrill
On 09/14/2016 01:03 PM, Martin Sebor wrote: 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

Re: [PATCH][Libiberty] Support empty arguments in pex-win32

2016-09-16 Thread DJ Delorie
This is OK. Thanks!

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

2016-09-16 Thread Jonathan Wakely
On 16/09/16 13:12 +0100, Jonathan Wakely wrote: On 16/09/16 11:56 +0100, Jonathan Wakely wrote: On 16/09/16 11:37 +0200, Marc Glisse wrote: Is the division (by a non-constant denominator) really necessary? Probably not, but I've asked the committee for clarification what this function should

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-16 Thread Jeff Law
On 09/11/2016 08:03 PM, Martin Sebor wrote: Attached is revision 8 of the patch (hopefully) adjusted as requested above, and with a simple test with of the multiline diagnostic directives suggested by David. This revision also enables the -fprintf-return-value option by default. The libgomp

[Committed] Fix PR fortran/77612

2016-09-16 Thread Steve Kargl
I've committed the following patch. 2016-09-16 Steven G. Kargl PR fortran/77612 * decl.c (char_len_param_value): Check parent namespace for seen_implicit_none. 2016-09-16 Steven G. Kargl PR fortran/77612 *

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Joseph Myers
On Fri, 16 Sep 2016, Thomas Schwinge wrote: > That's what I was afraid of: for example, I can't tell if it holds for > all GCC configurations (back ends), that complex types' component types > will always match one of the already existing global trees? (I can Well, a component type could

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Joseph Myers
On Fri, 16 Sep 2016, Richard Biener wrote: > Humm ... do we anywhere compare to those global trees by pointer equivalence? > If so then it breaks LTO support for those types. The C front end compares main variants to those types for handling usual arithmetic conversions (and more generally for

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-16 Thread Jeff Law
On 09/08/2016 01:03 PM, Martin Sebor wrote: Attached is another update to the patch to address the last round of comments and suggestions, most notably to: * implement the checking of the implementation limit of 4,095 on the output of a single directive to allow for the Glibc failure

Re: [PATCH] unbreak libsanitizer build on sparc-linux (PR 67899)

2016-09-16 Thread Jeff Law
On 09/12/2016 11:04 AM, Mikael Pettersson wrote: PR sanitizer/67899 is a bootstrap failure on sparc-linux, caused by a compilation error in libsanitizer. The root cause is that `struct sigaction' has changed layout in glibc twice recently, first an unintended ABI change in glibc-2.20, and then

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-16 Thread Jeff Law
On 09/08/2016 08:19 PM, Martin Sebor wrote: While working on the -Wformat-length pass I noticed that in some diagnostics that make use of the %qc and %qs directives GCC prints non-printable characters raw. For example, it might print a newline, corrupting the diagnostic stream (bug 77521).

Re: [PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-16 Thread Jeff Law
On 09/09/2016 05:17 PM, Martin Sebor wrote: On 09/09/2016 07:59 AM, Joseph Myers wrote: On Thu, 8 Sep 2016, Martin Sebor wrote: PS I used hexadecimal based on what c-format.c does but now that I checked more carefully how %qE formats string literals I see it uses octal. I think hexadecimal

Re: [PATCH] Fix warning breaking profiled bootstrap

2016-09-16 Thread Jeff Law
On 08/21/2016 02:30 PM, Eric Botcazou wrote: Consider the case where sym1 results in a non-null return value (and initializes neg1/inv1), but sym2 results in a null return value, leaving neg2/inv2 undefined, but cst2 is can still be true (ADDR_EXPR with an invariant address comes to mind). Thus

Re: RFA: Small PATCH to add pow2p_hwi to hwint.h

2016-09-16 Thread Jeff Law
On 09/08/2016 02:59 PM, Jason Merrill wrote: On Thu, Sep 8, 2016 at 11:55 AM, Joseph Myers wrote: > On Thu, 8 Sep 2016, Jason Merrill wrote: > >> Various places in GCC use negate, bit-and and compare to test whether >> an integer is a power of 2, but I think it would

[PATCH][Libiberty] Support empty arguments in pex-win32

2016-09-16 Thread Andrew Stubbs
Hi, This patch fixes a libiberty bug in which zero-length arguments to "pex_run" subprocesses were silently dropped on MinGW. Basically, the code does not quote parameters unless it has to, but this corner-case was forgotten. OK? Andrew 2016-09-16 Andrew Stubbs

RE: [RFC,PATCH] Using equivalences to help eliminate_regs_in_insn

2016-09-16 Thread Matthew Fortune
Vladimir N Makarov writes: > On 09/06/2016 11:22 AM, Matthew Fortune wrote: > > There is an implementation that optimises a single set but not one for > > a REG_EQUAL. Do you have any recollection of this code and do you > > think there was a reason you didn't implement the

Re: [PATCH, rs6000] Fix PR77613 (swap optimization for splat-with-truncate)

2016-09-16 Thread Segher Boessenkool
On Fri, Sep 16, 2016 at 10:13:09AM -0500, Bill Schmidt wrote: > Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no > regressions. Ok for trunk, and eventual backport to 6 and 5 branches? Okay and okay. One nit... > --- gcc/config/rs6000/rs6000.c(revision 240187) > +++

Re: [RFC,PATCH] Using equivalences to help eliminate_regs_in_insn

2016-09-16 Thread Vladimir N Makarov
On 09/06/2016 11:22 AM, Matthew Fortune wrote: There is an implementation that optimises a single set but not one for a REG_EQUAL. Do you have any recollection of this code and do you think there was a reason you didn't implement the REG_EQUAL case? Either way any advice on my approach is

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

2016-09-16 Thread Jeff Law
On 09/16/2016 07:28 AM, Wilco Dijkstra wrote: I noticed rawmemchr taking non-trivial amounts of time in various profiles despite no use of rawmemchr in any of the source code. It's apparently a common idiom to use strchr (s, 0) to find the end of a string. A bit of a surprise, but it is what

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

2016-09-16 Thread Jeff Law
On 09/16/2016 04:10 AM, Bernd Schmidt wrote: On 09/16/2016 12:10 PM, Trevor Saunders wrote: ok, going through all the casts added here I see the following reasons for them. - in md files operands is a array of rtx, we should probably have a different way to pass insns to the C code here.

[PATCH, rs6000] Fix PR77613 (swap optimization for splat-with-truncate)

2016-09-16 Thread Bill Schmidt
Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77613 identifies a case where we fail to remove swaps from a region because it contains a form of splat that we don't yet recognize. This patch adds support for splat insns that have an embedded truncate, such as the vsx_vsplth_di pattern.

Re: [PATCH 2/8] use rtx_insn * more

2016-09-16 Thread Alexander Monakov
On Wed, 14 Sep 2016, tbsaunde+...@tbsaunde.org wrote: > @@ -3790,7 +3790,8 @@ static void > rl78_calculate_death_notes (void) > { >char dead[FIRST_PSEUDO_REGISTER]; > - rtx insn, p, s, d; > + rtx p, s, d; > +rtx_insn *insn; Minor nit: this hunk seems to be missing indentation preceding

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

2016-09-16 Thread Trevor Saunders
On Fri, Sep 16, 2016 at 12:10:51PM +0200, Bernd Schmidt wrote: > On 09/16/2016 12:10 PM, Trevor Saunders wrote: > > ok, going through all the casts added here I see the following reasons > > for them. > > > > - in md files operands is a array of rtx, we should probably have a > > different way

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

2016-09-16 Thread Segher Boessenkool
On Fri, Sep 16, 2016 at 12:26:42PM +0200, Gerald Pfeifer wrote: > On Wed, 14 Sep 2016, Segher Boessenkool wrote: > > 2016-09-14 Segher Boessenkool > > > > * target.def (lra_p): Change commentary (for the manual) for the > > new default. > > *

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Thomas Schwinge
Hi! On Fri, 16 Sep 2016 10:59:16 +0200, Richard Biener wrote: > On Fri, Sep 16, 2016 at 9:05 AM, Thomas Schwinge > wrote: > > On Thu, 08 Sep 2016 13:43:30 +0200, I wrote: > >> On Wed, 7 Sep 2016 14:23:18 +0200, Richard Biener > >>

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

2016-09-16 Thread Wilco Dijkstra
Bernd Schmidt wrote: > 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

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

2016-09-16 Thread Richard Kenner
> "returns always true" -> "always returns true" ? > > (The former is how we'd say it in German, and hence might be common in > Dutch as well? In English, both probably are fine, the latter feeling > more natural to me. But then, I'm not a native speaker. ;-) The former is unusual in English

[PATCH] Fix PR77605

2016-09-16 Thread Richard Biener
The following patch fixes PR77605. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2016-09-16 Richard Biener PR middle-end/77605 * tree-data-ref.c (analyze_subscript_affine_affine): Use the proper niter to bound the loops.

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

2016-09-16 Thread Rainer Orth
Hi Jonathan, > I've committed the patch now, to fix the failures for Solaris. I'll > revisit it when I get clarification from the committee about invalid > alignment arguments. Solaris bootstraps with the revised patch included just completed successfully. Thanks. Rainer --

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

2016-09-16 Thread Jonathan Wakely
On 16/09/16 11:56 +0100, Jonathan Wakely wrote: On 16/09/16 11:37 +0200, Marc Glisse wrote: On Fri, 16 Sep 2016, Jonathan Wakely wrote: On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once

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

2016-09-16 Thread Jan Hubicka
> > > I also like a new param better as it avoids a new magic constant and > > > makes playing with > > > it easier (your patch removes the ability to do statistics like you did > > > via the > > > early-inlining-insns parameter by forcing it to two). > > > > Hmm, you are right that you do not

[Patch, testsuite] Require int32plus for pr70421.c

2016-09-16 Thread Senthil Kumar Selvaraj
Hi, This patch fixes a bogus testsuite failure for the avr target. The test has integer literals that only fit on targets with int size >= 32. Committed to trunk. Regards Senthil gcc/testsuite/ChangeLog 2016-09-16 Senthil Kumar Selvaraj *

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

2016-09-16 Thread Yuan, Pengfei
> > I also like a new param better as it avoids a new magic constant and > > makes playing with > > it easier (your patch removes the ability to do statistics like you did via > > the > > early-inlining-insns parameter by forcing it to two). > > Hmm, you are right that you do not know if this

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

2016-09-16 Thread Richard Biener
On Thu, 15 Sep 2016, Richard Biener wrote: > > 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

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 11:45, Bernd Schmidt wrote: On 09/16/2016 10:40 AM, Kyrill Tkachov wrote: 2016-09-16 Kyrylo Tkachov * simplify-rtx.c (simplify_relational_operation_1): Add transformation (GTU (PLUS a C) (C - 1)) --> (LTU a -C). 2016-09-16 Kyrylo Tkachov

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

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

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

2016-09-16 Thread Jonathan Wakely
On 16/09/16 11:37 +0200, Marc Glisse wrote: On Fri, 16 Sep 2016, Jonathan Wakely wrote: On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jonathan's patch to heed aligned_alloc's

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bernd Schmidt
On 09/16/2016 10:40 AM, Kyrill Tkachov wrote: 2016-09-16 Kyrylo Tkachov * simplify-rtx.c (simplify_relational_operation_1): Add transformation (GTU (PLUS a C) (C - 1)) --> (LTU a -C). 2016-09-16 Kyrylo Tkachov *

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

2016-09-16 Thread Jakub Jelinek
On Fri, Sep 16, 2016 at 12:29:49PM +0200, Richard Biener wrote: > > PS What would be a good way to arrange for the VRP pass to run before > > the object size pass so that the latter can benefit more from range > > information? As an experiment I added another instance of the VRP > > pass before

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

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 5:29 AM, 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

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

2016-09-16 Thread Gerald Pfeifer
On Wed, 14 Sep 2016, Segher Boessenkool wrote: > 2016-09-14 Segher Boessenkool > > * target.def (lra_p): Change commentary (for the manual) for the > new default. > * doc/tm.texi: Regenerate. "returns always true" -> "always returns true" ? (The

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 11:07 AM, Kyrill Tkachov wrote: > > On 16/09/16 11:05, Bin.Cheng wrote: >> >> On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov >> wrote: >>> >>> On 16/09/16 10:50, Bin.Cheng wrote: On Fri, Sep 16, 2016 at

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

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 7:59 AM, kugan wrote: > 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

[committed] Use true/false instead of 1/0 in lvalue_p

2016-09-16 Thread Marek Polacek
lvalue_p returns bool but was using 0/1 as return values. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2016-09-16 Marek Polacek * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0. diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c index

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

2016-09-16 Thread Bernd Schmidt
On 09/16/2016 12:10 PM, Trevor Saunders wrote: ok, going through all the casts added here I see the following reasons for them. - in md files operands is a array of rtx, we should probably have a different way to pass insns to the C code here. That seems worth investigating incrementally.

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 11:05, Bin.Cheng wrote: On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov wrote: On 16/09/16 10:50, Bin.Cheng wrote: On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: On 16/09/16 10:02, Richard Biener wrote: On

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 10:53 AM, Kyrill Tkachov wrote: > > On 16/09/16 10:50, Bin.Cheng wrote: >> >> On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov >> wrote: >>> >>> On 16/09/16 10:02, Richard Biener wrote: On Fri, Sep 16,

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

2016-09-16 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

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 10:50, Bin.Cheng wrote: On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: On 16/09/16 10:02, Richard Biener wrote: On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: Hi all, Currently the functions: int

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Bin.Cheng
On Fri, Sep 16, 2016 at 10:20 AM, Kyrill Tkachov wrote: > > On 16/09/16 10:02, Richard Biener wrote: >> >> On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov >> wrote: >>> >>> Hi all, >>> >>> Currently the functions: >>> int f1(int x, int

Backports to 6.x

2016-09-16 Thread Jakub Jelinek
Hi! I've backported a bunch of patches to 6.x, after bootstrapping/regtesting them on x86_64-linux and i686-linux: Jakub 2016-09-16 Jakub Jelinek Backported from mainline 2016-09-05 Jakub Jelinek PR sanitizer/77396

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

2016-09-16 Thread Marc Glisse
On Fri, 16 Sep 2016, Jonathan Wakely wrote: On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jonathan's patch to heed aligned_alloc's requirement on size being a multiple of alignment is

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
On 16/09/16 10:02, Richard Biener wrote: On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: Hi all, Currently the functions: int f1(int x, int t) { if (x == -1 || x == -2) t = 1; return t; } int f2(int x, int t) { if (x == -1 || x == -2)

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

2016-09-16 Thread Jan Hubicka
> On Fri, Sep 16, 2016 at 10:50 AM, Yuan, Pengfei wrote: > >> > Here are the results: > >> > > >> > Param Size (GCC5)Time (GCC5) Time (GCC7) > >> > 0 44686265 (-8.26%) 58.772s 66.332s > >> > 1 45692793 (-6.19%) 40.684s 39.220s > >> > 2

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

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 10:50 AM, Yuan, Pengfei wrote: >> > Here are the results: >> > >> > Param Size (GCC5)Time (GCC5) Time (GCC7) >> > 0 44686265 (-8.26%) 58.772s 66.332s >> > 1 45692793 (-6.19%) 40.684s 39.220s >> > 2 45556185 (-6.47%)

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

2016-09-16 Thread Jonathan Wakely
On 16/09/16 09:04 +0200, Rainer Orth wrote: Hi Jason, OK, one more: this works just fine on both sparc-sun-solaris2.12 and i386-pc-solaris2.12. Once Jonathan's patch to heed aligned_alloc's requirement on size being a multiple of alignment is in, all is fine on Solaris. I've got a

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

2016-09-16 Thread Marek Polacek
On Thu, Sep 15, 2016 at 01:21:21PM -0600, Jeff Law wrote: > 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

Re: [PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 10:40 AM, Kyrill Tkachov wrote: > Hi all, > > Currently the functions: > int f1(int x, int t) > { > if (x == -1 || x == -2) > t = 1; > return t; > } > > int f2(int x, int t) > { > if (x == -1 || x == -2) > return 1; > return t;

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

2016-09-16 Thread Marek Polacek
On Thu, Sep 15, 2016 at 04:45:03PM -0400, Eric Gallager wrote: > > +@item -Wbool-operation > > +@opindex Wno-bool-operation > > +@opindex Wbool-operation > > +Warn about suspicious operations on expressions of a boolean type. For > > +instance, bitwise negation of a boolean is very likely a bug

Re: [PR lto/77458] Avoid ICE in offloading with differing _FloatN, _FloatNx types (was: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6]))

2016-09-16 Thread Richard Biener
On Fri, Sep 16, 2016 at 9:05 AM, Thomas Schwinge wrote: > Hi! > > (CCing Bernd and Jakub -- for your information, or: "amusement" -- as > you've discussed offloading preload_common_nodes issues before...) > > Got to look into this some more, yesterday: > > On Thu, 08 Sep

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

2016-09-16 Thread Yuan, Pengfei
> > Here are the results: > > > > Param Size (GCC5)Time (GCC5) Time (GCC7) > > 0 44686265 (-8.26%) 58.772s 66.332s > > 1 45692793 (-6.19%) 40.684s 39.220s > > 2 45556185 (-6.47%) 35.292s 34.328s > > 3 46251049 (-5.05%) 28.820s 27.136s > > 4

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

2016-09-16 Thread Richard Biener
On Thu, Sep 15, 2016 at 4:45 PM, Jeff Law wrote: > 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. */ +

[PATCH][simplify-rtx] (GTU (PLUS a C) (C - 1)) --> (LTU a -C)

2016-09-16 Thread Kyrill Tkachov
Hi all, Currently the functions: int f1(int x, int t) { if (x == -1 || x == -2) t = 1; return t; } int f2(int x, int t) { if (x == -1 || x == -2) return 1; return t; } generate different code on AArch64 even though they have identical functionality: f1: add w0, w0,

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

2016-09-16 Thread Richard Biener
On Fri, 16 Sep 2016, Andreas Schwab wrote: > * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use parameter > OFFSET, not offset. > * config/i386/cygming.h (ASM_OUTPUT_DWARF_OFFSET): Likewise. Oops. Ok (counts as obvious). Thanks, Richard. > diff --git

  1   2   >