Go patch committed: Change escape maps to hash tables

2019-09-30 Thread Ian Lance Taylor
This patch to the Go frontend changes some maps used by the escape analysis pass to use hash tables instead. It also changes them to use just one table lookup, not two. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: [PATCH] rs6000: Fix PR91275

2019-09-30 Thread Segher Boessenkool
Hi Bill, On Mon, Sep 30, 2019 at 08:24:09PM -0500, Bill Schmidt wrote: > PR91275 observes that __builtin_crypto_vpmsumd fails to work properly > with -O1 or higher with -mcpu=power8. That combination spells swap > optimization. Indeed, all vpmsum* instructions were being accepted > as swappable

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Joseph Myers
On Sun, 29 Sep 2019, Martin Sebor wrote: > PR 83859 asks to expose the same checking that GCC does natively for > built-in calls via a function attribute that associates a pointer > argument with the size argument, such as: I'll also note that, as mentioned in that bug (but more specifically

[PATCH] PR fortran/91943 -- More BOZ fallout

2019-09-30 Thread Steve Kargl
A BOZ cannot be an actual argument in a subroutine or function reference except those intrinsic function listed in the Fortran standard. The attach patch checks for invalid BOZ. Built and tested on x86_64-*-freebsd. OK to commit? 2019-09-30 Steven G. Kargl PR fortran/91943

Re: [PATCH] Include netinet/in.h in include/experimental/internet

2019-09-30 Thread Thomas Rodgers
Looks good to me. Andreas Tobler writes: > Hi all, > > I'm going to commit the attached patch to trunk. > It is preapproved by Jonathan. (via #irc) > > On FreeBSD the netinet/in.h header is not included by arpa/inet.h, so do the > include if we have the _GLIBCXX_HAVE_NETINET_IN_H defined. > >

Re: [SVE] PR91532

2019-09-30 Thread Prathamesh Kulkarni
On Wed, 25 Sep 2019 at 23:44, Richard Biener wrote: > > On Wed, 25 Sep 2019, Prathamesh Kulkarni wrote: > > > On Fri, 20 Sep 2019 at 15:20, Jeff Law wrote: > > > > > > On 9/19/19 10:19 AM, Prathamesh Kulkarni wrote: > > > > Hi, > > > > For PR91532, the dead store is trivially deleted if we place

Re: [PATCH v3 4/9] S/390: Do not use signaling vector comparisons on z13

2019-09-30 Thread Segher Boessenkool
On Mon, Sep 30, 2019 at 03:36:41PM +0200, Ilya Leoshkevich wrote: > > Am 06.09.2019 um 12:34 schrieb Segher Boessenkool > > : > > Should you handle -fsignaling-nans here as well? > > Do you mean disabling vectorisation of LE/LT/GE/GT/LTGT when > -fsignaling-nans is in effect? This makes sense

[PATCH] rs6000: Fix PR91275

2019-09-30 Thread Bill Schmidt
Hi, PR91275 observes that __builtin_crypto_vpmsumd fails to work properly with -O1 or higher with -mcpu=power8. That combination spells swap optimization. Indeed, all vpmsum* instructions were being accepted as swappable operations. This is correct for all of them but vpmsumd, which creates a

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Martin Sebor
On 9/30/19 3:34 PM, Joseph Myers wrote: On Sun, 29 Sep 2019, Martin Sebor wrote: PR 83859 asks to expose the same checking that GCC does natively for built-in calls via a function attribute that associates a pointer argument with the size argument, such as: I'll also note that, as mentioned

Re: [RFC] Come up with ipa passes introduction in gccint documentation

2019-09-30 Thread Segher Boessenkool
Hi! On Mon, Sep 30, 2019 at 09:47:13AM +0800, luoxhu wrote: > On 2019/9/30 00:17, Segher Boessenkool wrote: > The updated output will be as below in gccint.pdf, references are valid to > jump over > (suppose should be the same in info?): > > Did you test this with both "make info" and "make

build-failure for cris-elf with "[00/32] Support multiple ABIs in the same translation unit"

2019-09-30 Thread Hans-Peter Nilsson
> From: Richard Sandiford > Date: Wed, 11 Sep 2019 21:02:26 +0200 > This series of patches introduces some classes and helpers for handling > multiple ABIs in the same translation unit. At the moment "ABI" maans > specifically the choice of call-clobbered registers [...] > The series also

Re: [PATCH, RS6000] Add movmemsi pattern for inline expansion of memmove()

2019-09-30 Thread Segher Boessenkool
Hi! On Mon, Sep 30, 2019 at 11:36:31AM -0500, Aaron Sawdey wrote: > This patch uses the support added in the patch I posted last week for > actually doing > inline expansion of memmove(). > I've also removed the code from expand_block_move() for dealing with > mode==BLKmode because I don't

Re: [C] Improve diagnostics for vector types

2019-09-30 Thread Joseph Myers
On Mon, 30 Sep 2019, Richard Sandiford wrote: > 2019-09-30 Richard Sandiford > > gcc/c-family/ > * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type > has a type name, use it in preference to the __vector syntax. > > gcc/testsuite/ > * gcc.dg/diag-aka-3.c:

Re: Remove clobber_high

2019-09-30 Thread Jeff Law
On 9/25/19 10:48 AM, Richard Sandiford wrote: > [This follows on from: > https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01466.html] > > The AArch64 SVE tlsdesc patterns were the main motivating reason > for clobber_high. It's no longer needed now that the patterns use > calls instead. > > At

Re: [C] Avoid aka types that just add tags

2019-09-30 Thread Joseph Myers
On Mon, 30 Sep 2019, Richard Sandiford wrote: > 2019-09-30 Richard Sandiford > > gcc/c/ > * c-objc-common.c (useful_aka_type_p): New function. > (print_type): Use it to decide whether an aka type is worth printing. > > gcc/testsuite/ > * gcc.dg/diag-aka-1.c (T): Turn into a

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Segher Boessenkool
On Mon, Sep 30, 2019 at 07:47:54PM +0200, Jakub Jelinek wrote: > So, can you try just >{ dg-prune-output "warning: warning: \[^\n\r\]* possibly used unsafely; > consider using" } */ > or if that doesn't work, with .* at start end end? Or even just { dg-prune-output {(?n)warning: warning: .*

Re: [01/32] Add function_abi.{h,cc}

2019-09-30 Thread Jeff Law
On 9/30/19 3:19 AM, Richard Sandiford wrote: > Hi Jeff, > > Thanks as always for the reviews :-) > > Jeff Law writes: >> On 9/11/19 1:03 PM, Richard Sandiford wrote: >>> This patch adds new structures and functions for handling >>> multiple ABIs in a translation unit. The structures are: >>>

[WIP PATCH] PR71102: Make #pragma GCC error/warning concat strings

2019-09-30 Thread Stephan Bergmann
(I think this is my first patch submission here, so please bear with me.) As discussed at "_Pragma("GCC warning ...") should concatenate string literals", it would be useful if #pragma GCC error/warning behaved like #pragma message and

Re: [AArch64] Strengthen aarch64_hard_regno_call_part_clobbered

2019-09-30 Thread Richard Sandiford
Richard Sandiford writes: > The aarch64_vector_pcs handling in aarch64_hard_regno_call_part_clobbered > checks whether the mode might be bigger than 16 bytes, since on SVE > targets the (non-SVE) vector PCS only guarantees that the low 16 bytes > are preserved. But for multi-register modes, we

Re: [21/32] Remove global call sets: LRA

2019-09-30 Thread Jeff Law
On 9/11/19 1:14 PM, Richard Sandiford wrote: > lra_reg has an actual_call_used_reg_set field that is only used during > inheritance. This in turn required a special lra_create_live_ranges > pass for flag_ipa_ra to set up this field. This patch instead makes > the inheritance code do its own live

Re: [ping][PR target/85401] initialize the move cost table before using it

2019-09-30 Thread Vladimir Makarov
On 2019-09-28 5:52 a.m., co...@sdf.org wrote: re-posting, now CC'ing vmakarov who might be the right person to ping about issues in this file. apologies for the noise if I'm wrong. -- This seems to be the way the rest of ira-color.c does it. I hope it's OK. It does fix the segfault. Yes, the

Re: [03/32] Add a function for getting the ABI of a call insn target

2019-09-30 Thread Richard Sandiford
Jeff Law writes: > On 9/25/19 9:38 AM, Richard Sandiford wrote: >> Richard Sandiford writes: >>> This patch replaces get_call_reg_set_usage with call_insn_abi, >>> which returns the ABI of the target of a call insn. The ABI's >>> full_reg_clobbers corresponds to regs_invalidated_by_call, >>>

[PATCH, RS6000] Add movmemsi pattern for inline expansion of memmove()

2019-09-30 Thread Aaron Sawdey
This patch uses the support added in the patch I posted last week for actually doing inline expansion of memmove(). I've added a might_overlap parameter to expand_block_move() to tell it when it must make sure to handle overlapping moves. I changed the code to save up the generated rtx for both

Re: [C] Print ", ..." rather than ", ..." in diagnostics

2019-09-30 Thread Marek Polacek
On Mon, Sep 30, 2019 at 01:57:49PM +0100, Richard Sandiford wrote: > pp_separate_with inserts a space after the separator, so there's > no need to add whitespace before "..." as well. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu. Bordering on obvious, > but I wasn't 100% sure if this

[C] Avoid aka types that just add tags

2019-09-30 Thread Richard Sandiford
diag-aka-1.c tests that: struct T { int i; } T; void *a; T *t = a; produces: request for implicit conversion from 'void *' to 'T *' {aka 'struct T *'} ... But printing an aka for the tag seems a bit redundant when the tag name is the same as the typedef name. It's probably not going

[patch, libgomp] testsuite remove alloca header

2019-09-30 Thread Andreas Tobler
Hi, here on FreeBSD we lack the alloca.h header so two test cases fail to compile. Do the same as I did six years ago for another test case: 'Remove alloca.h and replace it with __builtin_alloca" Is this ok for trunk? TIA, Andreas 2019-09-30 Andreas Tobler *

Re: [PATCH, committed], V4.2, patch #2: Add prefixed insn attribute (revised #2)

2019-09-30 Thread Michael Meissner
This is the patch that I committed (along with revised patch #1 and #3). In addition to the changes suggested, I needed to change the enumeration non_prefixed_form to the new name. 2019-09-30 Michael Meissner * config/rs6000/rs6000-protos.h (prefixed_load_p): New declaration.

Re: [PATCH v3 6/9] S/390: Remove code duplication in vec_unordered

2019-09-30 Thread Andreas Krebbel
On 05.09.19 13:10, Ilya Leoshkevich wrote: > vec_unordered is vec_ordered plus a negation at the end. > Reuse vec_unordered logic. > > gcc/ChangeLog: > > 2019-08-13 Ilya Leoshkevich > > PR target/77918 > * config/s390/vector.md (vec_unordered): Call > gen_vec_ordered. Ok.

[IRA] Handle fully-tied destinations in a similar way to earlyclobbers

2019-09-30 Thread Richard Sandiford
IRA's make_early_clobber_and_input_conflicts checks for cases in which an output operand is likely to be an earlyclobber and an input operand is unlikely to be tieable with it. If so, the allocno for the output conflicts with the allocno for the input. This seems to work well. However, a

Re: [PATCH v3 2/9] Introduce rtx_alloca, alloca_raw_REG and alloca_rtx_fmt_*

2019-09-30 Thread Ilya Leoshkevich
> Am 06.09.2019 um 14:40 schrieb Richard Sandiford : > > Ilya Leoshkevich writes: >> One of the next patches in series needs to frequently pass short-lived >> fake rtxes to the back-end in order to test its capabilities. In order >> to reduce the load on GC, it is beneficial to allocate these

Re: [30/32] Remove global call sets: sel-sched.c

2019-09-30 Thread Jeff Law
On 9/11/19 1:18 PM, Richard Sandiford wrote: > The main change here is to replace a crosses_call boolean with > a bitmask of the ABIs used by the crossed calls. For space reasons, > I didn't also add a HARD_REG_SET that tracks the set of registers > that are actually clobbered, which means that

Re: [19/32] Remove global call sets: IRA

2019-09-30 Thread Jeff Law
On 9/11/19 1:12 PM, Richard Sandiford wrote: > For -fipa-ra, IRA already keeps track of which specific registers > are call-clobbered in a region, rather than using global information. > The patch generalises this so that it tracks which ABIs are used > by calls in the region. > > We can then use

New Spanish PO file for 'gcc' (version 9.1.0)

2019-09-30 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: https://translationproject.org/latest/gcc/es.po (This file, 'gcc-9.1.0.es.po', has

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Martin Sebor
On 9/30/19 1:37 AM, Richard Biener wrote: On Sun, Sep 29, 2019 at 9:52 PM Martin Sebor wrote: -Wstringop-overflow detects a subset of past-the-end read and write accesses by built-in functions such as memcpy and strcpy. It relies on the functions' effects the knowledge of which is hardwired

Re: [03/32] Add a function for getting the ABI of a call insn target

2019-09-30 Thread Jeff Law
On 9/25/19 9:38 AM, Richard Sandiford wrote: > Richard Sandiford writes: >> This patch replaces get_call_reg_set_usage with call_insn_abi, >> which returns the ABI of the target of a call insn. The ABI's >> full_reg_clobbers corresponds to regs_invalidated_by_call, >> whereas many callers

Re: [11/32] Remove global call sets: cse.c

2019-09-30 Thread Richard Sandiford
Jeff Law writes: > On 9/25/19 9:57 AM, Richard Sandiford wrote: >> Richard Sandiford writes: >>> Like with the combine.c patch, this one keeps things simple by >>> invalidating values in partially-clobbered registers, rather than >>> trying to tell whether the value in a partially-clobbered

Re: [patch, libgomp] testsuite remove alloca header

2019-09-30 Thread Jakub Jelinek
On Mon, Sep 30, 2019 at 03:16:00PM +0200, Andreas Tobler wrote: > here on FreeBSD we lack the alloca.h header so two test cases fail to > compile. > > Do the same as I did six years ago for another test case: 'Remove alloca.h > and replace it with __builtin_alloca" > > Is this ok for trunk? > >

Re: [PATCH v3 4/9] S/390: Do not use signaling vector comparisons on z13

2019-09-30 Thread Ilya Leoshkevich
> Am 06.09.2019 um 12:34 schrieb Segher Boessenkool > : > > Hi Ilya, > > On Thu, Sep 05, 2019 at 01:10:14PM +0200, Ilya Leoshkevich wrote: >> z13 supports only non-signaling vector comparisons. This means we >> cannot vectorize LT, LE, GT, GE and LTGT when compiling for z13. Notify >>

[x86] Cache result of expensive_function_p between frame layouts

2019-09-30 Thread Richard Sandiford
ix86_compute_frame_layout sets use_fast_prologue_epilogue if the function isn't more expensive than a certain threshold, where the threshold depends on the number of saved registers. However, the RA is allowed to insert and delete instructions as it goes along, which can change whether this

[C] Improve diagnostics for vector types

2019-09-30 Thread Richard Sandiford
Given the following invalid arm_neon.h-based code: float x; int8x8_t y = x; the error message we emit is pretty good: incompatible types when initializing type 'int8x8_t' using type 'float' But convert the types to pointers: int8x8_t *ptr = and the message becomes: initialization

[C][C++] Avoid exposing internal details in aka types

2019-09-30 Thread Richard Sandiford
The current aka diagnostics can sometimes leak internal details that seem more likely to be distracting than useful. E.g. on aarch64: void f (va_list *va) { *va = 1; } gives: incompatible types when assigning to type ‘va_list’ {aka ‘__va_list’} from type ‘int’ where __va_list isn't

Re: [PATCH] libgomp_g.h: Include stdint.h instead of gstdint.h

2019-09-30 Thread Harwath, Frederik
Hi Jakub, Am 30.09.2019 um 09:25 schrieb Jakub Jelinek: > On Mon, Sep 30, 2019 at 12:03:00AM -0700, Frederik Harwath wrote: >> The patch changes libgomp/libgomp_g.h to include stdint.h instead of the >> internal gstdint.h. [...] > > That looks wrong, will make libgomp less portable. [...] >

Re: [SVE] PR91532

2019-09-30 Thread Jeff Law
On 9/30/19 12:49 AM, Richard Biener wrote: > On Sun, 29 Sep 2019, Jeff Law wrote: > >> On 9/26/19 12:44 AM, Richard Biener wrote: >>> On Wed, 25 Sep 2019, Prathamesh Kulkarni wrote: >>> On Fri, 20 Sep 2019 at 15:20, Jeff Law wrote: > > On 9/19/19 10:19 AM, Prathamesh Kulkarni wrote:

[C] Print ", ..." rather than ", ..." in diagnostics

2019-09-30 Thread Richard Sandiford
pp_separate_with inserts a space after the separator, so there's no need to add whitespace before "..." as well. Tested on aarch64-linux-gnu and x86_64-linux-gnu. Bordering on obvious, but I wasn't 100% sure if this would be the preferred fix or not, so... OK to install? Richard 2019-09-30

Re: [Patch][fortran,omp-low.c] Fix OpenMP's use_device_ptr clause with array descriptors

2019-09-30 Thread Tobias Burnus
Hi all, found bug in the run test of the patch (pending review) – fixing it still passes (with nvptx): On 9/27/19 4:52 PM, Tobias Burnus wrote: libgomp/testsuite/libgomp.fortran/use_device_ptr1.f90 […] + call use_device_ptr_sub(arg2_AA, arg2_BB, arg2_CC, arg2_DD, arg2_EE, arg2_FF, AptrA,

Re: [PATCH] libgomp_g.h: Include stdint.h instead of gstdint.h

2019-09-30 Thread Jakub Jelinek
On Mon, Sep 30, 2019 at 03:42:34PM +0200, Harwath, Frederik wrote: > > Hi Jakub, > > Am 30.09.2019 um 09:25 schrieb Jakub Jelinek: > > On Mon, Sep 30, 2019 at 12:03:00AM -0700, Frederik Harwath wrote: > >> The patch changes libgomp/libgomp_g.h to include stdint.h instead of the > >> internal

Re: [PATCH, committed] V4.2, patch #1: Rework prefixed/pc-relative lookup (revised #2)

2019-09-30 Thread Michael Meissner
This is the reworked version of patch #1 that I committed: 2019-09-30 Michael Meissner * config/rs6000/predicates.md (pcrel_address): Delete predicate. (pcrel_local_address): Replace pcrel_address predicate, use the new function address_to_insn_form.

Re: [PATCH] libgomp_g.h: Include stdint.h instead of gstdint.h

2019-09-30 Thread Jakub Jelinek
On Mon, Sep 30, 2019 at 03:45:51PM +0200, Jakub Jelinek wrote: > > Am 30.09.2019 um 09:25 schrieb Jakub Jelinek: > > > On Mon, Sep 30, 2019 at 12:03:00AM -0700, Frederik Harwath wrote: > > >> The patch changes libgomp/libgomp_g.h to include stdint.h instead of the > > >> internal gstdint.h. [...]

[PATCH], V4, patch #4.1: Enable prefixed/pc-rel addressing (revised)

2019-09-30 Thread Michael Meissner
As we discussed privately on Friday, I had a few nits to patch #4 that came up after I submitted the patch. The changes between that patch and this patch are: 1) I needed to change the enum non_prefixed_form to its new spelling in the revised patch #1 that was committed. 2) In building glibc

Re: [PATCH v3 5/9] S/390: Implement vcond expander for V1TI,V1TF

2019-09-30 Thread Andreas Krebbel
On 05.09.19 13:10, Ilya Leoshkevich wrote: > Currently gcc does not emit wf{c,k}* instructions when comparing long > double values. Middle-end actually adds them in the first place, but > then veclower pass replaces them with floating point register pair > operations, because the corresponding

Re: [PATCH v3 7/9] S/390: Remove code duplication in vec_* comparison expanders

2019-09-30 Thread Andreas Krebbel
On 05.09.19 13:10, Ilya Leoshkevich wrote: > s390.md uses a lot of near-identical expanders that perform dispatching > to other expanders based on operand types. Since the following patch > would require even more of these, avoid copy-pasting the code by > generating these expanders using an

Re: [03/32] Add a function for getting the ABI of a call insn target

2019-09-30 Thread Jeff Law
On 9/30/19 10:32 AM, Richard Sandiford wrote: > Jeff Law writes: >> On 9/25/19 9:38 AM, Richard Sandiford wrote: >>> Richard Sandiford writes: This patch replaces get_call_reg_set_usage with call_insn_abi, which returns the ABI of the target of a call insn. The ABI's

Re: [AArch64] Allow shrink-wrapping of non-leaf vector PCS functions

2019-09-30 Thread Richard Sandiford
Richard Sandiford writes: > [This follows on from: > https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00778.html > https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01456.html] > > With the function ABI stuff, we can now support shrink-wrapping of > non-leaf vector PCS functions. This is particularly

Re: [AArch64] Make more use of function_abi

2019-09-30 Thread Richard Sandiford
Richard Sandiford writes: > [This follows on from: > https://gcc.gnu.org/ml/gcc-patches/2019-09/msg00778.html > https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01456.html] > > This patch makes more use of the function_abi infrastructure. > We can then avoid checking specifically for the vector

[PATCH] Include netinet/in.h in include/experimental/internet

2019-09-30 Thread Andreas Tobler
Hi all, I'm going to commit the attached patch to trunk. It is preapproved by Jonathan. (via #irc) On FreeBSD the netinet/in.h header is not included by arpa/inet.h, so do the include if we have the _GLIBCXX_HAVE_NETINET_IN_H defined. This makes all the experimental/net/internet test cases

[PATCH] libstdc++ testsuite, silence a FreeBSD libm warning

2019-09-30 Thread Andreas Tobler
Hi all, the attached patch tries to silence a warning from the msun of FreeBSD. When compiling the special_functions testcases, I get excess errors because of this warning: warning: tgammal has lower than advertised precision With the patch, all special_functions test cases pass now. What

[PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Andreas Tobler
Hi all, the below patch tries to silence a warning from the FreeBSD libc. This warning currently makes all the test cases fail where we make use of the tmpnam() function. --- /usr/local/bin/ld: /tmp//ccBQaYlC.o: in function `main': printf-2.c:(.text+0x8d): warning: warning: tmpnam() possibly

[PATCH] ifcvt: improve cost estimation (PR 87047)

2019-09-30 Thread Alexander Monakov
Hi, this patch corrects a problem where our cost estimation in if-conversion is broken when the 'else' block is missing: we then take the cost of 'then' block, which leads gcc willing to replace a conditionally-executed block with cost 80 with an unconditionally-executed block with cost 72.

Re: [AArch64][SVE] Utilize ASRD instruction for division and remainder

2019-09-30 Thread Richard Sandiford
Yuliang Wang writes: > Thanks for the corrections, updated. > > Regards > Yuliang > > (no ChangeLog updates) Thanks, applied as r276343. Richard

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Jakub Jelinek
On Mon, Sep 30, 2019 at 07:15:59PM +0200, Andreas Tobler wrote: > Hi all, > > the below patch tries to silence a warning from the FreeBSD libc. This > warning currently makes all the test cases fail where we make use of the > tmpnam() function. > > --- > /usr/local/bin/ld: /tmp//ccBQaYlC.o: in

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Andreas Tobler
On 30.09.19 19:20, Jakub Jelinek wrote: On Mon, Sep 30, 2019 at 07:15:59PM +0200, Andreas Tobler wrote: Hi all, the below patch tries to silence a warning from the FreeBSD libc. This warning currently makes all the test cases fail where we make use of the tmpnam() function. ---

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Jakub Jelinek
On Mon, Sep 30, 2019 at 07:41:00PM +0200, Andreas Tobler wrote: > --- fprintf-2.c (revision 276292) > +++ fprintf-2.c (working copy) > @@ -1,7 +1,8 @@ > /* Verify that calls to fprintf don't get eliminated even if their > result on success can be computed at compile time (they can

Re: [PATCH] ifcvt: improve cost estimation (PR 87047)

2019-09-30 Thread Alexander Monakov
On Mon, 30 Sep 2019, Alexander Monakov wrote: > +static unsigned > +average_cost (unsigned then_cost, unsigned else_cost, edge e) > +{ > + return else_cost + e->probability.apply ((int) then_cost - else_cost); Ugh, I made a wrong last-minute edit here, we want signed cost difference so the

Re: [x86] Cache result of expensive_function_p between frame layouts

2019-09-30 Thread Jan Hubicka
> ix86_compute_frame_layout sets use_fast_prologue_epilogue if > the function isn't more expensive than a certain threshold, > where the threshold depends on the number of saved registers. > However, the RA is allowed to insert and delete instructions > as it goes along, which can change whether

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Andreas Tobler
On 30.09.19 19:47, Jakub Jelinek wrote: On Mon, Sep 30, 2019 at 07:41:00PM +0200, Andreas Tobler wrote: --- fprintf-2.c (revision 276292) +++ fprintf-2.c (working copy) @@ -1,7 +1,8 @@ /* Verify that calls to fprintf don't get eliminated even if their result on success can be computed at

Re: [PATCH] Add some hash_map_safe_* functions like vec_safe_*.

2019-09-30 Thread Jason Merrill
My comments accidentally got lost. Several places in the front-end (and elsewhere) use the same lazy allocation pattern for hash_maps, and this patch replaces them with hash_map_safe_* functions like vec_safe_*. They don't provide a way to specify an initial size, but I don't think that's a

Re: [PATCH] libstdc++ testsuite, silence a FreeBSD libm warning

2019-09-30 Thread Andreas Tobler
On 30.09.19 19:09, Andreas Tobler wrote: Hi all, the attached patch tries to silence a warning from the msun of FreeBSD. When compiling the special_functions testcases, I get excess errors because of this warning: warning: tgammal has lower than advertised precision With the patch, all

Re: [C++ Patch] Improve grokdeclarator error

2019-09-30 Thread Paolo Carlini
Hi, On 30/09/19 20:46, Jason Merrill wrote: On Mon, Sep 30, 2019 at 6:54 AM Paolo Carlini wrote: On 28/09/19 04:05, Jason Merrill wrote: On 9/26/19 3:39 PM, Paolo Carlini wrote: +template void foo( // { dg-error "15:template-id .foo. used as a declarator" } That's a strange diagnostic

Re: [PATCH] libstdc++ testsuite, silence a FreeBSD libm warning

2019-09-30 Thread Jonathan Wakely
On 30/09/19 21:21 +0200, Andreas Tobler wrote: On 30.09.19 19:09, Andreas Tobler wrote: Hi all, the attached patch tries to silence a warning from the msun of FreeBSD. When compiling the special_functions testcases, I get excess errors because of this warning: warning: tgammal has lower than

[PATCH] Add some hash_map_safe_* functions like vec_safe_*.

2019-09-30 Thread Jason Merrill
gcc/ * hash-map.h (default_size): Put in member variable. (create_ggc): Use it as default argument. (hash_map_maybe_create, hash_map_safe_get) (hash_map_safe_get_or_insert, hash_map_safe_put): New fns. gcc/cp/ * constexpr.c

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Jakub Jelinek
On Mon, Sep 30, 2019 at 08:31:23PM +0200, Andreas Tobler wrote: > Ok, yes it works too with your suggestion. > > Attached. Ok for trunk. > One question, doing it per test case is cheaper than in prune.exp? (Where we > do it for 'all' test cases, needed or not.) IMHO yes, doing it 20 or how

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Kamil Rytarowski
On 30.09.2019 19:47, Jakub Jelinek wrote: > On Mon, Sep 30, 2019 at 07:41:00PM +0200, Andreas Tobler wrote: >> --- fprintf-2.c (revision 276292) >> +++ fprintf-2.c (working copy) >> @@ -1,7 +1,8 @@ >> /* Verify that calls to fprintf don't get eliminated even if their >> result on

Re: [PATCH] C testsuite, silence a FreeBSD libc warning

2019-09-30 Thread Andreas Tobler
On 30.09.19 20:37, Kamil Rytarowski wrote: On 30.09.2019 19:47, Jakub Jelinek wrote: On Mon, Sep 30, 2019 at 07:41:00PM +0200, Andreas Tobler wrote: --- fprintf-2.c (revision 276292) +++ fprintf-2.c (working copy) @@ -1,7 +1,8 @@ /* Verify that calls to fprintf don't get eliminated even if

Re: [C++ Patch] Improve grokdeclarator error

2019-09-30 Thread Jason Merrill
On Mon, Sep 30, 2019 at 6:54 AM Paolo Carlini wrote: > > On 28/09/19 04:05, Jason Merrill wrote: > > On 9/26/19 3:39 PM, Paolo Carlini wrote: > >> +template void foo( // { dg-error "15:template-id .foo. > >> used as a declarator" } > > > > That's a strange diagnostic message; there's nothing

[committed] diagnostic-show-locus.c: rework handling of multiple labels

2019-09-30 Thread David Malcolm
This patch improves the handling of large numbers of labels within a rich_location: previously, overlapping labels could lead to an assertion failure within layout::print_any_labels. Also, the labels were printed in reverse order of insertion into the rich_location. This patch moves the

Re: [PATCH] Fix algo constexpr tests in Debug mode

2019-09-30 Thread François Dumont
On 9/30/19 11:03 AM, Jonathan Wakely wrote: On 28/09/19 23:12 +0200, François Dumont wrote: Here is what I just commited. Thanks. In my branch I had a lot more _GLIBCXX20_CONSTEXPR additions in the debug mode headers. Is it not needed on __check_singular, __foreign_iterator etc. ? Yes, I

[PATCH] Implement C++20 P1023 for __debug::array

2019-09-30 Thread François Dumont
This is a missing part of C++20 P1023 for __debug::array.     Implement C++20 p1023 - constexpr comparison operators for __debug::array.     * include/debug/array: Add C++20 constexpr to comparison operators.     * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt    

Re: [ping][PR target/85401] initialize the move cost table before using it

2019-09-30 Thread coypu
On Mon, Sep 30, 2019 at 11:46:24AM -0400, Vladimir Makarov wrote: > Yes, the patch is mostly ok.  You can commit it into the trunk after > applying changes mentioned below. If you do not have a write access, let me > know I'll commit the patch by myself. I don't have commit access. It would be

Re: [SVE] PR91532

2019-09-30 Thread Richard Biener
On Sun, 29 Sep 2019, Jeff Law wrote: > On 9/26/19 12:44 AM, Richard Biener wrote: > > On Wed, 25 Sep 2019, Prathamesh Kulkarni wrote: > > > >> On Fri, 20 Sep 2019 at 15:20, Jeff Law wrote: > >>> > >>> On 9/19/19 10:19 AM, Prathamesh Kulkarni wrote: > Hi, > For PR91532, the dead store

Patch ping

2019-09-30 Thread Jakub Jelinek
Hi! On Sat, Sep 21, 2019 at 08:14:13AM +0200, Jakub Jelinek wrote: > 2019-09-21 Jakub Jelinek > > PR tree-optimization/91734 > * generic-match-head.c: Include fold-const-call.h. > * match.pd (sqrt(x) cmp c): Check the boundary value and > in case inexact computation of

[PATCH] Fix up ix86_expand_adjust_ufix_to_sfix_si ICE (PR target/91931)

2019-09-30 Thread Jakub Jelinek
Hi! The recent SUBREG simplification changes aren't as forgiving in the past and ICE on invalid constants, in this case CONST_VECTOR:V8SI with 8x CONST_INT 0x8000 element, which is invalid, because for SImode it needs to be sign extended. Fixed thusly, bootstrapped/regtested on x86_64-linux

[PATCH] libgomp_g.h: Include stdint.h instead of gstdint.h

2019-09-30 Thread Frederik Harwath
Hi, I am a new member of Mentor's Sourcery Tools Services group and this is the first patch that I am submitting here. I do not have write access to the svn repository yet, hence someone would have to merge this patch for me if it gets accepted. But I intend to apply for an account soon. The

Re: [PATCH] Fix up ix86_expand_adjust_ufix_to_sfix_si ICE (PR target/91931)

2019-09-30 Thread Uros Bizjak
On Mon, Sep 30, 2019 at 9:01 AM Jakub Jelinek wrote: > > Hi! > > The recent SUBREG simplification changes aren't as forgiving in the past and > ICE on invalid constants, in this case CONST_VECTOR:V8SI with 8x CONST_INT > 0x8000 element, which is invalid, because for SImode it needs to be sign

Re: [PATCH] libgomp_g.h: Include stdint.h instead of gstdint.h

2019-09-30 Thread Jakub Jelinek
On Mon, Sep 30, 2019 at 12:03:00AM -0700, Frederik Harwath wrote: > Hi, > I am a new member of Mentor's Sourcery Tools Services group and this is the > first patch that I am submitting here. > I do not have write access to the svn repository yet, hence someone would > have to merge this patch

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Richard Biener
On Sun, Sep 29, 2019 at 9:52 PM Martin Sebor wrote: > > -Wstringop-overflow detects a subset of past-the-end read and write > accesses by built-in functions such as memcpy and strcpy. It relies > on the functions' effects the knowledge of which is hardwired into > GCC. Although it's possible

Re: [PATCH] FreeBSD PowerPC use secure-plt

2019-09-30 Thread Andreas Tobler
On 26.09.19 08:13, Andreas Tobler wrote: Hi Segher, On 26.09.19 00:49, Segher Boessenkool wrote: On Wed, Sep 25, 2019 at 10:46:57PM +0200, Andreas Tobler wrote: --- gcc/config/rs6000/t-freebsd64 (revision 276090) +++ gcc/config/rs6000/t-freebsd64 (working copy) @@ -27,3 +27,6 @@

[PATCH] Dissect vect_create_epilog_for_reduction

2019-09-30 Thread Richard Biener
This completes the first refactoring by decoupling epilogue creation (vect_create_epilog_for_reduction) from vectorizing of the "reduction stmt" (vectorizable_reduction). The epilogue is now created when vectorizing the live result of the reduction stmt, thus through

Re: [C++ Patch] Improve grokdeclarator error

2019-09-30 Thread Paolo Carlini
Hi, On 28/09/19 04:05, Jason Merrill wrote: On 9/26/19 3:39 PM, Paolo Carlini wrote: +template void foo(  // { dg-error "15:template-id .foo. used as a declarator" } That's a strange diagnostic message; there's nothing wrong with using a template-id as a declarator.  Why are we even calling

Re: [PATCH] [MIPS] Fix PR target/91769

2019-09-30 Thread Dragan Mladjenovic
CC: YunQiang Su On 25.09.2019. 09:16, Dragan Mladjenovic wrote: > From: "Dragan Mladjenovic" > > This fixes the issue by checking that addr's base reg is not part of dest > multiword reg instead just checking the first reg of dest. > > gcc/ChangeLog: > > 2019-09-25 Dragan Mladjenovic > >

Re: [MIPS] GCC: Fix Loongson3 LLSC Errata

2019-09-30 Thread Jiaxun Yang
On 2018/11/30 下午8:45, Paul Hua wrote: In some older Loongson3 processors there is a LL/SC errata that can cause the CPU to deadlock occasionally. The details are very complicated. We find a way to work around this errata by a) adding a sync before ll/lld instruction, b) adding a sync before

Re: [PATCH] Automatics in equivalence statements

2019-09-30 Thread Jakub Jelinek
On Sat, Sep 28, 2019 at 10:33:26PM +0200, Andreas Schwab wrote: > On Aug 14 2019, Mark Eggleston wrote: > > >     * gfortran.dg/auto_in_equiv_3.f90: New test. > > This test fails everywhere. Yes, and _2 on i686-linux at -O0. To me both testcases are undefined behavior. E.g. the first one has:

Re: [RFC] Come up with ipa passes introduction in gccint documentation

2019-09-30 Thread Martin Jambor
Hi, I agree that we should have a chapter on IPA passes in gccint, just please note that... On Sun, Sep 29 2019, Xiong Hu Luo wrote: > There is no ipa passes introduction in gccint now, is it nessessary to > add this part as both GIMPLE passes and RTL passes breif intruduction > already exit in

Ping: [PATCH V4] Generalized predicate/condition for parameter reference in IPA (PR ipa/91088)

2019-09-30 Thread Feng Xue OS
Hi, Honza & Martin, Would you please take some time to review this updated patch? Thanks. Feng From: Feng Xue OS Sent: Wednesday, September 18, 2019 8:41 PM To: Jan Hubicka Cc: Martin Jambor; gcc-patches@gcc.gnu.org Subject: [PATCH V4] Generalized

Re: [PATCH] Fix algo constexpr tests in Debug mode

2019-09-30 Thread Jonathan Wakely
On 28/09/19 23:12 +0200, François Dumont wrote: Here is what I just commited. Thanks. In my branch I had a lot more _GLIBCXX20_CONSTEXPR additions in the debug mode headers. Is it not needed on __check_singular, __foreign_iterator etc. ? I try to use the asm trick in the

[PATCH] Do not check call type compatibility when cloning cgraph edges

2019-09-30 Thread Martin Jambor
Hi, when looking into PR 70929 and thus looking at what gimple_check_call_matching_types and gimple_check_call_args (both in cgraph.c) do, I noticed that they get invoked a lot when cloning cgraph edges when code is being copied as part of inlining transformation, only to have their result

Ping: [PATCH V4] Extend IPA-CP to support arithmetically-computed value-passing on by-ref argument (PR ipa/91682)

2019-09-30 Thread Feng Xue OS
Hi Honza & Martin, And also hope your comments on this patch. Thanks. Feng From: Feng Xue OS Sent: Thursday, September 19, 2019 10:30 PM To: Martin Jambor; Jan Hubicka; gcc-patches@gcc.gnu.org Subject: [PATCH V4] Extend IPA-CP to support

[PATCH] IPA-CP release transformation summary (PR jit/91928)

2019-09-30 Thread Andrea Corallo
Hi all, I'd like to submit this patch. It release the ipa cp transformation summary after functions being expanded. This is to fix the compiler when used with libgccjit on subsequent compilations (every new compilation should have a clean transformation summary). Bootstrap on arm64 and X86-64.

Re: [PATCH] IPA-CP release transformation summary (PR jit/91928)

2019-09-30 Thread Martin Jambor
Hi, On Mon, Sep 30 2019, Andrea Corallo wrote: > Hi all, > I'd like to submit this patch. > It release the ipa cp transformation summary after functions being expanded. > This is to fix the compiler when used with libgccjit on subsequent > compilations (every new compilation should have a clean

Re: [PATCH][gcc] libgccjit: handle long literals in playback::context::new_string_literal

2019-09-30 Thread Andrea Corallo
Andrea Corallo writes: > Andrea Corallo writes: > >> Hi all, >> yesterday I've found an interesting bug in libgccjit. >> Seems we have an hard limitation of 200 characters for literal strings. >> Attempting to create longer strings lead to ICE during pass_expand >> while performing a sanity

Re: [01/32] Add function_abi.{h,cc}

2019-09-30 Thread Richard Sandiford
Hi Jeff, Thanks as always for the reviews :-) Jeff Law writes: > On 9/11/19 1:03 PM, Richard Sandiford wrote: >> This patch adds new structures and functions for handling >> multiple ABIs in a translation unit. The structures are: >> >> - predefined_function_abi: describes a static,

  1   2   >