Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-16 Thread Andreas Schwab
On Nov 16 2019, Bernd Schmidt wrote: > Well, there has to be some difference between what you are doing and > what I am doing, because: > > Running /local/src/egcs/git/gcc/testsuite/g++.old-deja/old-deja.exp ... > > === g++ Summary === > > # of expected passes 26826 > # of e

Record leader nodes in the SLP graph (PR92516)

2019-11-16 Thread Richard Sandiford
If stmt analysis failed for an SLP node, r278246 tried building the node from scalars instead. By that point we've already processed child nodes (usually successfully) and might have made some of them the lead nodes for their stmt list. This is why we couldn't free the child nodes when deciding t

Fix uncached nonspec_time in inliner

2019-11-16 Thread Jan Hubicka
Hi, this patch fixes quite embarasing and aged bug that do_estimate_edge_time does not return correct nonspec_time first time it is executed (when value is not in cache). This does not really have effect on generated code because inliner computes the value twice but it does increase fibonaci heap

Re: Ping*2: [PATCH v5] Missed function specialization + partial devirtualization

2019-11-16 Thread luoxhu
Hi Thanks, On 2019/11/14 17:04, Jan Hubicka wrote: >> PR ipa/69678 >> * cgraph.c (symbol_table::create_edge): Init speculative_id. >> (cgraph_edge::make_speculative): Add param for setting speculative_id. >> (cgraph_edge::speculative_call_info): Find reference by >> specul

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-16 Thread Andreas Schwab
Running /daten/aranym/gcc/gcc-20191116/gcc/testsuite/g++.old-deja/old-deja.exp ... FAIL: g++.old-deja/g++.other/dyncast1.C -std=c++98 execution test FAIL: g++.old-deja/g++.other/dyncast1.C -std=c++14 execution test FAIL: g++.old-deja/g++.other/dyncast1.C -std=c++17 execution test FAIL: g++.old

[committed][AArch64] Enable VECT_COMPARE_COSTS by default for SVE

2019-11-16 Thread Richard Sandiford
This patch enables VECT_COMPARE_COSTS by default for SVE, both so that we can compare SVE against Advanced SIMD and so that (with future patches) we can compare multiple SVE vectorisation approaches against each other. It also adds a target-specific --param to control this. It only became possibl

Re: Support C2x [[]] attributes for C

2019-11-16 Thread Iain Sandoe
Joseph Myers wrote: > This patch adds support for the C2x [[]] attribute syntax to the C > front end. > gcc.dg/gnu2x-attrs-1.c: New tests. This test fails on targets without symbol alias support, but it would be most unfortunate to skip it entirely with the usual dg-requires. In this i

[committed][AArch64] Replace SVE_PARTIAL with SVE_PARTIAL_I

2019-11-16 Thread Richard Sandiford
Another renaming, this time to make way for partial/unpacked float modes. Tested on aarch64-linux-gnu and applied as r278339. Richard 2019-11-16 Richard Sandiford gcc/ * config/aarch64/iterators.md (SVE_PARTIAL): Rename to... (SVE_PARTIAL_I): ...this. * config/aarch6

[committed][AArch64] Tweak gcc.target/aarch64/sve/clastb_8.c

2019-11-16 Thread Richard Sandiford
clastb_8.c was using scan-tree-dump-times to check for fully-masked loops, which made it sensitive to the number of times we try to vectorize. Tested on aarch64-linux-gnu and applied as r278340. Richard 2019-11-16 Richard Sandiford gcc/testsuite/ * gcc.target/aarch64/sve/clastb_8.c:

[committed][AArch64] Add autovec support for partial SVE vectors

2019-11-16 Thread Richard Sandiford
This patch adds the bare minimum needed to support autovectorisation of partial SVE vectors, namely moves and integer addition. Later patches add more interesting cases. Tested on aarch64-linux-gnu and applied as r278341. Richard 2019-11-16 Richard Sandiford gcc/ * config/aarch64/a

[committed][AArch64] Add sign and zero extension for partial SVE modes

2019-11-16 Thread Richard Sandiford
This patch adds support for extending from partial SVE modes to both full vector modes and wider partial modes. Some tests now need --param aarch64-sve-compare-costs=0 to force the original full-vector code. Tested on aarch64-linux-gnu and applied as r278342. Richard 2019-11-16 Richard Sandif

[committed][AArch64] Add truncation for partial SVE modes

2019-11-16 Thread Richard Sandiford
This patch adds support for "truncating" to a partial SVE vector from either a full SVE vector or a wider partial vector. This truncation is actually a no-op and so should have zero cost in the vector cost model. Tested on aarch64-linux-gnu and applied as r278344. Richard 2019-11-16 Richard S

[committed][AArch64] Add gather loads for partial SVE modes

2019-11-16 Thread Richard Sandiford
This patch adds support for gather loads of partial vectors, where the vector base or offset elements can be wider than the elements being loaded. Tested on aarch64-linux-gnu and applied as r278345. Richard 2019-11-16 Richard Sandiford gcc/ * config/aarch64/iterators.md (SVE_24, SVE

[committed][AArch64] Pattern-match SVE extending gather loads

2019-11-16 Thread Richard Sandiford
This patch pattern-matches a partial gather load followed by a sign or zero extension into an extending gather load. (The partial gather load is already an extending load; we just don't rely on the upper bits of the elements.) Tested on aarch64-linux-gnu and applied as r278346. Richard 2019-11

[committed][AArch64] Add scatter stores for partial SVE modes

2019-11-16 Thread Richard Sandiford
This patch adds support for scatter stores of partial vectors, where the vector base or offset elements can be wider than the elements being stored. Tested on aarch64-linux-gnu and applied as r278347. Richard 2019-11-16 Richard Sandiford gcc/ * config/aarch64/aarch64-sve.md

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-16 Thread John Paul Adrian Glaubitz
Hi Andreas! > === g++ Summary === > > # of expected passes26803 > # of unexpected failures16 > # of expected failures 82 > # of unsupported tests 157 > /daten/aranym/gcc/gcc-20191116/Build/gcc/xg++ version 10.0.0 2019

Re: [PATCH 0/4] Eliminate cc0 from m68k

2019-11-16 Thread Bernd Schmidt
On 11/16/19 9:18 AM, Andreas Schwab wrote: > On Nov 16 2019, Bernd Schmidt wrote: > >> Well, there has to be some difference between what you are doing and >> what I am doing, because: >> >> Running /local/src/egcs/git/gcc/testsuite/g++.old-deja/old-deja.exp ... >> >> === g++ Summary

[committed][AArch64] Robustify aarch64_wrffr

2019-11-16 Thread Richard Sandiford
This patch uses distinct values for the FFR and FFRT outputs of aarch64_wrffr, so that a following aarch64_copy_ffr_to_ffrt has an effect. This is needed to avoid regressions with later patches. The block comment at the head of the file already described the pattern this way, and there was alread

Handle VIEW_CONVERT_EXPR for variable-length vectors

2019-11-16 Thread Richard Sandiford
This patch handles VIEW_CONVERT_EXPRs of variable-length VECTOR_CSTs by adding tree-level versions of native_decode_vector_rtx and simplify_const_vector_subreg. It uses the same code for fixed-length vectors, both to get more coverage and because operating directly on the compressed encoding shoul

Two RTL CC tweaks for SVE pmore/plast conditions

2019-11-16 Thread Richard Sandiford
SVE has two composite conditions: pmore == at least one bit set && last bit clear plast == no bits set || last bit set So in general we generate them from: A: CC = test bits B: reg1 = first condition C: CC = test bits D: reg2 = second condition E: result = (reg1 op reg2) where op

Add an empty constructor shortcut to build_vector_from_ctor

2019-11-16 Thread Richard Sandiford
Empty vector constructors are equivalent to zero vectors. If we handle that case directly, we can support it for variable-length vectors and can hopefully make things more efficient for fixed-length vectors. This is needed by a later C++ patch. Tested on aarch64-linux-gnu and x86_64-linux-gnu.

[C++] Pass type uses through the verify_type_context hook

2019-11-16 Thread Richard Sandiford
This patch makes the C++ frontend work with the verify_type_context hook [https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00942.html]. We need some new type contexts for features that don't exist in C, but otherwise the patch is very similar to the C one. TCTX_CAPTURE_BY_COPY could really be treate

Re: Add an empty constructor shortcut to build_vector_from_ctor

2019-11-16 Thread Jeff Law
On 11/16/19 6:55 AM, Richard Sandiford wrote: > Empty vector constructors are equivalent to zero vectors. If we handle > that case directly, we can support it for variable-length vectors and > can hopefully make things more efficient for fixed-length vectors. > > This is needed by a later C++ pat

Re: [Patch][Demangler] Fix for complex values

2019-11-16 Thread Jeff Law
On 10/29/19 10:26 AM, Miguel Saldivar wrote: > There seems to be a small issue with the commit, somehow "float _Complex" > turned into "Complex" > within "demangle-expected", so the test now fails. Attached will be a fix > for it. Thank you for committing > the fix though. patch is complaining that

Re: [PATCH] Refactor rust-demangle to be independent of C++ demangling.

2019-11-16 Thread Jeff Law
On 11/8/19 12:16 PM, Eduard-Mihai Burtescu wrote: > 2019-10-22 Eduard-Mihai Burtescu > include/ChangeLog: > * demangle.h (rust_demangle_callback): Add. > libiberty/ChangeLog: > * cplus-dem.c (cplus_demangle): Use rust_demangle directly. > (rust_demangle): Remove. > * rust

Add optabs for accelerating RAW and WAR alias checks

2019-11-16 Thread Richard Sandiford
This patch adds optabs that check whether a read followed by a write or a write followed by a read can be divided into interleaved byte accesses without changing the dependencies between the bytes. This is one of the uses of the SVE2 WHILERW and WHILEWR instructions. (The instructions can also be u

Re: [wwwdocs] readings.html - "Porting GCC for Dunces" is gone

2019-11-16 Thread Hans-Peter Nilsson
Ping. I personally would prefer it being on gcc.gnu.org but will arrange for an alternative, if that for some reason would be inappropriate. FWIW, the PDF weighs in at a whopping 474174 bytes. > From: Hans-Peter Nilsson > Date: Mon, 11 Nov 2019 13:10:41 +0100 > > > From: Gerald Pfeifer > > Da

Re: [PATCH] Fix slowness in demangler

2019-11-16 Thread Jeff Law
On 11/12/19 9:39 AM, Tim Rühsen wrote: > On 11/12/19 4:15 PM, Ian Lance Taylor wrote: >> On Tue, Nov 12, 2019 at 6:15 AM Tim Rühsen wrote: >>> this is a proposal to fix >>> https://sourceware.org/bugzilla/show_bug.cgi?id=25180 >>> >>> In short: >>> cxxfilt >>> _ZZ1_DO1z

Re: [patch,avr] Add suport for devices from the 0-series.

2019-11-16 Thread Jeff Law
On 11/8/19 9:19 AM, Georg-Johann Lay wrote: > Hi, > > this patch adds support for a few more AVR devices.  Because the offset > where flash is seen in RAM deviates from the settings for the family > (and hence also from the linker script defaults), a new field in > avr_mcu_t is needed to express t

[committed] Delete common/config/powerpcspe

2019-11-16 Thread Segher Boessenkool
I missed this part in r266961. Various people have been editing it since; I finally noticed. Committed. 2019-11-16 Segher Boessenkool * common/config/powerpcspe: Delete.

[C++20 PATCH] Implement P1920R1, Missing feature-test macros 2017-2019

2019-11-16 Thread Jakub Jelinek
Hi! This implements the core part of P1920R1, tested on x86_64-linux, ok for trunk if it passes full bootstrap/regtest? Jon, are you going to handle the libstdc++ side of this, assuming there is something still not done where we have the corresponding features implemented already? 2019-11-16 Ja

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-16 Thread Thomas Koenig
Hello world, here is an update to the patch. I have now included variables where the user did not specify INTENT(IN) by checking that the dummy variables to be replaced by temporaries are not, indeed, assigned a value. This also includes being passed as an actual argument to a non-INTENT(IN) dum

Re: [PATCH 00/49] RFC: Add a static analysis framework to GCC

2019-11-16 Thread Thomas Schwinge
Hi David! On 2019-11-15T20:22:47-0500, David Malcolm wrote: > This patch kit (I have not looked at the patches.) ;-) > introduces a static analysis pass for GCC that can diagnose > various kinds of problems in C code at compile-time (e.g. double-free, > use-after-free, etc). Sounds great from

[PATCH] libstdc++: Optimize std::jthread construction

2019-11-16 Thread Jonathan Wakely
This change avoids storing a copy of a stop_token object that isn't needed and won't be passed to the callable object. This slightly reduces memory usage when the callable doesn't use a stop_token. It also removes indirection in the invocation of the callable in the new thread, as there is no lamb

[PATCH] Revert r278363 "Start work on header"

2019-11-16 Thread Jonathan Wakely
This was not meant to on the branch I committed r278364 from, as it is not ready to commit yet. * include/std/ranges: Revert accidentally committed changes. Patch omitted, since it's just removing the broken code I committed a few minutes ago, but I'll be committing to trunk shortly.

Re: [wwwdocs] readings.html - "Porting GCC for Dunces" is gone

2019-11-16 Thread Gerald Pfeifer
On Sat, 16 Nov 2019, Hans-Peter Nilsson wrote: > Ping. I personally would prefer it being on gcc.gnu.org but > will arrange for an alternative, if that for some reason would > be inappropriate. FWIW, the PDF weighs in at a whopping 474174 > bytes. I was first thinking where to upload it on ftp:/

New modref/ipa_modref optimization passes

2019-11-16 Thread David Čepelík
Dear GCC developers, Below you may find a patch which implements two new optimization passes, called "modref" and "ipa_modref", which operate on GIMPLE and during WPO, respectively. What the passes do is fairly simple: for each analyzed function, they collect information about loads and stores pe

[C++ PATCH] c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.

2019-11-16 Thread Marek Polacek
[ Working virtually on Baker Island. ] This patch implements C++20 P1331, allowing trivial default initialization in constexpr contexts. I used Jakub's patch from the PR which allowed uninitialized variables in constexpr contexts. But the hard part was handling CONSTRUCTOR_NO_CLEARING which is a

[C++ PATCH] Implement C++20 P1814R0, CTAD for alias templates.

2019-11-16 Thread Jason Merrill
This patch implements C++20 class template argument deduction for alias templates, which works by a moderately arcane transformation of the deduction guides for the underlying class template. When implementing it, I found that I could simplify the rules in the draft a bit and get the same effe

[PATCH] combine: Don't set the same thing twice in one parallel

2019-11-16 Thread Segher Boessenkool
Instead, make the second arm copy from the dest of the first set. Most of the time this copy will be optimized away later. I am still testing this across many archs; will commit later if that works out well. Segher 2019-11-16 Segher Boessenkool * combine.c (try_combine): If we get

[PATCH] rs6000: Allow mode GPR in cceq_{ior,rev}_compare

2019-11-16 Thread Segher Boessenkool
Also make it a parmeterized name: @cceq_{ior,rev}_compare_. Committing to trunk. Segher 2019-11-16 Segher Boessenkool * config/rs6000/rs6000.md (cceq_ior_compare): Rename to... (@cceq_ior_compare_ for GPR): ... this. Allow GPR instead of just SI. (cceq_rev_

[PATCH] libstdc++: Define C++20 range utilities and range factories

2019-11-16 Thread Jonathan Wakely
This adds another chunk of the header. The changes from P1456R1 (Move-only views) and P1862R1 (Range adaptors for non-copyable iterators) are included, but not the changes from P1870R1 (forwarding-range is too subtle). The tests for subrange and iota_view are poor and should be improved.

Fwd: [PATCH,libstdc++] C++ constexpr tuple is broken.

2019-11-16 Thread Ed Smith-Rowland via gcc-patches
I missed a file in my recent patch for C++20 constexpr tuple. Bestrafe Mich. Ed 2019-11-16 Edward Smith-Rowland <3dw...@verizon.net> Repair the part of C++20 p1032 Misc constexpr bits. * include/bits/uses_allocator.h (__uses_alloc0::_Sink::operaror=) (__use_alloc(const _Alloc&)) : Conste

Re: [C++20 PATCH] Implement P1920R1, Missing feature-test macros 2017-2019

2019-11-16 Thread Jonathan Wakely
On 16/11/19 20:38 +0100, Jakub Jelinek wrote: Hi! This implements the core part of P1920R1, tested on x86_64-linux, ok for trunk if it passes full bootstrap/regtest? Jon, are you going to handle the libstdc++ side of this, assuming there is something still not done where we have the correspondi

Re: Fwd: [PATCH,libstdc++] C++ constexpr tuple is broken.

2019-11-16 Thread Jonathan Wakely
On 16/11/19 20:19 -0500, Ed Smith-Rowland via libstdc++ wrote: I missed a file in my recent patch for C++20 constexpr tuple. Bestrafe Mich. Ed OK for trunk, thanks. 2019-11-16 Edward Smith-Rowland <3dw...@verizon.net> Repair the part of C++20 p1032 Misc constexpr bits.

Re: [C++ PATCH] Fix up spaceship diagnostics

2019-11-16 Thread Jason Merrill
Ok, thanks. On Fri, Nov 15, 2019, 7:47 PM Jakub Jelinek wrote: > Hi! > > While working on the __builtin_source_location patch, I've noticed that > these two messages are weird: > spaceship-err3.C:11:12: error: ‘std::std::strong_ordering’ is not a type > spaceship-err3.C:11:12: note: forming type

[PATCH] libstdc++: add range constructor for std::string_view (P1391R4)

2019-11-16 Thread Jonathan Wakely
* include/std/string_view (basic_string_view(It, End)): Add range constructor and deduction guide from P1391R4. * testsuite/21_strings/basic_string_view/cons/char/range.cc: New test. Tested powerpc64le-linux, committed to trunk. commit e0c554e4da7310df83bb1dcc7b8e6c4c9c5