Re: libgo patch committed: Fix signal counting for glibc 2.26

2017-08-04 Thread Richard Biener
On Thu, Aug 3, 2017 at 8:11 PM, Ian Lance Taylor wrote: > This patch to libgo changes the mksigtab script to recognize the glibc > 2.26 NSIG expression. Bootstrapped and ran Go testsuite on > x86_64-pc-linux-gnu. Committed to mainline. Will commit to GCC 7 > branch when it

Re: [PATCH] Improve var_bound range test opt (PR tree-optimization/81655)

2017-08-04 Thread Richard Biener
On Thu, 3 Aug 2017, Jeff Law wrote: > On 08/03/2017 03:32 AM, Jakub Jelinek wrote: > > On Thu, Aug 03, 2017 at 10:58:07AM +0200, Richard Biener wrote: > >>> The reason why we punt is the unexpected _4 != 1 condition, the code > >>> is prepared to handle just _4 == 0 (or _4 != 0) where _4 == 0 is

[WIP] Possible Bug in vect_bb_slp_scalar_cost?

2017-08-04 Thread Dominik Inführ
Hi, vect_bb_slp_scalar_cost computes the scalar cost of a SLP node. If there are non-scalar uses of a definition, the costs for it and its operands (children) are ignored. The vector LIFE is used to keep track of this and an element is set to true, such that the def and its children are

Re: [WIP] Possible Bug in vect_bb_slp_scalar_cost?

2017-08-04 Thread Richard Biener
On Fri, Aug 4, 2017 at 12:08 PM, Dominik Inführ wrote: > Hi, > > vect_bb_slp_scalar_cost computes the scalar cost of a SLP node. If there are > non-scalar uses of a definition, the costs for it and its operands (children) > are ignored. The vector LIFE is

[PATCH] Fix PR81705

2017-08-04 Thread Richard Biener
The following fixes PR81705, a simple omission in my last association patch. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2017-08-04 Richard Biener PR middle-end/81705 * fold-const.c (fold_binary_loc): Properly restrict

Re: [GCC][PATCH][mid-end][Version 3] Optimize x * copysign (1.0, y) [Patch (1/2)]

2017-08-04 Thread Richard Biener
On Thu, 3 Aug 2017, Tamar Christina wrote: > Hi All, > > this patch implements a optimization rewriting > > x * copysign (1.0, y) > > to: > > x ^ (y & (1 << sign_bit_position)) > > > This is only done when not honoring signaling NaNs. > This transormation is done at ssa mult widening time

Re: [PATCH] Verify edge probability consistency in verify_flow_info

2017-08-04 Thread Tom de Vries
On 08/04/2017 11:15 AM, Jan Hubicka wrote: OK for trunk if bootstrap and reg-test on x86_64 succeeds? Yea, but I'd like to see ongoing work towards full checking. I have full checking in my tree for some time. At x86-64 bootstrap there is one remaining offender in simd_clone_adjust which was

Re: [PATCH][GCC] Simplification of 1U << (31 - x)

2017-08-04 Thread Richard Biener
On Tue, Aug 1, 2017 at 11:14 AM, Sudi Das wrote: > > > > > Sorry about the delayed response but looking at the above discussion, should > I conclude that this is a valid tree simplification? Yes, I think so. Jakub requested code to undo this at RTL expansion based on target

RE: [PATCH] i386: Rewrite check for AVX512 features

2017-08-04 Thread Peryt, Sebastian
> -Original Message- > From: Uros Bizjak [mailto:ubiz...@gmail.com] > Sent: Sunday, July 30, 2017 11:02 AM > To: H.J. Lu > Cc: gcc-patches@gcc.gnu.org; Koval, Julia ; Peryt, > Sebastian > Subject: Re: [PATCH] i386:

Re: gotools patch committed: Test runtime, misc/cgo/{test,testcarchive}

2017-08-04 Thread Uros Bizjak
On Wed, Jul 26, 2017 at 10:26 PM, Ian Lance Taylor wrote: > On Sat, Jul 22, 2017 at 11:08 AM, Uros Bizjak wrote: >>> This patch to the gotools Makefile adds tests to `make check`. We now >>> test the runtime package using the newly built go tool, and test

Re: [PATCH][RFC] Make expansion of balanced binary trees of switches on tree level.

2017-08-04 Thread Martin Liška
On 08/03/2017 02:52 PM, Steven Bosscher wrote: > On Wed, Aug 2, 2017 at 1:20 PM, Martin Liška wrote: >> Hello. >> >> After some discussions with Honza, I've decided to convert current code in >> stmt.c that >> is responsible for switch expansion. More precisely, I would like to convert >> the

Re: [PATCH][RFC] Make expansion of balanced binary trees of switches on tree level.

2017-08-04 Thread Martin Liška
On 08/03/2017 03:27 PM, Steven Bosscher wrote: > On Thu, Aug 3, 2017 at 2:56 PM, Richard Biener wrote: >> I think the main reason for not doing it early is the benefit is small >> (unless it is GIMPLE optimizations triggering) > > Agree. > >> and we can't get rid of >> switches completely

Re: [PATCH] Fold (int *) + 4 to a[1] using offset_int (PR middle-end/81695)

2017-08-04 Thread Richard Biener
On Fri, Aug 4, 2017 at 10:38 AM, Marek Polacek wrote: > We were crashing because size_binop_loc got operands of different types: > sizetype and ssizetype. Richi suggested performing the computation in > offset_int which my patch tries to do. Unsure about the sdiv_trunc part,

Re: [PATCHv5][PR 57371] Remove useless floating point casts in comparisons

2017-08-04 Thread Richard Biener
On Sun, Jul 30, 2017 at 9:25 AM, Yury Gribov wrote: > Hi all, > > This is an updated version of patch in > https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00924.html . It prevents > optimization in presense of sNaNs (and qNaNs when comparison operator is > >>= < <=) to

Re: [PATCH] Verify edge probability consistency in verify_flow_info

2017-08-04 Thread Jan Hubicka
> > > > III. > > > > I've written this patch to check for the missing probability more > > consistently. I'm not certain if we can require that the probability > > should always be set, so I'm just requiring that if it is set on one > > outgoing edge, it needs to be set on all outgoing edges. >

Re: Handle data dependence relations with different bases

2017-08-04 Thread Richard Biener
On Fri, Aug 4, 2017 at 11:28 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Thu, Jul 27, 2017 at 2:19 PM, Richard Sandiford >> wrote: >>> Richard Sandiford writes:

[C++ Patch Ping] Re: [C++ Patch] PR 79790 ("[C++17] ICE class template argument deduction")

2017-08-04 Thread Paolo Carlini
Hi, On 14/07/2017 19:51, Nathan Sidwell wrote: On 07/14/2017 01:32 PM, Paolo Carlini wrote: While working on the bug I also noticed that we can simplify a bit the code generating the implicit deduction guides: if I'm not mistaken, when we pass types as first argument of build_deduction_guide

Re: Handle data dependence relations with different bases

2017-08-04 Thread Richard Biener
On Thu, Jul 27, 2017 at 2:19 PM, Richard Sandiford wrote: > Richard Sandiford writes: >> Eric Botcazou writes: >>> [Sorry for missing the previous messages] >>> Thanks. Just been retesting, and I think I

Re: Handle data dependence relations with different bases

2017-08-04 Thread Richard Sandiford
Richard Biener writes: > On Thu, Jul 27, 2017 at 2:19 PM, Richard Sandiford > wrote: >> Richard Sandiford writes: >>> Eric Botcazou writes: [Sorry for missing the previous

Re: [PATCH] Fold (int *) + 4 to a[1] using offset_int (PR middle-end/81695)

2017-08-04 Thread Marek Polacek
On Fri, Aug 04, 2017 at 11:08:49AM +0200, Richard Biener wrote: > On Fri, Aug 4, 2017 at 10:38 AM, Marek Polacek wrote: > > We were crashing because size_binop_loc got operands of different types: > > sizetype and ssizetype. Richi suggested performing the computation in > >

[PATCH] Fold (int *) + 4 to a[1] using offset_int (PR middle-end/81695)

2017-08-04 Thread Marek Polacek
We were crashing because size_binop_loc got operands of different types: sizetype and ssizetype. Richi suggested performing the computation in offset_int which my patch tries to do. Unsure about the sdiv_trunc part, what do I use instead of EXACT_DIV_EXPR? Bootstrapped/regtested on

Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path

2017-08-04 Thread Yury Gribov
On Thu, Aug 3, 2017 at 12:45 PM, Ximin Luo wrote: > Yury Gribov: >> On 03.08.2017 3:06, Ximin Luo wrote: >>> Jeff Law: On 07/21/2017 10:15 AM, Ximin Luo wrote: > (Please keep me on CC, I am not subscribed) > > > Proposal > > > This

Re: [PATCH] Fix PR81354 (rewrite gimple_split_edge)

2017-08-04 Thread Bill Schmidt
On Aug 1, 2017, at 10:56 AM, Bill Schmidt wrote: > > On Aug 1, 2017, at 8:50 AM, Bill Schmidt wrote: >> >> On Aug 1, 2017, at 7:44 AM, Bill Schmidt wrote: >>> On Aug 1, 2017, at 3:46 AM, Richard

Re: [PATCH 0/2] add unique_ptr class

2017-08-04 Thread Jonathan Wakely
On 31/07/17 19:46 -0400, tbsaunde+...@tbsaunde.org wrote: I've been saying I'd do this for a long time, but I'm finally getting to importing the C++98 compatable unique_ptr class Pedro wrote for gdb a while back. I believe the gtl namespace also comes from Pedro, but GNU template library seems

Re: [PATCH 2/3] Matching tokens: C parts (v2)

2017-08-04 Thread Jeff Law
On 08/04/2017 08:32 AM, David Malcolm wrote: > On Thu, 2017-08-03 at 11:34 -0600, Jeff Law wrote: >> On 08/01/2017 02:21 PM, David Malcolm wrote: >>> Changed in v2: >>> >>> * Renamed template argument to traits_t; eliminated subclasses, >>> just >>> using traits struct. >>> * Moved enum

Re: [patch, gcc doc + fortran] Make -Ofast honor -fmax-stack-var-size

2017-08-04 Thread Thomas Koenig
Am 04.08.2017 um 14:09 schrieb Thomas Koenig: Hello world, the attached patch This time, really attached, even with ChangeLog! Regards Thomas 2017-08-04 Thomas Koenig PR fortran/68829 * doc/invoke.texi: Document change in behvaior for -Ofast

[PATCH 03/22] Add JSON implementation

2017-08-04 Thread David Malcolm
This patch adds support to gcc for reading and writing JSON, based on DOM-like trees of json::value instances. gcc/ChangeLog: * Makefile.in (OBJS): Add json.o. * json.cc: New file. * json.h: New file. * selftest-run-tests.c (selftest::run_tests): Call

[PATCH 15/22] Add checkers/clang_analyzer.py

2017-08-04 Thread David Malcolm
This patch adds a harness for invoking clang's static analyzer: https://clang-analyzer.llvm.org/ returning the results in JSON format. It runs scan-build, then uses firehose.parsers.clanganalyzer.parse_plist to parse the generated .plist file, turning them into firehose JSON.

[PATCH 04/22] Add firehose.h/cc

2017-08-04 Thread David Malcolm
"Firehose" is a serialization format for results from code analysis tools: http://firehose.readthedocs.io/en/latest/index.html (along with a Python module for working with the format). This patch implements a set of C++ classes modeling the format, with support for populating them from a JSON

[PATCH 11/22] Add checkers/test-sources

2017-08-04 Thread David Malcolm
This patch adds a collection of test sources for use by the testsuites of the various checker harnesses. checkers/ChangeLog: * test-sources/conditional-leak.c: New file. * test-sources/cpychecker-demo.c: New file. * test-sources/divide-by-zero.c: New file. *

[PATCH 16/22] Add checkers/coverity.py

2017-08-04 Thread David Malcolm
This patch is an example of supporting a proprietary 3rd-party tool: a harness for invoking the Coverity checker. It uses the '--json-output-v2' option to cov-format-errors, and then uses firehose.parsers.coverity.parse_json_v2 to parse the generated Coverity JSON format, turning it into firehose

[PATCH][PING][PR target/81535] Fix tests on Power

2017-08-04 Thread Yury Gribov
Hi all, This patch fixes issues reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81535 I removed call to g in pr79439.c because gcc was duplicating the basic block with call depending on compiler flags (so scan-assembler-times pattern wasn't reliable anymore). I also added alias to

[PATCH 00/22] RFC: integrated 3rd-party static analysis support

2017-08-04 Thread David Malcolm
This patch kit clearly isn't ready yet as-is (see e.g. the "known unknowns" below), but I'm posting it now in the hope of getting early feedback. Summary === This patch kit provides an easy way to make integrate 3rd-party static analysis tools into gcc, and have them: (a) report through

[PATCH 01/22] Expose assert_loceq outside of input.c; add ASSERT_LOCEQ

2017-08-04 Thread David Malcolm
gcc/ChangeLog: * input.c: Include "selftest-input.h". (selftest::assert_loceq): Remove "static". Add "report_loc" param and update assertions to use it. (selftest::test_accessing_ordinary_linemaps): Use ASSERT_LOCEQ rather than assert_loceq.

[PATCH 02/22] libcpp: add linemap_position_for_file_line_and_column

2017-08-04 Thread David Malcolm
gcc/ChangeLog: * input.c (selftest::test_making_arbitrary_locations): New function. (selftest::input_c_tests): Call it. libcpp/ChangeLog: * include/line-map.h (linemap_position_for_file_line_and_column): New decl. * line-map.c

[PATCH 21/22] Add checkers/Makefile

2017-08-04 Thread David Malcolm
This patch adds a rather simplistic Makefile to "checkers", purely for exercising the test suites of the various harness. checkers/ChangeLog: * Makefile: New file. --- checkers/Makefile | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 checkers/Makefile

[PATCH 14/22] Add checkers/always_fails.py

2017-08-04 Thread David Malcolm
This patch adds a "checker" that always fails, for ensuring that we can handle failed runs of 3rd-party tools. checkers/ChangeLog: * always_fails.py: New file. --- checkers/always_fails.py | 57 1 file changed, 57 insertions(+) create

[PATCH 06/22] Makefile.in: hack in -lpthread

2017-08-04 Thread David Malcolm
The checker.cc patch later in the kit can optionally make use of pthread if available. Doing it properly would involve some configure checks; this patch simply hacks in -lpthread into LIB unconditionally for now. gcc/ChangeLog: * Makefile.in (LIB): Hack in -lpthread. --- gcc/Makefile.in

[PATCH 12/22] Add -Wrun-analyzers= to common.opt, toplev.c, and invoke.texi

2017-08-04 Thread David Malcolm
This patch introduces -Wrun-analyzers= and wires it up to the checkers.cc code, via toplev.c As noted earlier, I'm not a great fan of the monolithic option syntax here; maybe there should be some kind of option that can be supplied multiple times for adding individual checkers. gcc/ChangeLog:

[PATCH 17/22] Add checkers/cppcheck.py

2017-08-04 Thread David Malcolm
This patch adds a harness for invoking cppcheck: http://cppcheck.sourceforge.net/ returning the results in JSON format. It runs "cppcheck --xml --xml-version=2", then uses firehose.parsers.cppcheck.parse_file to parse the generated .xml file, turning it into firehose JSON. checkers/ChangeLog:

[PATCH 08/22] Add GNU_BUILD_ATTRIBUTE_STATIC_ANALYSIS to annobin.h

2017-08-04 Thread David Malcolm
gcc/ChangeLog: * annobin.h (GNU_BUILD_ATTRIBUTE_STATIC_ANALYSIS): New define. --- gcc/annobin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/annobin.h b/gcc/annobin.h index 76eb01c..1152316 100644 --- a/gcc/annobin.h +++ b/gcc/annobin.h @@ -35,6 +35,7 @@ #define

[PATCH 20/22] Add checkers/splint.py

2017-08-04 Thread David Malcolm
This patch adds a harness for invoking splint: http://splint.org/ returning the results in JSON format. It runs "splint -csv TEMPFILE +csvoverwrite -strict", then uses firehose.parsers.splint.parse_splint_csv and firehose.parsers.splint.parse_splint_stderr to parse the csv and the stderr,

[PATCH 05/22] diagnostic.c/h: add support for external tools

2017-08-04 Thread David Malcolm
This patch adds fields "external_tool" and "external_test_id" to diagnostic_info, allowing for diagnostics to be marked as coming from a 3rd-party tool. Instead of printing the pertinent warning flag e.g.: foo.c:10:1: something is wrong [-Wpointer-arith] the tool "ID" and (optionally) test ID

[PATCH 13/22] Add checkers/checker.py

2017-08-04 Thread David Malcolm
This patch: * creates a new "checkers" top-level directory to hold harnesses for 3rd-party code-checking tools. * adds a "checker.py" Python module for use when implementing such harnesses 3rd-party code-checking tools are expected to be passed command-line arguments by the frontend, and to

[PATCH 18/22] Add checkers/flawfinder.py

2017-08-04 Thread David Malcolm
This patch adds a harness for invoking flawfinder: https://www.dwheeler.com/flawfinder/ returning the results in JSON format. It runs "flawfinder", then uses firehose.parsers.flawfinder.parse_file to parse the stdout, turning it into firehose JSON. checkers/ChangeLog: * flawfinder.py:

Re: [C++ Patch] PR 79790 ("[C++17] ICE class template argument deduction")

2017-08-04 Thread Tim Song
On Fri, Aug 4, 2017 at 1:32 PM, Paolo Carlini wrote: > About the exact wording, I'm a little puzzled, because, besides the > "implicit" nit, the "copy-inizialization" already occurs in two other places > in that function, in the preceding: > > if (elided && !cands) >

Re: [PATCH, rs6000] Move vec_mulo() and vec_mule() builtin test cases to P8 test file.

2017-08-04 Thread Segher Boessenkool
On Fri, Aug 04, 2017 at 10:27:29AM -0700, Carl Love wrote: > The following patch moves the vec_mule() and vec_mulo() builtin test > cases to the builtins-3-p8.c test case file. These builtins use P8 > instructions so they need to be in the P8 test file. Okay for trunk. Thanks for fixing this!

Re: [PATCH 1/2] add unique_ptr header

2017-08-04 Thread Jonathan Wakely
On 01/08/17 23:09 -0400, Trevor Saunders wrote: aiui C++03 is C++98 with a few additions to the stl. Again, STL != C++ Standard Library. C++03 made some important changes to the core language, particularly the value-initialization rules. Most of the library changes were small bug fixes, and

Re: [C++ Patch] PR 79790 ("[C++17] ICE class template argument deduction")

2017-08-04 Thread Paolo Carlini
Hi, On 04/08/2017 20:05, Tim Song wrote: These messages are only emitted when elided == true, which, if I'm reading the code correctly, is only the case when you are in copy-initialization context (and have skipped at least one explicit guide). Ah! Thanks! Paolo.

Re: [PATCH] Fix switch expansion (PR middle-end/81698)

2017-08-04 Thread Richard Biener
On August 4, 2017 5:42:21 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >As mentioned inthe PR, the switch expansion relies on EDGE_SUCC (bb, 0) >from a GIMPLE_SWITCH to be the default edge, but GIMPLE only ensures >that >default label is the first one. > >So, this patch (in

[PATCH, rs6000] Move vec_mulo() and vec_mule() builtin test cases to P8 test file.

2017-08-04 Thread Carl Love
GCC Maintainers: The following patch moves the vec_mule() and vec_mulo() builtin test cases to the builtins-3-p8.c test case file. These builtins use P8 instructions so they need to be in the P8 test file. Please let me know if the following patch is acceptable. Thanks.

Re: [C++ Patch] PR 79790 ("[C++17] ICE class template argument deduction")

2017-08-04 Thread Paolo Carlini
Hi, On 04/08/2017 19:00, Jason Merrill wrote: On 07/14/2017 01:32 PM, Paolo Carlini wrote: + error ("cannot deduce template arguments for copy-initialization" + " of %qT, as it has no viable implicit deduction guides", type); Why "copy-initialization"? We do deduction for

[PATCH 10/22] Add checkers.h/cc

2017-08-04 Thread David Malcolm
This implements a new "policy" class to read a description of a set of checkers to run, along with a "checker" class to handle actually running the checkers, ouputting the results through gcc's diagnostic subsystem, and watermarking the generated binary with the results and metadata. Caveats: *

[PATCH 07/22] Add minimal version of Nick Clifton's annobin code

2017-08-04 Thread David Malcolm
This patch provides a way to "watermark" binaries with metadata. It's used later in the patch kit to watermark binaries with static analysis results and metadata. See: https://fedoraproject.org/wiki/Toolchain/Watermark Note: this is a version of Nick Clifton's "annobin" gcc plugin:

[PATCH 19/22] Add checkers/ianal.py

2017-08-04 Thread David Malcolm
This patch is a demo of handling code metrics and metadata ("info" results in Firehose terminology). It adds a standalone tool harness which scans the main input file looking for "Copyright" lines, returning information on them as firehose JSON. When sent through GCC's diagnostic subsystem by

[PATCH 09/22] Add selftest::read_file (..., FILE *, ...)

2017-08-04 Thread David Malcolm
This patch is a hack used by the followup checkers.cc patch, and ought to be removed in any final version of the kit. gcc/ChangeLog: * selftest.c (read_file): New overload. * selftest.h (read_file): New overload. --- gcc/selftest.c | 16 +--- gcc/selftest.h | 7

[PATCH 22/22] Add contrib/get-static-analysis.py

2017-08-04 Thread David Malcolm
This patch adds a simple Python 2/3 script for reading the static analysis "watermark" from object files, writing the JSON to stdout (prettyprinting it with indentation and newlines for ease of human reading). contrib/ChangeLog: * get-static-analysis.py: New file. ---

Re: [PATCH 0/2] add unique_ptr class

2017-08-04 Thread Martin Sebor
On 07/31/2017 05:46 PM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders Hi, I've been saying I'd do this for a long time, but I'm finally getting to importing the C++98 compatable unique_ptr class Pedro wrote for gdb a while back. I believe the gtl namespace

Re: [PATCH 00/22] RFC: integrated 3rd-party static analysis support

2017-08-04 Thread Eric Gallager
On 8/4/17, David Malcolm wrote: > This patch kit clearly isn't ready yet as-is (see e.g. the > "known unknowns" below), but I'm posting it now in the hope of > getting early feedback. > > Summary > === > > This patch kit provides an easy way to make integrate 3rd-party

Re: [PATCH] Simplify pow with constant

2017-08-04 Thread Joseph Myers
On Fri, 4 Aug 2017, Richard Biener wrote: > >> Do this only for fast-math as accuracy is reduced. This is much faster > >> since pow is more complex than exp - with a current GLIBC the speedup > >> is more than 7 times for this transformation. > > > > Is it bound to be so on future glibc

Re: [PATCH 0/2] add unique_ptr class

2017-08-04 Thread Trevor Saunders
On Fri, Aug 04, 2017 at 07:52:18PM +0100, Jonathan Wakely wrote: > On 31/07/17 19:46 -0400, tbsaunde+...@tbsaunde.org wrote: > > I've been saying I'd do this for a long time, but I'm finally getting to > > importing the C++98 compatable unique_ptr class Pedro wrote for gdb a while > > back. I

Re: [PATCH 0/2] add unique_ptr class

2017-08-04 Thread Trevor Saunders
On Fri, Aug 04, 2017 at 04:43:32PM -0600, Martin Sebor wrote: > On 07/31/2017 05:46 PM, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders > > > > Hi, > > > > I've been saying I'd do this for a long time, but I'm finally getting to > > importing the C++98

Re: [PATCH 1/2] add unique_ptr header

2017-08-04 Thread Trevor Saunders
On Fri, Aug 04, 2017 at 08:55:50PM +0100, Jonathan Wakely wrote: > On 01/08/17 23:09 -0400, Trevor Saunders wrote: > > aiui C++03 is C++98 with a few additions to the stl. > > Again, STL != C++ Standard Library. > > C++03 made some important changes to the core language, particularly > the

[PATCH] Simplify pow with constant

2017-08-04 Thread Wilco Dijkstra
This patch simplifies pow (C, x) into exp (x * C1), where C1 = log (C). Do this only for fast-math as accuracy is reduced. This is much faster since pow is more complex than exp - with a current GLIBC the speedup is more than 7 times for this transformation. ChangeLog: 2017-08-04 Wilco Dijkstra

[patch, gcc doc + fortran] Make -Ofast honor -fmax-stack-var-size

2017-08-04 Thread Thomas Koenig
Hello world, the attached patch makes -Ofast honor -fmax-stack-var-size, and adjusts the documentation in the gcc and fortran directories accordingly. This is done to alleviate PR 68829, to make it possible to run -Ofast with less stack usage. I have also taken the opportunity to make it a bit

[PATCH][AArch64] Introduce emit_frame_chain

2017-08-04 Thread Wilco Dijkstra
The current frame code combines the separate concepts of a frame chain (saving old FP,LR in a record and pointing new FP to it) and a frame pointer used to access locals. Add emit_frame_chain to the aarch64_frame descriptor and use it in the prolog and epilog code. For now just initialize it as

Re: [PATCH][1/2] Early LTO debug, simple-object part

2017-08-04 Thread Richard Biener
On Fri, 28 Jul 2017, Jason Merrill wrote: > On 07/28/2017 05:55 PM, Jason Merrill wrote: > > On Fri, Jul 28, 2017 at 8:54 AM, Richard Biener wrote: > > > On Tue, 4 Jul 2017, Richard Biener wrote: > > > > > > > On Tue, 20 Jun 2017, Richard Biener wrote: > > > > > > > > > On

Re: [PATCH] Simplify pow with constant

2017-08-04 Thread Alexander Monakov
On Fri, 4 Aug 2017, Wilco Dijkstra wrote: > This patch simplifies pow (C, x) into exp (x * C1), where C1 = log (C). I don't think you can do that for non-positive C. > Do this only for fast-math as accuracy is reduced. This is much faster > since pow is more complex than exp - with a current

Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path

2017-08-04 Thread Matthias Klose
On 03.08.2017 12:05, Jeff Law wrote: > On 08/02/2017 08:06 PM, Ximin Luo wrote: >> Jeff Law: >>> On 07/21/2017 10:15 AM, Ximin Luo wrote: (Please keep me on CC, I am not subscribed) Proposal This patch series adds a new environment variable

[PATCH][AArch64] Remove aarch64_frame_pointer_required

2017-08-04 Thread Wilco Dijkstra
To implement -fomit-leaf-frame-pointer, there are 2 places where we need to check whether we have to use a frame chain (since register allocation may allocate LR in a leaf function that omits the frame pointer, but if LR is spilled we must emit a frame chain). To simplify this do not force

Re: [PATCH][2/2] early LTO debug, main part

2017-08-04 Thread Richard Biener
On Thu, 3 Aug 2017, Jason Merrill wrote: > On Thu, Aug 3, 2017 at 6:51 AM, Richard Biener wrote: > > On Wed, 2 Aug 2017, Jason Merrill wrote: > > > >> On Wed, Aug 2, 2017 at 6:35 AM, Richard Biener wrote: > >> > On Wed, 2 Aug 2017, Jason Merrill wrote: > >>

[PATCH][AArch64] Use gen_frame_mem for callee-saves

2017-08-04 Thread Wilco Dijkstra
The frame code uses a mixture of gen_rtx_MEM and gen_frame_mem for callee-saves. Callee-saves never alias with local variables, so using gen_frame_mem is correct. Minor cleanup - no change in code. OK for commit? ChangeLog: 2017-08-04 Wilco Dijkstra gcc/ *

Re: libgo patch committed: Fix signal counting for glibc 2.26

2017-08-04 Thread Ian Lance Taylor
On Fri, Aug 4, 2017 at 12:22 AM, Richard Biener wrote: > On Thu, Aug 3, 2017 at 8:11 PM, Ian Lance Taylor wrote: >> This patch to libgo changes the mksigtab script to recognize the glibc >> 2.26 NSIG expression. Bootstrapped and ran Go testsuite on

Re: [PATCH] Simplify pow with constant

2017-08-04 Thread Richard Biener
On Fri, Aug 4, 2017 at 2:26 PM, Alexander Monakov wrote: > On Fri, 4 Aug 2017, Wilco Dijkstra wrote: >> This patch simplifies pow (C, x) into exp (x * C1), where C1 = log (C). > > I don't think you can do that for non-positive C. Hmm, the question is also how this interacts

Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path

2017-08-04 Thread Jakub Jelinek
On Fri, Aug 04, 2017 at 08:32:33AM -0400, Matthias Klose wrote: > >> GCC already supports a similar environment variable SOURCE_DATE_EPOCH, > >> which was accepted about 2 years ago in a patch written by one of our GSoC > >> students. We are not planning any more environment variables like this,

[PATCH] Fix switch expansion (PR middle-end/81698)

2017-08-04 Thread Jakub Jelinek
Hi! As mentioned inthe PR, the switch expansion relies on EDGE_SUCC (bb, 0) from a GIMPLE_SWITCH to be the default edge, but GIMPLE only ensures that default label is the first one. So, this patch (in expand_case) instead finds the default_edge from the default label and corresponding block.

Re: [C++ committed] Fix ICE with -Wshadow=compatible-local (PR c++/81640)

2017-08-04 Thread Jason Merrill
On Wed, Aug 2, 2017 at 3:38 AM, Jakub Jelinek wrote: > I've bootstrapped/regtested the following patch last night and committed > after preapproval from Nathan, though of course a question is if > lookup_fnfields_slot/lookup_fnfields_slot_nolazy shouldn't have > if

Re: [PATCH][AArch64][GCC 6] PR target/79041: Correct -mpc-relative-literal-loads logic in aarch64_classify_symbol

2017-08-04 Thread Yvan Roux
On 11 July 2017 at 12:26, Yvan Roux wrote: > On 3 July 2017 at 12:48, Yvan Roux wrote: >> On 27 June 2017 at 13:14, Yvan Roux wrote: >>> Hi Wilco >>> >>> On 27 June 2017 at 12:53, Wilco Dijkstra wrote:

[PATCH][AArch64] PR60580: Fix frame pointer option magic

2017-08-04 Thread Wilco Dijkstra
To fix PR60580 simplify the logic in aarch64_override_options_after_change_1 (). If the frame pointer is enabled, set it to a special value that behaves similar to frame pointer omission. If we don't do this all leaf functions will get a frame pointer even if flag_omit_leaf_frame_pointer is

Re: [PATCH v2][RFC] Canonize names of attributes.

2017-08-04 Thread Martin Liška
On 08/02/2017 01:25 PM, Joseph Myers wrote: > On Thu, 13 Jul 2017, Martin Liška wrote: > >> +/* For a given IDENTIFIER_NODE, strip leading and trailing '_' characters >> + so that we have a canonical form of attribute names. */ >> + >> +static inline tree >> +canonicalize_attr_name (tree

Re: [Patch] Testsuite fixes for failures caused by patch for PR 80925 - loop peeling and alignment

2017-08-04 Thread Rainer Orth
Richard Biener writes: > On Fri, Jul 28, 2017 at 8:22 PM, Steve Ellcey wrote: >> On Fri, 2017-07-28 at 09:47 +0200, Richard Biener wrote: >>> On Fri, Jul 28, 2017 at 12:16 AM, Steve Ellcey wrote: >>> > >>> > Any comments from

Re: gotools patch committed: Test runtime, misc/cgo/{test,testcarchive}

2017-08-04 Thread Ian Lance Taylor
On Fri, Aug 4, 2017 at 3:54 AM, Uros Bizjak wrote: > > The problem was following: > > runtime.Breakpoint comprises only call to __builtin_trap (), which in > case of alpha maps to "call_pall 0x81". Since __builtin_trap () is a > noreturn function, no other instructions are

Re: [RFC][PATCH] Do refactoring of attribute functions and move them to attribs.[hc].

2017-08-04 Thread Martin Liška
On 07/14/2017 09:23 AM, Jeff Law wrote: > On 07/13/2017 07:51 AM, Martin Liška wrote: >> Hi. >> >> It's request for comment where I mechanically moved attribute-related >> function to attribs.[hc]. >> >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. >> >> Thoughts? >

Re: [Libgomp, Fortran] Fix canadian cross build

2017-08-04 Thread Yvan Roux
On 11 July 2017 at 12:25, Yvan Roux wrote: > On 3 July 2017 at 11:21, Yvan Roux wrote: >> On 23 June 2017 at 15:44, Yvan Roux wrote: >>> Hello, >>> >>> Fortran parts of libgomp (omp_lib.mod, openacc.mod, etc...) are >>> missing

[PATCH] Fix OpenMP/OpenACC/Cilk+ issues with forced/non-local labels (PR c/81687)

2017-08-04 Thread Jakub Jelinek
Hi! If there are forced or non-local labels in OpenMP parallel/task/target regions (or OpenACC or Cilk+), then we often fail to link as the following testcases show - the labels aren't emitted anywhere, just references to them. While it is true that for forced/non-local labels we can't clone the

Re: [C++ committed] Fix ICE with -Wshadow=compatible-local (PR c++/81640)

2017-08-04 Thread Jakub Jelinek
On Fri, Aug 04, 2017 at 12:50:36PM -0400, Jason Merrill wrote: > On Wed, Aug 2, 2017 at 3:38 AM, Jakub Jelinek wrote: > > I've bootstrapped/regtested the following patch last night and committed > > after preapproval from Nathan, though of course a question is if > >

Re: [PATCH 2/3] Matching tokens: C parts (v2)

2017-08-04 Thread David Malcolm
On Thu, 2017-08-03 at 11:34 -0600, Jeff Law wrote: > On 08/01/2017 02:21 PM, David Malcolm wrote: > > Changed in v2: > > > > * Renamed template argument to traits_t; eliminated subclasses, > > just > > using traits struct. > > * Moved enum constants into struct bodies (string constants can't >

Re: [PATCH] i386: Rewrite check for AVX512 features

2017-08-04 Thread Uros Bizjak
On Fri, Aug 4, 2017 at 12:19 PM, Peryt, Sebastian wrote: >> -Original Message- >> From: Uros Bizjak [mailto:ubiz...@gmail.com] >> Sent: Sunday, July 30, 2017 11:02 AM >> To: H.J. Lu >> Cc: gcc-patches@gcc.gnu.org; Koval, Julia

Re: [PATCH v2][RFC] Canonize names of attributes.

2017-08-04 Thread Jason Merrill
On Fri, Aug 4, 2017 at 9:42 AM, Martin Liška wrote: > On 08/02/2017 01:25 PM, Joseph Myers wrote: >> On Thu, 13 Jul 2017, Martin Liška wrote: >> >>> +/* For a given IDENTIFIER_NODE, strip leading and trailing '_' characters >>> + so that we have a canonical form of attribute

Re: [PATCH] Simplify pow with constant

2017-08-04 Thread Wilco Dijkstra
Richard Biener wrote: > On Fri, Aug 4, 2017 at 2:26 PM, Alexander Monakov wrote: > > On Fri, 4 Aug 2017, Wilco Dijkstra wrote: > >> This patch simplifies pow (C, x) into exp (x * C1), where C1 = log (C). > > > > I don't think you can do that for non-positive C. True, that can

Re: [PING^4][PATCH v2] Generate reproducible output independently of the build-path

2017-08-04 Thread Yury Gribov
On Fri, Aug 4, 2017 at 1:32 PM, Matthias Klose wrote: > On 03.08.2017 12:05, Jeff Law wrote: >> On 08/02/2017 08:06 PM, Ximin Luo wrote: >>> Jeff Law: On 07/21/2017 10:15 AM, Ximin Luo wrote: > (Please keep me on CC, I am not subscribed) > > > Proposal >

Re: [C++ Patch] PR 79790 ("[C++17] ICE class template argument deduction")

2017-08-04 Thread Jason Merrill
On 07/14/2017 01:32 PM, Paolo Carlini wrote: + error ("cannot deduce template arguments for copy-initialization" +" of %qT, as it has no viable implicit deduction guides", type); Why "copy-initialization"? We do deduction for direct-initialization, as well. I would also

Re: [PATCH] PR c++/80287 add new testcase

2017-08-04 Thread Yvan Roux
On 13 July 2017 at 14:02, Yvan Roux wrote: > Hi, > > as discussed in the PR, this patch adds a new reduced testcase which > doesn't rely on c++17 features, this is a prereq to the backport of > the fix into GCC 6 branch which is impacted by this issue. > > Validated on x86,