[PATCH][COMMITTED] RISC-V: Fix testcase on rv64

2019-07-31 Thread Kito Cheng
gcc.target/riscv/attribute-10.c will failed on rv64 target because it the abi is incompatible with rv64, added a valid arch before the incorrect -march option could resolve it. From 727069fa18d0c0351391ae4a5e9661023f0ca12e Mon Sep 17 00:00:00 2001 From: kito Date: Thu, 1 Aug 2019 06:33:48 + Su

Backports to gcc-9-branch

2019-07-31 Thread Jakub Jelinek
Hi! I've backported following 5 patches from trunk to 9.2, bootstrapped/regtested on x86_64-linux and i686-linux, committed to gcc-9-branch. Jakub 2019-08-01 Jakub Jelinek Backported from mainline 2019-07-17 Jakub Jelinek PR tree-optimization/91157

[PATCH] fix and improve strlen conditional handling of merged stores (PR 91183, 91294, 91315)

2019-07-31 Thread Martin Sebor
More extensive testing of the last week's strlen patch for PR91183 on various non-mainstream targets and with better tests has exposed a few gaps and a couple of bugs. The attached patch addresses all in one change. I considered splitting it up but in the end decided the changes were small and s

Re: [range-ops] patch 01/04: types for VR_UNDEFINED and VR_VARYING

2019-07-31 Thread Andrew MacLeod
On 7/31/19 4:36 AM, Richard Biener wrote: On Tue, Jul 30, 2019 at 4:54 PM Andrew MacLeod wrote: Everything in this compiler is historical. We did everything we could to save memory back in the old days, I know, I was there when we did this. Combining the lattice and the range made sense in

[doc PATCH] document variable attribute alias

2019-07-31 Thread Martin Sebor
It was pointed out recently in another forum that GCC doesn't document attribute alias for variables. It was also noted in the same discussion that the semantics of accessing aliases and their targets can have "surprising" effects because GCC (as do other compilers) assumes that distinct declarat

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Segher Boessenkool
On Wed, Jul 31, 2019 at 08:43:50PM +0200, Marc Glisse wrote: > On Wed, 31 Jul 2019, Jonathan Wakely wrote: > > >So something like the attached patch. The glibc says the > >values I used have enough digits for IEEE quad-precision: > > > >/* The above constants are not adequate for computation usi

Re: [PATCH] Fix typo LIBGCCJIT_SYMLINK -> LIBGCCJIT_SONAME_SYMLINK

2019-07-31 Thread Arvind Sankar
Hi any feedback on this? Thanks. On Tue, Jul 23, 2019 at 02:49:13PM -0400, Arvind Sankar wrote: > There seems to be a typo in gcc/jit/Make-lang.in where it references an > undefined LIBGCCJIT_SYMLINK instead of LIBGCCJIT_SONAME_SYMLINK. > --- > gcc/jit/Make-lang.in | 5 ++--- > 1 file changed, 2

Re: [PATCH v2] RISC-V: Raise error on unexpected ISA string at end.

2019-07-31 Thread Jim Wilson
On Wed, Jul 31, 2019 at 9:41 AM Maxim Blinov wrote: > gcc/ChangeLog: > 2019-07-31 Maxim Blinov > > * common/config/riscv/riscv-common.c: Check -march string ends > with null. > > gcc/testsuite/ChangeLog: > 2019-07-31 Maxim Blinov > > * gcc.target/riscv/attribute-10.c:

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Jonathan Wakely
On 31/07/19 21:16 +0200, Jakub Jelinek wrote: On Wed, Jul 31, 2019 at 07:58:55PM +0100, Jonathan Wakely wrote: > Perhaps add __extension__ before the literals too? Does that do anything for Q literals? I thought I'd tried it previously and decided it didn't. I'm happy to add it though. You're

Re: [C++ Patch] Improve delete_sanity locations

2019-07-31 Thread David Malcolm
On Wed, 2019-07-31 at 15:14 -0400, Jason Merrill wrote: > On 7/24/19 5:24 PM, Paolo Carlini wrote: > > this takes care of the four locations, two warnings and two errors. > > I'm > > also adding the missing complain & tf_warning or tf_error guards, > > I > > don't have a SFINAE testcase failing b

C++ PATCH for c++/91264 - detect modifying const objects in constexpr

2019-07-31 Thread Marek Polacek
One of the features of constexpr is that it doesn't allow UB; and such UB must be detected at compile-time. So running your code in a context that requires a constant expression should ensure that the code in question is free of UB. In effect, constexpr can serve as a sanitizer. E.g. this article

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2019 at 07:58:55PM +0100, Jonathan Wakely wrote: > > Perhaps add __extension__ before the literals too? > > Does that do anything for Q literals? I thought I'd tried it > previously and decided it didn't. I'm happy to add it though. You're right, it works well that way only in C,

Re: [PATCH] PR libstdc++/51333 Define recursive_init_error constructor non-inline

2019-07-31 Thread Jonathan Wakely
On 29/07/19 15:27 +0100, Jonathan Wakely wrote: The recursive_init_error class is defined in a header, with an inline constructor, but the definition of the vtable and destructor are not exported from the shared library. With -fkeep-inline-functions the constructor gets emitted in user code, and

Re: [C++ Patch] Improve delete_sanity locations

2019-07-31 Thread Jason Merrill
On 7/24/19 5:24 PM, Paolo Carlini wrote: this takes care of the four locations, two warnings and two errors. I'm also adding the missing complain & tf_warning or tf_error guards, I don't have a SFINAE testcase failing but since the function takes a tsubst_flags_t argument I think it's the right

[PATCH] Qualify call to prevent ADL

2019-07-31 Thread Jonathan Wakely
* include/std/memory (make_obj_using_allocator): Qualify call to uses_allocator_construction_args. Tested x86_64-linux, committed to trunk Backport to gcc-9-branch to follow. commit 0c3543005cee13158806fe2909de9920522d2f9e Author: redi Date: Wed Jul 31 19:08:56 2019 +

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Jonathan Wakely
On 31/07/19 20:50 +0200, Jakub Jelinek wrote: On Wed, Jul 31, 2019 at 07:37:03PM +0100, Jonathan Wakely wrote: On 31/07/19 19:07 +0200, Marc Glisse wrote: > On Wed, 31 Jul 2019, Jonathan Wakely wrote: > > > The values of the constants are taken from Glibc where the equivalent > > constant exists

Re: [C++ PATCH] PR c++/90590 Suppress warning for enumeration value not handled in switch warning

2019-07-31 Thread Jason Merrill
On 7/15/19 9:47 AM, Matthew Beliveau wrote: Okay I kept the TYPE_MAIN_VARIANT and dropped the accidental new line! Hopefully this should be fine! OK, thanks. Jason

Re: C++ PATCH for c++/89906 (GCC 8 backport)

2019-07-31 Thread Jason Merrill
On 7/12/19 4:16 PM, Marek Polacek wrote: In order to fix 89906 in GCC 8, we need to backport 86098. I think the patch is safe to be backported. Tested x86_64-linux, ok for 8? OK. Jason

Re: C++ PATCH to add test for c++/91104

2019-07-31 Thread Jason Merrill
On 7/17/19 1:51 PM, Marek Polacek wrote: This was a wrong code issue where we printed 2 3 1 1 2 3 instead of 1 2 3 1 2 3 but it was fixed by r271705. I don't know of a good way to check the auto... expansion here so I used dg-output. You could call another function with the expansion and check

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2019 at 07:37:03PM +0100, Jonathan Wakely wrote: > On 31/07/19 19:07 +0200, Marc Glisse wrote: > > On Wed, 31 Jul 2019, Jonathan Wakely wrote: > > > > > The values of the constants are taken from Glibc where the equivalent > > > constant exists, or by rounding the actual constant t

[C++ PATCH] PR c++/90538 - multiple expansions of capture packs

2019-07-31 Thread Jason Merrill
Previously, with init-capture the type of the closure field was a DECLTYPE_TYPE of the initializer. But since each time we tsubst a lambda we get a different lambda, that meant that if the initializer is a lambda, we'd end up with different closure types in the field and initializer after substitu

[C++ PATCH] Fix copy_node of TEMPLATE_INFO.

2019-07-31 Thread Jason Merrill
build_clone uses copy_node to duplicate the TEMPLATE_INFO for a clone, but this clears TREE_CHAIN, which was TI_ARGS in a TEMPLATE_INFO. Tested x86_64-pc-linux-gnu, applying to trunk. * cp-tree.h (struct tree_template_info): Use tree_base instead of tree_common. Add tmpl and args

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Marc Glisse
On Wed, 31 Jul 2019, Jonathan Wakely wrote: So something like the attached patch. The glibc says the values I used have enough digits for IEEE quad-precision: /* The above constants are not adequate for computation using `long double's. Therefore we provide as an extension constants with sim

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Jonathan Wakely
On 31/07/19 19:07 +0200, Marc Glisse wrote: On Wed, 31 Jul 2019, Jonathan Wakely wrote: The values of the constants are taken from Glibc where the equivalent constant exists, or by rounding the actual constant to the same number of digits as the Glibc constants have. How does it behave with _

[committed] ipa-devirt: make qsort helpers static

2019-07-31 Thread Alexander Monakov
Hi, noticed this when checking a qsort patch, applying as obvious. In the C days, -Wmissing-prototypes would have caught this, but C++ needs a different warning (-Wmissing-declarations), so we get inevitable bitrot :/ Alexander * ipa-devirt.c (type_warning_cmp): Make static. (de

Re: [PATCH, rs6000] Fix PR91050 by adding a DRIVER_SELF_SPECS spec

2019-07-31 Thread Peter Bergner
On 7/26/19 9:28 AM, Iain Sandoe wrote: > The patch needs one small amendment to succeed in bootstrap. > I applied the amended to i686, x86_64 and powerpc Darwin with no apparent > new problems. From the Darwin perspective, the patch is OK with the > amendment. Ok, thanks. For completeness, I h

Re: [PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Marc Glisse
On Wed, 31 Jul 2019, Jonathan Wakely wrote: The values of the constants are taken from Glibc where the equivalent constant exists, or by rounding the actual constant to the same number of digits as the Glibc constants have. How does it behave with __float128? I think that with -std=gnu++2a, it

Re: [PATCH][AArch64] Fix PR81800

2019-07-31 Thread Wilco Dijkstra
ping PR81800 is about the lrint inline giving spurious FE_INEXACT exceptions. The previous change for PR81800 didn't fix this: when lrint is disabled in the backend, the midend will simply use llrint.  This actually makes things worse since llrint now also ignores FE_INVALID exceptions! The

Re: [PATCH][AArch64] Fix symbol offset limit

2019-07-31 Thread Wilco Dijkstra
ping   In aarch64_classify_symbol symbols are allowed full-range offsets on relocations. This means the offset can use all of the +/-4GB offset, leaving no offset available for the symbol itself.  This results in relocation overflow and link-time errors for simple expressions like &globa

Re: [PATCH][AArch64] Increase default function alignment

2019-07-31 Thread Wilco Dijkstra
ping   With -mcpu=generic the function alignment is currently 8, however almost all supported cores prefer 16 or higher, so increase the default to 16:12. This gives ~0.2% performance increase on SPECINT2017, while codesize is 0.12% larger. ChangeLog: 2019-05-31  Wilco Dijkstra 

Re: [PATCH][ARM] Remove remaining Neon DImode support

2019-07-31 Thread Wilco Dijkstra
ping   Remove the remaining Neon adddi3, subdi3 and negdi2 patterns.  As a result adddi3, subdi3 and negdi2 can now always be expanded early irrespectively of whether Neon is available.  Also expand the extenddi patterns at the same time.  Several Neon arch attributes are no longer used and

[PATCH v2] RISC-V: Raise error on unexpected ISA string at end.

2019-07-31 Thread Maxim Blinov
Hi Martin, thanks for reviewing. > I would expect the missing quotes around the option to trigger > a -Wformat-diag warning. The %<%s%s> should also be flagged by > the same warning. Changing the format string as follows should > avoid the warnings: > > error_at (loc, "%<-march=%s%>: unexpect

[PATCH] Implement "P0631R4 Math Constants" for C++20

2019-07-31 Thread Jonathan Wakely
The values of the constants are taken from Glibc where the equivalent constant exists, or by rounding the actual constant to the same number of digits as the Glibc constants have. P0631R4 Math Constants * include/Makefile.am: Add new header. * include/Makefile.in: Regenera

Re: [PATCH][ARM] Cleanup DImode shifts

2019-07-31 Thread Wilco Dijkstra
ping   Like the logical operations, expand all shifts early rather than only sometimes.  The Neon shift expansions are never emitted (not even with -fneon-for-64bits), so they are not useful.  So all the late expansions and Neon shift patterns can be removed, and shifts are more optimized a

Re: [PATCH][ARM] Cleanup logical DImode operations

2019-07-31 Thread Wilco Dijkstra
ping   Cleanup the logical DImode operations since the current implementation is way too complicated.  Thumb-1, Thumb-2, VFP/Neon and iwMMXt all work differently, resulting in a bewildering number of expansions, patterns and splits across several md files.  All this complexity is counterpr

Re: [PATCH] RISC-V: Raise error on unexpected ISA string at end.

2019-07-31 Thread Martin Sebor
On 7/31/19 5:19 AM, Maxim Blinov wrote: This patch adds the same check that is present in binutils/bfd/elfxx-riscv.c. Checks that we have reached the end of the string after all the parsing routines have been run. Without this check, GCC silently succeeds on erroneous input, and produces an asse

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Martin Liška
On 7/31/19 12:01 PM, Martin Liška wrote: > Anyway, the auto-detection of jobserver seems very ugly to me :/ > I tend to remove the support and start working on a proper implementation > that can be used not only by make build system. Can you Jakub test the attached patch please? Do it reach a ulim

Re: [PATCH 1/3] C++20 constexpr lib part 1/3

2019-07-31 Thread Ed Smith-Rowland via gcc-patches
Here is the patch for * Implement C++20 p0202 - Add constexpr Modifiers to Functions in and Headers. * Implement C++20 p1023 - constexpr comparison operators for std::array. Relative to the last effort it is rebased on more recent trunk and I added to . There's some chance that I'll have

Re: [PATCH] Make BITMAP_WORD more easily configurable

2019-07-31 Thread Martin Sebor
On 7/31/19 4:00 AM, Richard Biener wrote: On Tue, 30 Jul 2019, Martin Sebor wrote: On 7/30/19 9:19 AM, Jakub Jelinek wrote: On Tue, Jul 30, 2019 at 09:16:45AM -0600, Martin Sebor wrote: Say something like this POC: We have those already, see ctz_hwi, clz_hwi etc. The thing is that BITMAP_WO

Re: [ARM/FDPIC v5 09/21] [ARM] FDPIC: Add support for taking address of nested function

2019-07-31 Thread Christophe Lyon
On Tue, 16 Jul 2019 at 14:42, Kyrill Tkachov wrote: > > > On 7/16/19 12:18 PM, Kyrill Tkachov wrote: > > Hi Christophe > > > > On 5/15/19 1:39 PM, Christophe Lyon wrote: > > > In FDPIC mode, the trampoline generated to support pointers to nested > > > functions looks like: > > > > > >.

[PATCH] Add Doxygen comments to header

2019-07-31 Thread Jonathan Wakely
* include/std/bit: Add Doxygen comments. Committed to trunk. At some point I need to resume working on Doxygen improvements and switch the Doxygen generation to C++17 mode, so we document all the new C++17 stuff. commit c76147753665e66ac8258f9b471c5cb65e28067e Author: redi Date: Wed

Re: [C PATCH] Fix C error-recovery (PR c/91192)

2019-07-31 Thread Marek Polacek
On Tue, Jul 30, 2019 at 09:22:00AM +0200, Jakub Jelinek wrote: > Hi! > > Neither c_expr_sizeof_expr nor c_expr_sizeof_type bother with filling up > the locations in c_expr struct they return. Normally, this isn't a problem, > as the sole caller of those calls set_c_expr_source_range. It doesn't

Re: [patch] Add NetBSD/hppa target

2019-07-31 Thread John David Anglin
Committed as revision 273933. Dave On 2019-06-14 11:44 a.m., co...@sdf.org wrote: > This adds netbsd/hppa support. I tested it on the shiny new QEMU-git > which can now boot NetBSD too :-) > > Files are very similar to the linux code. > > Please let me know if any changes need to be made. > > Mat

Re: [PATCH] Do not emit __gnu_lto_v1 symbol.

2019-07-31 Thread Georg-Johann Lay
Martin Liška schrieb: On 7/29/19 3:46 PM, Georg-Johann Lay wrote: Hi Martin. In SVN r273662 you changed a comment in avr.c from __gnu_lto_v1 to __gnu_lto_slim without changing the relevant code: Yes. /* __gnu_lto_slim is just a marker for the linker injected by toplev.c. There is no

Re: [PATCH] Implement x86 reduc_plus_scal_v8qi (PR tree-optimization/91201)

2019-07-31 Thread Uros Bizjak
On Wed, Jul 31, 2019 at 11:30 AM Jakub Jelinek wrote: > > Hi! > > On Wed, Jul 31, 2019 at 10:51:22AM +0200, Uros Bizjak wrote: > > OK. > > Thanks. This follow-up implements the same for mmx with sse for V8QImode, > the testcase shows that it is useful too. The difference is quite large: > > -

[PATCH] Fix PR91280

2019-07-31 Thread Richard Biener
There's some longer latent issue with PTAs handling of offsetted MEM_REFs in get_constraint_for_component_ref when there are subfields involved. The following solves this by handling offsetted MEM_REFs manually. Bootstrap & regtest running on x86_64-unknown-linux-gnu. Richard. 2019-07-31 Ric

Re: [PATCHv3] Fix not 8-byte aligned ldrd/strd on ARMv5 (PR 89544)

2019-07-31 Thread Richard Earnshaw (lists)
On 30/07/2019 21:51, Bernd Edlinger wrote: +/* { dg-options "-marm -march=armv6 -mno-unaligned-access -mfloat-abi=soft -mabi=aapcs -O3" } */ This isn't going to work as-is, we test many combinations of the compiler, either with explicit dejagnu settings or with the compiler defaults and t

[PATCH] Fix PR91293

2019-07-31 Thread Richard Biener
The following fixes wrong-code when SLP ends up swapping operands of a reduction stmt, confusing code-generation later. Fixed by not doing such swapping. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2019-07-31 Richard Biener PR tree-optimization/91293

Re: [PATCH] Come up with json::integer_number and use it in GCOV.

2019-07-31 Thread David Malcolm
On Wed, 2019-07-31 at 10:42 +0200, Martin Liška wrote: > Hi. > > As seen here: > https://github.com/RPGillespie6/fastcov/pull/18/files/f184dd8b6fc14e0 > 75dfc0ea93de7be5c96298ddb#r308735088 > > GCOV uses json::number for branch count, line count and similar. > However, the json library > uses a d

Re: [PATCH 4/5, OpenACC] Allow optional arguments to be used in the use_device OpenACC clause

2019-07-31 Thread Jakub Jelinek
On Mon, Jul 29, 2019 at 10:00:53PM +0100, Kwok Cheung Yeung wrote: > --- a/gcc/omp-low.c > +++ b/gcc/omp-low.c > @@ -11636,9 +11636,40 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, > omp_context *ctx) > tkind = GOMP_MAP_FIRSTPRIVATE_INT; > type = TREE_TYPE (ovar); >

Re: [PATCH 2/5, OpenACC] Support Fortran optional arguments in the firstprivate clause

2019-07-31 Thread Jakub Jelinek
On Mon, Jul 29, 2019 at 09:55:52PM +0100, Kwok Cheung Yeung wrote: > +/* True if OpenMP should treat this DECL as an optional argument. */ > + > +bool > +gfc_omp_is_optional_argument (const_tree decl) > +{ > + return DECL_LANG_SPECIFIC (decl) > + && GFC_DECL_OPTIONAL_ARGUMENT (decl); I thin

[committed, amdgcn] Remove expcnt waits.

2019-07-31 Thread Andrew Stubbs
I've committed this patch to correct a misunderstanding of the ISA. The ISA documentation implies that "s_waitcnt expcnt(0)" should be used after memory writes, but apparently it really only means this for GDS writes (and pixel exports, I think). The patch simply removes most of these instruc

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jan Hubicka
> diff --git a/gcc/gcc.c b/gcc/gcc.c > index a4323eb146e..e43f46246ad 100644 > --- a/gcc/gcc.c > +++ b/gcc/gcc.c > @@ -8268,6 +8268,44 @@ driver::maybe_run_linker (const char *argv0) const > { >int tmp = execution_count; > > + /* Detect jobserver and drop it if it's not working.

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-07-31 Thread Richard Biener
On Sat, 27 Jul 2019, Uros Bizjak wrote: > On Sat, Jul 27, 2019 at 12:07 PM Uros Bizjak wrote: > > > > How would one write smaxsi3 as a splitter to be split after > > > reload in the case LRA assigned the GPR alternative? Is it > > > even worth doing? Even the SSE reg alternative can be split >

[PATCH] RISC-V: Raise error on unexpected ISA string at end.

2019-07-31 Thread Maxim Blinov
This patch adds the same check that is present in binutils/bfd/elfxx-riscv.c. Checks that we have reached the end of the string after all the parsing routines have been run. Without this check, GCC silently succeeds on erroneous input, and produces an assembly with a truncated arch attribute. tes

[PATCH] Make EVRP release unused value-ranges, cleanup lattice swapping

2019-07-31 Thread Richard Biener
This is the last bit I had in my tree - as seen elsewhere you eventually run into testcases triggering issues, so this fixes EVRP not releasing any of its temporary ranges it pushes to the lattice. It also cleans up the lattice entry swapping "const correctness" issue by adding a new swap_vr_val

Re: [patch] Extend GIMPLE store merging to throwing stores

2019-07-31 Thread Richard Biener
On Fri, Jul 26, 2019 at 12:56 PM Eric Botcazou wrote: > > Hi, > > one of the effects of -fnon-call-exceptions is that the memory accesses are > considered trapping by default, i.e. unless you can prove otherwise. If, in > addition to this, the code is covered by an exception handler, such memory

Re: [PATCH] Mark necessary 2nd and later args for delete op.

2019-07-31 Thread Richard Biener
On Wed, Jul 31, 2019 at 10:37 AM Martin Liška wrote: > > On 7/30/19 4:00 PM, Marc Glisse wrote: > > On Tue, 30 Jul 2019, Martin Liška wrote: > > > >> Ah, that's bad, both of them need a care: > > > > Yes, that makes more sense to me, thanks. > > > >>> I tried to experiment to understand, but it is

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Martin Liška
On 7/31/19 11:12 AM, Jan Hubicka wrote: >> and see that in some cases jobserver is 0 and in other cases jobserver is 1. >> Examples of both: >> 0 kw -j2 --jobserver-auth=3,6 -- >> total 0 >> lrwx--. 1 jakub jakub 64 Jul 31 10:41 0 -> /dev/pts/4 >> l-wx--. 1 jakub jakub 64 Jul 31 10:41 1 ->

Re: [PATCH] Make BITMAP_WORD more easily configurable

2019-07-31 Thread Richard Biener
On Tue, 30 Jul 2019, Martin Sebor wrote: > On 7/30/19 9:19 AM, Jakub Jelinek wrote: > > On Tue, Jul 30, 2019 at 09:16:45AM -0600, Martin Sebor wrote: > > > Say something like this POC: > > > > We have those already, see ctz_hwi, clz_hwi etc. > > The thing is that BITMAP_WORD isn't always the same

Re: [PATCH] Remove also 2nd argument for unused delete operator (PR tree-optimization/91270).

2019-07-31 Thread Richard Biener
On Tue, Jul 30, 2019 at 3:39 PM Martin Liška wrote: > > On 7/30/19 3:09 PM, Marc Glisse wrote: > > On Tue, 30 Jul 2019, Martin Liška wrote: > > > >> On 7/30/19 1:35 PM, Marc Glisse wrote: > >>> + /* Some delete operators have size as 2nd argument. */ > >>> > >>> Some delete operators hav

[PATCH] Implement x86 reduc_plus_scal_v8qi (PR tree-optimization/91201)

2019-07-31 Thread Jakub Jelinek
Hi! On Wed, Jul 31, 2019 at 10:51:22AM +0200, Uros Bizjak wrote: > OK. Thanks. This follow-up implements the same for mmx with sse for V8QImode, the testcase shows that it is useful too. The difference is quite large: - movq$0, -72(%rsp) - movl$bytes, %eax movqb

[PATCH] Check -shared is available for pr87906's tesstcase

2019-07-31 Thread Kito Cheng
gcc/testsuite/ChangeLog: * g++.dg/lto/pr87906_0.C: Add dg-require-effective-target shared check. --- gcc/testsuite/g++.dg/lto/pr87906_0.C | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/g++.dg/lto/pr87906_0.C b/gcc/testsuite/g++.dg/lto/pr87906_0.C index 434d9fbe142..6a0

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jan Hubicka
> On Wed, Jul 31, 2019 at 11:12:15AM +0200, Jan Hubicka wrote: > > > so, if one is lucky enough and at least one of the two file descriptors in > > > MAKEFLAGS --jobserver-auth= is closed, it will work fine, but if they are > > > open, even when they have nothing to do with make, it will fail miser

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2019 at 11:12:15AM +0200, Jan Hubicka wrote: > > so, if one is lucky enough and at least one of the two file descriptors in > > MAKEFLAGS --jobserver-auth= is closed, it will work fine, but if they are > > open, even when they have nothing to do with make, it will fail miserably. >

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jan Hubicka
> and see that in some cases jobserver is 0 and in other cases jobserver is 1. > Examples of both: > 0 kw -j2 --jobserver-auth=3,6 -- > total 0 > lrwx--. 1 jakub jakub 64 Jul 31 10:41 0 -> /dev/pts/4 > l-wx--. 1 jakub jakub 64 Jul 31 10:41 1 -> pipe:[75026106] > lr-x--. 1 jakub jakub 6

Re: [Arm][CMSE]Add warn_unused_return attribute to cmse functions

2019-07-31 Thread Kyrill Tkachov
Hi Joel, On 7/17/19 12:19 PM, Joel Hutton wrote: At present it is possible to call the CMSE functions for checking addresses (such as cmse_check_address_range) and  forget to check/use the return value. This patch makes the interfaces more robust against programmer error by marking these functio

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2019 at 10:21:16AM +0200, Martin Liška wrote: > On 7/31/19 10:08 AM, Jan Hubicka wrote: > > Hi, > > > >> We do not detect jobserver because of Dejagnu is not using it. > >> And yes, we default to -flto= in LTO tests now. That's > >> what is causing issues right now. > > > > Why th

Re: [PATCH] Implement x86 reduc_plus_scal_v{16,32,64}qi (PR tree-optimization/91201)

2019-07-31 Thread Uros Bizjak
On Wed, Jul 31, 2019 at 9:10 AM Jakub Jelinek wrote: > > Hi! > > As mentioned in the PR, we can use psadbw to shorten the final reductions to > scalar for 8-bit elements. E.g. for -mavx2 the difference is: > - vmovdqa %xmm1, %xmm0 > - vextracti128$0x1, %ymm1, %xmm1 > - vpadd

Re: [PATCH] i386: Roundeven expansion for SSE4.1+

2019-07-31 Thread Uros Bizjak
On Wed, Jul 31, 2019 at 7:51 AM Tejas Joshi wrote: > > Hi. > > > > * gcc.target/i386/avx-vround-roundeven-1.c: New test. > > > * gcc.target/i386/avx-vround-roundeven-2.c: New test. > > > > roundss and roundsd are sse4_1 instructions, also please change tests > > to use -O2: > > I have made

[PATCH] Come up with json::integer_number and use it in GCOV.

2019-07-31 Thread Martin Liška
Hi. As seen here: https://github.com/RPGillespie6/fastcov/pull/18/files/f184dd8b6fc14e075dfc0ea93de7be5c96298ddb#r308735088 GCOV uses json::number for branch count, line count and similar. However, the json library uses a double as an internal representation for numbers. That's no desirable in

[PATCH] Mark necessary 2nd and later args for delete op.

2019-07-31 Thread Martin Liška
On 7/30/19 4:00 PM, Marc Glisse wrote: > On Tue, 30 Jul 2019, Martin Liška wrote: > >> Ah, that's bad, both of them need a care: > > Yes, that makes more sense to me, thanks. > >>> I tried to experiment to understand, but it is complicated because >>> including disables the optimization: >>> >

Re: [range-ops] patch 01/04: types for VR_UNDEFINED and VR_VARYING

2019-07-31 Thread Richard Biener
On Tue, Jul 30, 2019 at 4:54 PM Andrew MacLeod wrote: > > On 7/30/19 4:55 AM, Richard Biener wrote: > > On Fri, Jul 26, 2019 at 4:32 PM Andrew MacLeod wrote: > >> On 7/25/19 11:37 PM, Jeff Law wrote: > >>> On 7/24/19 12:33 PM, Richard Biener wrote: > On July 24, 2019 8:18:57 PM GMT+02:00, Je

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Martin Liška
On 7/31/19 10:08 AM, Jan Hubicka wrote: > Hi, > >> We do not detect jobserver because of Dejagnu is not using it. >> And yes, we default to -flto= in LTO tests now. That's >> what is causing issues right now. > > Why the error messages are > make[4]: *** write jobserver: Bad file descriptor. St

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jan Hubicka
Hi, > We do not detect jobserver because of Dejagnu is not using it. > And yes, we default to -flto= in LTO tests now. That's > what is causing issues right now. Why the error messages are make[4]: *** write jobserver: Bad file descriptor. Stop. make[4]: *** Waiting for unfinished jobs make

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2019 at 09:50:47AM +0200, Martin Liška wrote: > > Why doesn't the jobserver work in the tests? Is that because of missing + > > somewhere in the Makefiles or is something unsetting MFLAGS or MAKEFLAGS > > env vars? > > Is Dejagnu using make internally to invoke individual tests?

[PATCH] PR91178, use tail-recursion for vn_reference_maybe_forwprop_address

2019-07-31 Thread Richard Biener
Otherwise a sequence of _2 = _1 + 4; _3 = _2 + 4; ... can blow the stack. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2019-07-31 Richard Biener PR tree-optimization/91178 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Use tail-recu

[committed] Fix distribute parallel for with private class iterator (PR middle-end/91301)

2019-07-31 Thread Jakub Jelinek
Hi! This undoes the splitting of private clauses to parallel instead of innermost. I should one day change the clause splitting to match exactly what was agreed on in OpenMP 5.0, without the exceptions because we've done something differently in the past, but I'm afraid it will be a lot of work.

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Martin Liška
On 7/31/19 9:34 AM, Jakub Jelinek wrote: > On Wed, Jul 31, 2019 at 09:20:40AM +0200, Martin Liška wrote: >> One possible solution will be to adjust lto.exp: >> >>set LTO_OPTIONS [list \ >>{-O0 -flto -flto-partition=none -fuse-linker-plugin} \ >>{-O2 -flto -flto-parti

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Martin Liška
On 7/31/19 9:40 AM, Jan Hubicka wrote: >> Neither will work very well, we have thousands of -flto tests outside of >> lto.exp, e.g. dg-torture.exp (or libgomp and others) cycle through various >> options including -flto etc. >> >> Some env var would be useful I guess, though shouldn't it have GCC i

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jan Hubicka
> Neither will work very well, we have thousands of -flto tests outside of > lto.exp, e.g. dg-torture.exp (or libgomp and others) cycle through various > options including -flto etc. > > Some env var would be useful I guess, though shouldn't it have GCC in the > name? I mean, if we run into these

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2019 at 09:20:40AM +0200, Martin Liška wrote: > One possible solution will be to adjust lto.exp: > > set LTO_OPTIONS [list \ > {-O0 -flto -flto-partition=none -fuse-linker-plugin} \ > {-O2 -flto -flto-partition=none -fuse-linker-plugin > -fno-fat-lt

Re: [PATCH] Fix simd attribute handling on aarch64 (version 2)

2019-07-31 Thread Richard Sandiford
Steve Ellcey writes: > On Tue, 2019-07-30 at 14:31 +0100, Richard Sandiford wrote: >> >> > - >> > - tree new_type = build_distinct_type_copy (TREE_TYPE (node- >> > >decl)); >> > - TYPE_ARG_TYPES (new_type) = new_reversed; >> >> I think you still need this line, just applied to the exis

Re: Ping agian: [PATCH V2] Loop split upon semi-invariant condition (PR tree-optimization/89134)

2019-07-31 Thread Feng Xue OS
Thanks for these comments. Feng From: Michael Matz Sent: Tuesday, July 30, 2019 1:59:04 AM To: Feng Xue OS Cc: Richard Biener; gcc-patches@gcc.gnu.org Subject: Re: Ping agian: [PATCH V2] Loop split upon semi-invariant condition (PR tree-optimization/8913

Re: [PATCH] Deduce automatically number of cores for -flto option.

2019-07-31 Thread Martin Liška
On 7/31/19 1:32 AM, Jakub Jelinek wrote: > This broke a lot of tests. Whoops. > The logs show > spawn -ignore SIGHUP /home/jakub/src/gcc/obj31/gcc/xgcc > -B/home/jakub/src/gcc/obj31/gcc/ c_lto_pr83954_0.o c_lto_pr83954_1.o > -fno-diagnostics-show- > caret -fno-diagnostics-show-line-numbers -fdi

[PATCH] Implement x86 reduc_plus_scal_v{16,32,64}qi (PR tree-optimization/91201)

2019-07-31 Thread Jakub Jelinek
Hi! As mentioned in the PR, we can use psadbw to shorten the final reductions to scalar for 8-bit elements. E.g. for -mavx2 the difference is: - vmovdqa %xmm1, %xmm0 - vextracti128$0x1, %ymm1, %xmm1 - vpaddb %xmm1, %xmm0, %xmm0 - vpsrldq $8, %xmm0, %xmm1 - vpadd