[PATCH] Do not instrument use-after-scope for vars with large alignment (PR sanitizer/82517).

2017-10-19 Thread Martin Liška
Hi. As discussed with Jakub, use-after-scope sanitization should not be done for variables that have bigger alignment than MAX_SUPPORTED_STACK_ALIGNMENT. In this case, we can't put a variable to fixed stack slot. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready

Re: [PATCH] Do not instrument use-after-scope for vars with large alignment (PR sanitizer/82517).

2017-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2017 at 09:21:47AM +0200, Martin Liška wrote: > Hi. > > As discussed with Jakub, use-after-scope sanitization should not be done for > variables that have bigger > alignment than MAX_SUPPORTED_STACK_ALIGNMENT. In this case, we can't put a > variable to fixed stack slot. > >

[committed] Fix ICE with F2008 BLOCK inside of !$OMP PARALLEL (PR fortran/82568)

2017-10-19 Thread Jakub Jelinek
Hi! As OpenMP 4.5 supports only F2003 and earlier, this is strictly speaking code with unspecified behavior, but we shouldn't ICE on it, so if we find a sequential loop iterator inside of BLOCK inside of parallel or task generating construct, and the loop iterator is explicitly or implicitly

Re: [PATCH GCC][4/7]Choose exit edge/path when removing inner loop's exit statement

2017-10-19 Thread Tom de Vries
On 10/09/2017 03:34 PM, Richard Biener wrote: On Thu, Oct 5, 2017 at 3:16 PM, Bin Cheng wrote: Hi, Function generate_loops_for_partition chooses arbitrary path when removing exit condition not in partition. This is fine for now because it's impossible to have loop exit

Re: [RFA] Zen tuning part 9: Add support for scatter/gather in vectorizer costmodel

2017-10-19 Thread Jan Hubicka
Hi, this is proof of concept patch for vectorizer costs to use costs used for rtx_cost and register_move_cost which are readily available in ix86_costs instead of using its own set of random values. At least until we have proof of evidence that vectroizer costs needs to differ, I do not think

Re: [PATCH] Derive interface buffers from max name length

2017-10-19 Thread Bernhard Reutner-Fischer
On Sat, Jun 18, 2016 at 09:46:17PM +0200, Bernhard Reutner-Fischer wrote: > On December 3, 2015 10:46:09 AM GMT+01:00, Janne Blomqvist > wrote: > >On Tue, Dec 1, 2015 at 6:51 PM, Bernhard Reutner-Fischer > > wrote: > >> On 1 December 2015 at

[PATCH, i386] Improve double-word comparisons (PR target/82580)

2017-10-19 Thread Jakub Jelinek
Hi! With the patch you've checked in yesterday we generate e.g. for f2 cmpq%rdi, %rdx sbbq%rsi, %rcx setb%al movzbl %al, %eax This is because the peephole2s we have for setcc + movzbl to xorl + setcc check that the flags register is dead before the

Re: [patch] implement generic debug() functions for wide_int's

2017-10-19 Thread Aldy Hernandez
On 10/18/2017 11:23 PM, Martin Sebor wrote: On 10/18/2017 11:08 AM, Aldy Hernandez wrote: It looks like the generic debug() function for wide_int's is missing. Instead, we have a wi->dump() method.  I have implemented debug() for generic wide_int and for widest_int, which should cover the

Re: [RFA] Zen tuning part 9: Add support for scatter/gather in vectorizer costmodel

2017-10-19 Thread Richard Biener
On Thu, 19 Oct 2017, Jan Hubicka wrote: > Hi, > this is proof of concept patch for vectorizer costs to use costs used for > rtx_cost > and register_move_cost which are readily available in ix86_costs instead of > using > its own set of random values. At least until we have proof of evidence

Re: [patch] Fix PR debug/82509

2017-10-19 Thread Richard Biener
On Wed, Oct 18, 2017 at 3:54 PM, Eric Botcazou wrote: >> Hmm. It makes tracking DIE builds difficult now that not all allocations go >> through new_die anymore. > > I wouldn't have created such a precedent though, IOW there is nothing new. Ah, didn't notice the other

Re: [PATCH, fortran, v4] Use Levenshtein spelling suggestions in Fortran FE

2017-10-19 Thread Bernhard Reutner-Fischer
[forgot to CC gcc-patches] On Sat, Jun 18, 2016 at 09:58:47PM +0200, Bernhard Reutner-Fischer wrote: > Hi, > > Ok for trunk? This was ACKed about a year ago by Janne and Jerry and since there were no objections in the meantime i've installed this first step towards providing spelling

Re: [patch] implement generic debug() functions for wide_int's

2017-10-19 Thread Aldy Hernandez
On 10/18/2017 06:22 PM, Pedro Alves wrote: On 10/18/2017 06:08 PM, Aldy Hernandez wrote: Also, do we have a blessed way of specifying overloaded functions in ChangeLog's? I couldn't find anything in our GCC coding guidelines or in the GNU coding guidelines. For lack of direction, I'm doing

Re: Add an alternative vector loop iv mechanism

2017-10-19 Thread Richard Biener
On Thu, Oct 19, 2017 at 12:28 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Fri, Oct 13, 2017 at 4:10 PM, Richard Sandiford >> wrote: >>> Normally we adjust the vector loop so that it iterates:

Re: Add an alternative vector loop iv mechanism

2017-10-19 Thread Richard Biener
On Thu, Oct 19, 2017 at 10:48 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Thu, Oct 19, 2017 at 12:28 AM, Richard Sandiford >> wrote: >>> Richard Biener writes:

Re: [PATCH PR/82546] tree node size

2017-10-19 Thread Olivier Hainque
> On 18 Oct 2017, at 15:59, Eric Botcazou wrote: > >> I'd think so. LANG_TYPE is treated specially in several >> places and Ada debug types are pretty sensitive so this would >> require caution but I don't see/know-of obvious reasons why this >> couldn't be done. > >

Re: [patch] avoid printing leading 0 in widest_int hex dumps

2017-10-19 Thread Aldy Hernandez
On 10/18/2017 06:39 PM, Richard Sandiford wrote: Aldy Hernandez writes: On Tue, Oct 17, 2017 at 6:05 PM, Richard Sandiford Ah! OK. Yeah, I agree it doesn't make sense to print sign-extension bits above the precision. I think it'd work if print_hex used extract_uhwi

Re: [PATCH] Fix nrv-1.c false failure on aarch64.

2017-10-19 Thread Richard Biener
On Wed, Oct 18, 2017 at 6:59 PM, Egeyar Bagcioglu wrote: > Hello, > > Test case "guality.exp=nrv-1.c" fails on aarch64. Optimizations reorder the > instructions and cause the value of a variable to be checked before its > first assignment. The following patch is

[C++ PATCH] Avoid bogus -Wreturn-local-addr warnings in templates (PR c++/82600)

2017-10-19 Thread Jakub Jelinek
Hi! A recent change to check_return_expr resulted in maybe_warn_about_returning_address_of_local being called also with processing_template_decl. The problem with that is that the function relies on folding (fold_for_warn) which isn't performed at all when processing_template_decl. So, we have

Re: [libstdc++, patch] Fix build on APFS file system

2017-10-19 Thread Richard Biener
On Wed, Oct 18, 2017 at 11:58 PM, FX wrote: >> Could you test using .PHONY: install-headers instead? >> That target *is* phony, so telling make that seems sensible. > > I’ve tried adding it to the existing .PHONY list: > > Index: libstdc++-v3/include/Makefile.in >

Re: [PATCH, i386] Improve double-word comparisons (PR target/82580)

2017-10-19 Thread Uros Bizjak
On Thu, Oct 19, 2017 at 10:09 AM, Jakub Jelinek wrote: > Hi! > > With the patch you've checked in yesterday we generate e.g. for f2 > cmpq%rdi, %rdx > sbbq%rsi, %rcx > setb%al > movzbl %al, %eax > This is because the peephole2s we

Re: Add an alternative vector loop iv mechanism

2017-10-19 Thread Richard Sandiford
Richard Biener writes: > On Thu, Oct 19, 2017 at 12:28 AM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Fri, Oct 13, 2017 at 4:10 PM, Richard Sandiford >>> wrote:

Re: [PATCH GCC][4/7]Choose exit edge/path when removing inner loop's exit statement

2017-10-19 Thread Bin.Cheng
On Thu, Oct 19, 2017 at 9:31 AM, Tom de Vries wrote: > On 10/09/2017 03:34 PM, Richard Biener wrote: >> >> On Thu, Oct 5, 2017 at 3:16 PM, Bin Cheng wrote: >>> >>> Hi, >>> Function generate_loops_for_partition chooses arbitrary path when >>> removing

Re: [PATCH] enhance -Warray-bounds to handle strings and excessive indices

2017-10-19 Thread Richard Biener
On Thu, Oct 19, 2017 at 1:19 AM, Martin Sebor wrote: > On 10/18/2017 04:48 AM, Richard Biener wrote: >> >> On Wed, Oct 18, 2017 at 5:34 AM, Martin Sebor wrote: >>> >>> While testing my latest -Wrestrict changes I noticed a number of >>> opportunities to

Re: [libstdc++, patch] Fix build on APFS file system

2017-10-19 Thread FX
> So the issue is PCH generation (why's that re-generated at install time?). As suggested by Marc in the PR, I've removed the @ from include/Makefile.in, and removed the leading - for lines with LN_S. The result of "make -d --trace -j8 all-target-libstdc++-v3", in a build where

[PATCH] Document --coverage and fork-like functions (PR gcov-profile/82457).

2017-10-19 Thread Martin Liška
Hi. As discussed in the PR, we should be more precise in our documentation. The patch does that. Ready for trunk? Martin gcc/ChangeLog: 2017-10-19 Martin Liska PR gcov-profile/82457 * doc/invoke.texi: Document that one needs a non-strict ISO mode for

Re: [RFC PATCH] Merge libsanitizer from upstream

2017-10-19 Thread Jakub Jelinek
On Mon, Oct 16, 2017 at 08:52:50PM +0200, Jakub Jelinek wrote: > The following patch is an attempt at libsanitizer merge from upstream. > Sadly libubsan has several ABI incompatible changes, dunno if we should > fight the mess and re-add backward compatibility back, or as the patch > does just

Re: [PATCH GCC]Try harder to find base object by expanding base address

2017-10-19 Thread Richard Biener
On Fri, Oct 13, 2017 at 5:04 PM, Bin Cheng wrote: > Hi, > I ran into this when investigating PR82369 which we failed to find base > object. > This simple patch tries harder to find base object by expanding base address > in alloc_iv. In general, we don't want to do aggressive

Re: [PATCH] Fix nrv-1.c false failure on aarch64.

2017-10-19 Thread Richard Earnshaw (lists)
On 19/10/17 09:14, Richard Biener wrote: > On Wed, Oct 18, 2017 at 6:59 PM, Egeyar Bagcioglu > wrote: >> Hello, >> >> Test case "guality.exp=nrv-1.c" fails on aarch64. Optimizations reorder the >> instructions and cause the value of a variable to be checked before its

Re: [libstdc++, patch] Fix build on APFS file system

2017-10-19 Thread Petr Ovtchenkov
On Thu, 19 Oct 2017 10:37:14 +0200 Richard Biener wrote: > On Wed, Oct 18, 2017 at 11:58 PM, FX wrote: > >> Could you test using .PHONY: install-headers instead? > >> That target *is* phony, so telling make that seems sensible. > > > > I’ve tried

Re: [patch] Enhance support for -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than

2017-10-19 Thread Eric Botcazou
> Looks ok. I wonder if you want to explicitely document that max_size < size > doesn't have any effect on actual code generation and is not checked for. Documentation amended to that effect: -- Built-in Function: void *__builtin_alloca_with_align_and_max (size_t size, size_t

Re: [RFC PATCH] Merge libsanitizer from upstream

2017-10-19 Thread Jakub Jelinek
On Thu, Oct 19, 2017 at 02:07:24PM +0300, Maxim Ostapenko wrote: > > Is the patch (the merge + this incremental) ok for trunk? > > I think the patch is OK, just wondering about two things: Richi just approved the patch on IRC, so I'll commit, then we can deal with follow-ups. > 1) We have a

Re: [RFC PATCH] Merge libsanitizer from upstream

2017-10-19 Thread Kamil Rytarowski
On 19.10.2017 13:17, Jakub Jelinek wrote: > On Thu, Oct 19, 2017 at 02:07:24PM +0300, Maxim Ostapenko wrote: >>> Is the patch (the merge + this incremental) ok for trunk? >> >> I think the patch is OK, just wondering about two things: > > Richi just approved the patch on IRC, so I'll commit, then

Re: [PATCH] Fix UBSAN errors in dse.c (PR rtl-optimization/82044).

2017-10-19 Thread Martin Liška
On 09/20/2017 10:15 AM, Jakub Jelinek wrote: > On Wed, Sep 20, 2017 at 09:50:32AM +0200, Martin Liška wrote: >> Hello. >> >> Following patch handles UBSAN (overflow) in dce.c. > > dse.c ;) > >> --- a/gcc/dse.c >> +++ b/gcc/dse.c >> @@ -929,7 +929,9 @@ set_usage_bits (group_info *group,

Re: [PATCH] Add offset_int to guard HOST_WIDE_INT overflow (PR tree-optimization/82042).

2017-10-19 Thread Richard Biener
On Thu, Oct 19, 2017 at 1:21 PM, Martin Liška wrote: > On 09/20/2017 05:47 PM, Richard Biener wrote: >> On Wed, Sep 20, 2017 at 9:50 AM, Martin Liška wrote: >>> Hi. >>> >>> This is partial fix for the PR, where I calculate 2 offsets in offset_int >>> type. >>>

Re: [PATCH] Revert r238089 (PR driver/81829).

2017-10-19 Thread Martin Liška
PING^1 On 09/15/2017 02:07 PM, Martin Liška wrote: > Hi. > > In order to make the code simple and transparent, I suggest to revert r238089. > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? > Martin >

Re: [PATCH 6/9] [LVU] Allow final_start_function to skip initial insns

2017-10-19 Thread Richard Biener
On Sat, Sep 30, 2017 at 11:08 AM, Alexandre Oliva wrote: > This API change will enable final_start_function() to "consume" > initial insns, and choose the first insn to be passed to final(). > > Many ports call final_start_function() and final() when creating > thunks and

Re: [patch] Enhance support for -Wstack-usage/-Wvla-larger-than/-Walloca-larger-than

2017-10-19 Thread Richard Biener
On Thu, Oct 19, 2017 at 12:28 PM, Eric Botcazou wrote: >> Looks ok. I wonder if you want to explicitely document that max_size < size >> doesn't have any effect on actual code generation and is not checked for. > > Documentation amended to that effect: > > -- Built-in

Re: [RFC PATCH] Merge libsanitizer from upstream

2017-10-19 Thread Maxim Ostapenko
Hi, I'm sorry for a late response. On 19/10/17 13:52, Jakub Jelinek wrote: On Mon, Oct 16, 2017 at 08:52:50PM +0200, Jakub Jelinek wrote: The following patch is an attempt at libsanitizer merge from upstream. Sadly libubsan has several ABI incompatible changes, dunno if we should fight the

Re: [RFC PATCH] Merge libsanitizer from upstream

2017-10-19 Thread Eric Gallager
On 10/19/17, Jakub Jelinek wrote: > On Thu, Oct 19, 2017 at 02:07:24PM +0300, Maxim Ostapenko wrote: >> > Is the patch (the merge + this incremental) ok for trunk? >> >> I think the patch is OK, just wondering about two things: > > Richi just approved the patch on IRC, so I'll

[PATCH] Slightly optimize noreturn functions (PR target/82158)

2017-10-19 Thread Jakub Jelinek
Hi! The following patch, when optimizing, replaces GIMPLE_RETURN in noreturn functions right after warning about them with __builtin_unreachable (). The advantage of that is that we don't emit unnecessary epilogues for them and perhaps optimize away some other useless computations if the only

[PATCH] PR target/82624 msp430-elf target must allow for NULL pointer dereferences

2017-10-19 Thread Orlando Arias
Greetings, As requested by Andrew Pinski, I should send the patch to this mailing list. The patch was also included in the bug report alongside an explanation as to why it is necessary [1]. In brief, the memory map of the MSP430 reserves the area from address 0x to address 0x000f for special

Re: [patch] avoid printing leading 0 in widest_int hex dumps

2017-10-19 Thread Richard Sandiford
Richard Sandiford writes: > Aldy Hernandez writes: >> On Tue, Oct 17, 2017 at 6:05 PM, Richard Sandiford >> wrote: >>> Andrew MacLeod writes: On 10/17/2017 08:18 AM, Richard Sandiford wrote:

Re: [PATCH] Document --coverage and fork-like functions (PR gcov-profile/82457).

2017-10-19 Thread Eric Gallager
On 10/19/17, Martin Liška wrote: > Hi. > > As discussed in the PR, we should be more precise in our documentation. > The patch does that. > > Ready for trunk? > Martin > > gcc/ChangeLog: > > 2017-10-19 Martin Liska > > PR gcov-profile/82457 > *

Re: [patch, c++] Add a warning flag for the enum bit-field declaration warning in bug #61414.

2017-10-19 Thread Eric Gallager
On 10/16/17, Martin Sebor wrote: > On 10/16/2017 06:37 AM, Sam van Kampen via gcc-patches wrote: >> ..I just realised that the clang flag is -Wbitfield-enum-conversion, not >> -Wenum-bitfield-conversion. Please apply the patch below instead, which >> has replaced the two words

Re: [RFC] New pragma exec_charset

2017-10-19 Thread Joseph Myers
On Thu, 19 Oct 2017, Andreas Krebbel wrote: > gcc/testsuite/gcc.dg/pragma-exec_charset-1.c | 26 +++ I'd expect a c-c++-common test rather than a C-specific one, given there are significant differences in how the C and C++ front ends handle lexing. > +#pragma GCC

[PATCH] Fix bootstrap with libsanitizer (PR sanitizer/82595)

2017-10-19 Thread Jakub Jelinek
Hi! The PR claims a bootstrap failure because we link lsan_preinit.cc that contains .preinit_array section item into the liblsan shared library. Of course, this object isn't meant to be linked into the library, but rather handled like libasan_preinit.o - linked directly into executables. The

Re: [RFC] Make 4-stage PGO bootstrap really working

2017-10-19 Thread Martin Liška
PING^2 On 09/14/2017 02:20 PM, Martin Liška wrote: > PING^1 > > On 08/30/2017 11:45 AM, Martin Liška wrote: >> Hi. >> >> This is follow up which I've just noticed. Main problem we have is that >> an instrumented compiler w/ -fprofile-generate (built in $OBJDIR/gcc >> subfolder) >> will generate

[PATCH GCC][2/3]Simplify ((A +- CST1 CMP A +- CST2)) for undefined overflow type

2017-10-19 Thread Bin Cheng
Hi, This patch adds pattern simplifying (A +- CST1 CMP A +- CST2) for undefined overflow types. Bootstrap and test for patch set on x86_64 and AArch64. Comments? Thanks, bin 2017-10-16 Bin Cheng * match.pd (A +- CST1 CMP A +- CST2): New pattern.From

[PATCH GCC][3/3]Refine CFG and bound information for split loops

2017-10-19 Thread Bin Cheng
Hi, This is a rework of patch at https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01037.html. The new patch doesn't try to handle all cases, instead, it only handles obvious cases. It also tries to add tests illustrating different cases handled. Bootstrap and test for patch set on x86_64 and

Re: [PATCH] PR libgcc/59714 complex division is surprising on aarch64

2017-10-19 Thread Richard Earnshaw (lists)
On 19/10/17 14:07, Wilco Dijkstra wrote: > Vladimir wrote: > > +# Disable floating-point expression contraction > +LIBGCC2_FFP_CONTRAST_CFLAGS = -ffp-contract=off > + > > It looks like this disables fp-contract in all of libgcc... > What is the the number of FMAs in libgcc before/after? > > If

[PATCH] Fix path::iterator post-increment and post-decrement

2017-10-19 Thread Jonathan Wakely
I made a dumb mistake in the post-inc and post-dec operators for the path::iterator type, forgetting that _M_cur is sometimes null (for a single-element path). * include/experimental/bits/fs_path.h (path::iterator++(int)) (path::iterator--(int)): Fix for paths with only one

Re: [C++ PATCH] Avoid bogus -Wreturn-local-addr warnings in templates (PR c++/82600)

2017-10-19 Thread Nathan Sidwell
On 10/19/2017 04:15 AM, Jakub Jelinek wrote: Hi! A recent change to check_return_expr resulted in maybe_warn_about_returning_address_of_local being called also with processing_template_decl. The problem with that is that the function relies on folding (fold_for_warn) which isn't performed at

Re: [PATCH] Fix nrv-1.c false failure on aarch64.

2017-10-19 Thread Richard Biener
On Thu, Oct 19, 2017 at 2:47 PM, Richard Earnshaw (lists) wrote: > On 19/10/17 09:14, Richard Biener wrote: >> On Wed, Oct 18, 2017 at 6:59 PM, Egeyar Bagcioglu >> wrote: >>> Hello, >>> >>> Test case "guality.exp=nrv-1.c" fails on aarch64.

[ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing with -mno-unaligned-access

2017-10-19 Thread Richard Earnshaw (lists)
Peephole patterns exist in the arm backend to spot load/store operations to adjacent memory operations in order to convert them into ldrd/strd instructions. However, when we have strict alignment enforced, then we can only do this if the accesses are known to be 64-bit aligned; this is unlikely

Re: PR82575, lto debugobj references __gnu_lto_slim, ld test liblto-17 fails

2017-10-19 Thread Richard Biener
On Fri, 20 Oct 2017, Alan Modra wrote: > Bootstrapped and regression tested powerpc64le-linux. OK for trunk? Ok. Thanks, Richard. > PR lto/82575 > * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): > Make discarded non-local symbols weak and hidden. > > diff

[PATCH] Use __LONG_LONG_MAX__ instead of LONG_LONG_MAX in test

2017-10-19 Thread Jonathan Wakely
The compiler always defines __LONG_LONG_MAX__, so use that. * testsuite/decimal/conversion-to-integral.cc: Use predefined macro instead of non-standard glibc one. Tested powerpc64le-linux, committed to trunk. commit 64dcf27be075febc17f9823e3d8155476f99fffa Author: Jonathan

[PATCH GCC][1/3]Simplify (A + CST cmp A -> CST cmp zero) for undefined overflow type

2017-10-19 Thread Bin Cheng
Hi, This is a rework of patch set at https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01036.html and https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01037.html. The patch set improves niters bound analysis for split loop. Instead of feeding bound computation to generic folder, this patch

PR82575, lto debugobj references __gnu_lto_slim, ld test liblto-17 fails

2017-10-19 Thread Alan Modra
Bootstrapped and regression tested powerpc64le-linux. OK for trunk? PR lto/82575 * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Make discarded non-local symbols weak and hidden. diff --git a/libiberty/simple-object-elf.c

[PATCH] Update references to C++17 in libstdc++ manual

2017-10-19 Thread Jonathan Wakely
* doc/xml/manual/status_cxx2017.xml: Update references to C++17 section numbers. Committed to trunk. commit 834582b0c91337b031fa610e08c81ff1f2087f53 Author: Jonathan Wakely Date: Thu Oct 19 14:38:40 2017 +0100 Update references to C++17 in libstdc++

Re: [patch] Add -static-libquadmath option

2017-10-19 Thread Janus Weil
Ping! Is there any hope to get this 3-year-old patch to trunk after all? (It seems there was at least a review of the Fortran parts, which has not seen a reply ...) Cheers, Janus 2014-10-15 8:49 GMT+02:00 FX : > ping > > Patch needs: > - C/driver options maintainer, or

Re: [PATCH] PR libgcc/59714 complex division is surprising on aarch64

2017-10-19 Thread Wilco Dijkstra
Vladimir wrote: +# Disable floating-point expression contraction +LIBGCC2_FFP_CONTRAST_CFLAGS = -ffp-contract=off + It looks like this disables fp-contract in all of libgcc... What is the the number of FMAs in libgcc before/after? If it disables anything other than the ones in complex division,

[PATCH] Improve tests for error reporting in Filesystem TS

2017-10-19 Thread Jonathan Wakely
Improve some experimental::filesystem tests to ensure that error_code arguments are cleared, and the VERIFY( !ec ) tests don't pass just because that was already true and the function didn't touch it. * testsuite/experimental/filesystem/iterators/ recursive_directory_iterator.cc:

Re: [PATCH] enhance -Warray-bounds to handle strings and excessive indices

2017-10-19 Thread Martin Sebor
On 10/19/2017 02:34 AM, Richard Biener wrote: On Thu, Oct 19, 2017 at 1:19 AM, Martin Sebor wrote: On 10/18/2017 04:48 AM, Richard Biener wrote: On Wed, Oct 18, 2017 at 5:34 AM, Martin Sebor wrote: While testing my latest -Wrestrict changes I noticed a

Re: [PATCH, version 2], Add support for _Float and _FloatX sqrt, fma, fmin, fmax built-in functions

2017-10-19 Thread Michael Meissner
On Thu, Oct 19, 2017 at 10:15:44PM +, Joseph Myers wrote: > On Thu, 19 Oct 2017, Michael Meissner wrote: > > > 1) I switched to use DEF_EXT_LIB_BUILTIN to declare the _Float > > and > > _FloatX functions. This allows treating __builtin_sqrtf128 the same > > as sqrtf128. >

Re: [PATCH, version 2], Add support for _Float and _FloatX sqrt, fma, fmin, fmax built-in functions

2017-10-19 Thread Joseph Myers
On Thu, 19 Oct 2017, Michael Meissner wrote: > 1)I switched to use DEF_EXT_LIB_BUILTIN to declare the _Float > and > _FloatX functions. This allows treating __builtin_sqrtf128 the same > as sqrtf128. It's not correct to do that unconditionally for all the existing

[PATCH, rs6000] Add Power 9 support for vec_first builtins

2017-10-19 Thread Carl Love
GCC maintainers: The following patch adds support for the vec_first_match_index, vec_first_match_or_eos_index, vec_first_mismatch_index, and vec_first_mismatch_or_eos_index builtins for ISA 3.0. The patch has been tested on: powerpc64le-unknown-linux-gnu (Power 8 LE)

[PATCH, version 2], Add support for _Float and _FloatX sqrt, fma, fmin, fmax built-in functions

2017-10-19 Thread Michael Meissner
On Wed, Sep 13, 2017 at 10:49:43PM +, Joseph Myers wrote: > On Wed, 13 Sep 2017, Michael Meissner wrote: > > > This patch adds support on PowerPC ISA 3.0 for the built-in function > > __builtin_sqrtf128 generating the XSSQRTQP hardware square root instruction > > and > > the built-in

Re: [patch, c++] Add a warning flag for the enum bit-field declaration warning in bug #61414.

2017-10-19 Thread Martin Sebor
On 10/19/2017 12:38 PM, Eric Gallager wrote: On 10/16/17, Martin Sebor wrote: On 10/16/2017 06:37 AM, Sam van Kampen via gcc-patches wrote: ..I just realised that the clang flag is -Wbitfield-enum-conversion, not -Wenum-bitfield-conversion. Please apply the patch below

Re: [PATCH] Improve AVX512 vector shift patterns (PR target/82370)

2017-10-19 Thread Kirill Yukhin
Hello Jakub, On 04 Oct 21:29, Jakub Jelinek wrote: > Hi! > > EVEX encoded vector shifts by immediate allow memory operand as input. > We handle this right for the sra patterns by having 3 distinct > define_insns, one TARGET_AVX512VL with masking, where the non-masked > insn names start with *,

Correct cost of SSE and x87 instructions for generic and core

2017-10-19 Thread Jan Hubicka
Hi, core and generic costs of x87 and SSE instructions seems to follow pentium4 settings which is not very realistic. This patch sets them according to latencies. I have tested this on haswell as part of the vectorizer cost metric patch (where we want to have sane values to get sane decisions)

Re: [PATCH GCC][1/3]Simplify (A + CST cmp A -> CST cmp zero) for undefined overflow type

2017-10-19 Thread Marc Glisse
On Thu, 19 Oct 2017, Bin Cheng wrote: * match.pd (A + CST cmp A -> CST cmp zero): New simplification for undefined overflow types in (A + CST CMP A -> A CMP' CST'). Could you check if you still need that? I recently added something very similar (search for "X + Y < Y" in

Drop edge counts from CFG

2017-10-19 Thread Jan Hubicka
Hi, this is penultimate patch to convert CFG to new profile_count/probability infrastructure. The patch simply drops counts from edges as they can be determined by applying edge's probability to source BB count. In most case updating needed is converting e->count use to e->count() but there are

Re: [RFC] Make 4-stage PGO bootstrap really working

2017-10-19 Thread Markus Trippelsdorf
On 2017.10.19 at 14:56 +0200, Martin Liška wrote: > PING^2 > So far so good with a small exception: conftest.gcda files that > trigger -Wcoverage-mismatch. Can we remove these before a stage? Do we > do a similar thing somewhere? I think you should simply remove all these conftest.gcda files

Re: [RFC PATCH] Fix pointer diff (was: -fsanitize=pointer-overflow support (PR sanitizer/80998))

2017-10-19 Thread Richard Biener
On Mon, Oct 9, 2017 at 12:55 PM, Marc Glisse wrote: > On Mon, 3 Jul 2017, Richard Biener wrote: > >> On Sat, 1 Jul 2017, Marc Glisse wrote: >> >>> I wrote a quick prototype to see what the fallout would look like. >>> Surprisingly, it actually passes bootstrap+testsuite on

Re: [PATCH GCC][2/3]Simplify ((A +- CST1 CMP A +- CST2)) for undefined overflow type

2017-10-19 Thread Marc Glisse
On Thu, 19 Oct 2017, Bin Cheng wrote: * match.pd (A +- CST1 CMP A +- CST2): New pattern. Similarly, this has a very large overlap with "X + Z < Y + Z" transforms already in match.pd. It may handle X - CST CMP X + CST that the other doesn't (?), but we tend to canonicalize X-5 to

[patch 0/5] nios2 address mode improvements

2017-10-19 Thread Sandra Loosemore
This is the set of nios2 optimization patches that I've previously mentioned in these threads: https://gcc.gnu.org/ml/gcc/2017-10/msg00016.html https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00957.html To give an overview of what this is for The nios2 backend currently generates quite bad

[patch 1/5] switch nios2 backend to LRA

2017-10-19 Thread Sandra Loosemore
This patch switches the nios2 backend to use LRA. It's conceptually independent of the other changes in this patch set and in fact I had wanted to push this change earlier in the summer. But, enabling LRA by itself causes a handful of test regressions due to a missing movsi splitter -- which is

[patch 2/5] add hook to track when splitting is complete

2017-10-19 Thread Sandra Loosemore
This patch adds a function to indicate whether the split1 pass has run yet. This is used in part 3 of the patch set to decide whether 32-bit symbolic constant expressions are permitted, e.g. in TARGET_LEGITIMATE_ADDRESS_P and the movsi expander. Since there's currently no usable hook for

[patch 3/5] defer splitting of symbolic addresses

2017-10-19 Thread Sandra Loosemore
This patch defers splitting of symbolic addresses into HIGH/LO_SUM pairs to the split1 pass. Currently this is handled in the movsi expander, which runs too early to allow optimizations such as cse before splitting. Deferring the splitting requires that these addresses be recognized as

[patch 4/5] nios2 cost model improvements

2017-10-19 Thread Sandra Loosemore
This patch adds a TARGET_ADDRESS_COST hook to the nios2 backend. I also made a number of improvements to the TARGET_RTX_COSTS hook. I suspect the original implementation was copied from some other backend in the mists of ancient time, and never really adjusted to match the nios2 architecture.

[patch 5/5] test cases

2017-10-19 Thread Sandra Loosemore
This patch adds new test cases to check that the new addressing optimizations are happening as expected. There's also a tweak to an existing test where the optimization patches changed the code generated to something that was equally correct but not what the test case was trying to test.

Re: [PATCH, RFC] Add a pass counter for "are we there yet" purposes

2017-10-19 Thread Sandra Loosemore
On 10/16/2017 10:15 AM, Richard Biener wrote: On October 16, 2017 5:46:35 PM GMT+02:00, Sandra Loosemore wrote: On 10/16/2017 12:53 AM, Richard Biener wrote: On October 16, 2017 7:38:50 AM GMT+02:00, Sandra Loosemore wrote: This patch is a

Re: [PATCH] Document --coverage and fork-like functions (PR gcov-profile/82457).

2017-10-19 Thread Sandra Loosemore
On 10/19/2017 12:26 PM, Eric Gallager wrote: On 10/19/17, Martin Liška wrote: Hi. As discussed in the PR, we should be more precise in our documentation. The patch does that. Ready for trunk? Martin gcc/ChangeLog: 2017-10-19 Martin Liska PR

[PATCH][compare-elim] Fix PR rtl-optimization/82597

2017-10-19 Thread Michael Collison
This patch fixes an ICE on x86 because we were not constraining the operands of a recognized insn. Bootstrapped and tested on aarch64-none-linux-gnu and x86_64. Also successfully compiled the failing test cases in 82597 and duplicate 82592. Ok for trunk? 2017-10-18 Michael Collison

Re: [PATCH] Prefer shorter VEX encoding of VP{AND,OR,XOR,ANDN} over EVEX when possible (PR target/82370)

2017-10-19 Thread Kirill Yukhin
Hello Jakub, Uroš, On 04 Oct 13:41, Uros Bizjak wrote: > On Wed, Oct 4, 2017 at 10:33 AM, Jakub Jelinek wrote: > > Hi! > > > > Most AVX* instructions have the same insn name between VEX and EVEX > > encoded insns and whether it is EVEX or VEX encoded is determined by > > the

Re: [PATCH] PR target/82624 msp430-elf target must allow for NULL pointer dereferences

2017-10-19 Thread DJ Delorie
Thanks for your patch; I applied it with some minor changes. Please note that you don't need to submit patches to generated files (*.1 and *.info), that patches are customarily made against the development tree not a released tarball (which is probably why you thought you had to patch the

Re: Drop edge counts from CFG

2017-10-19 Thread Uros Bizjak
Hello! > * cgraphunit.c (init_lowered_empty_function): UPdate. > (cgraph_node::expand_thunk): UPdate. > * gimple-pretty-print.c (dump_probability): UPdate. ... > (gimple_mod_subtract): UPdate. > (gimple_ic): UPdate. > (gimple_stringop_fixed_value): UPdate. s/UPdate/Update/g Uros.

Re: [PATCH] PR libgcc/59714 complex division is surprising on aarch64

2017-10-19 Thread Vladimir Mezentsev
On 10/19/2017 06:37 AM, Richard Earnshaw (lists) wrote: On 19/10/17 14:07, Wilco Dijkstra wrote: Vladimir wrote: +# Disable floating-point expression contraction +LIBGCC2_FFP_CONTRAST_CFLAGS = -ffp-contract=off + It looks like this disables fp-contract in all of libgcc... What is the the

Re: [RFC] New pragma exec_charset

2017-10-19 Thread Martin Sebor
On 10/19/2017 09:50 AM, Andreas Krebbel wrote: The TPF operating system uses the GCC S/390 backend. They set an EBCDIC exec charset for compilation using -fexec-charset. However, certain libraries require ASCII strings instead. In order to be able to put calls to that library into the normal

Re: [PATCH] PR libgcc/59714 complex division is surprising on aarch64

2017-10-19 Thread Wilco Dijkstra
Vladimir Mezentsev > On 10/19/2017 06:37 AM, Richard Earnshaw (lists) wrote: >> On 19/10/17 14:07, Wilco Dijkstra wrote: >>> Vladimir wrote: >>> >>> +# Disable floating-point expression contraction >>> +LIBGCC2_FFP_CONTRAST_CFLAGS = -ffp-contract=off >>> + >>> >>>

Re: [PATCH] ira-color: fix allocno_priority_compare_func for qsort (PR 82395)

2017-10-19 Thread Alexander Monakov
Ping. On Thu, 5 Oct 2017, Alexander Monakov wrote: > In ira-color.c, qsort comparator allocno_priority_compare_func lacks anti- > commutativity and can indicate A < B < A if boths allocnos satisfy > non_spilled_static_chain_regno_p. It should fall down to following > sub-comparisons in that

[PATCH] rs6000: Fix "missing mode" on UNSPEC_TOCSLOT

2017-10-19 Thread Segher Boessenkool
Currently gen* warn about a missing mode on an UNSPEC_TOCSLOT unspec in some call patterns. Those unspecs are created from rs6000.c, with Pmode always. This patch fixes the patterns to say :P as well. Tested on powerpc64-linux {-m32,-m64}. Committing to trunk. Segher 2018-10-19 Segher

Re: [PATCH] Add offset_int to guard HOST_WIDE_INT overflow (PR tree-optimization/82042).

2017-10-19 Thread Martin Liška
On 09/20/2017 05:47 PM, Richard Biener wrote: > On Wed, Sep 20, 2017 at 9:50 AM, Martin Liška wrote: >> Hi. >> >> This is partial fix for the PR, where I calculate 2 offsets in offset_int >> type. >> >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. >>

Re: [PATCH GCC][2/3]Simplify ((A +- CST1 CMP A +- CST2)) for undefined overflow type

2017-10-19 Thread Bin.Cheng
On Thu, Oct 19, 2017 at 4:33 PM, Marc Glisse wrote: > On Thu, 19 Oct 2017, Bin Cheng wrote: > >> * match.pd (A +- CST1 CMP A +- CST2): New pattern. > > > Similarly, this has a very large overlap with "X + Z < Y + Z" transforms > already in match.pd. It may handle X -

[PATCH, i386]: A couple of cleanups in output insn mnemonic constructions

2017-10-19 Thread Uros Bizjak
No functional changes. 2017-10-19 Uros Bizjak * config/i386/i386.c (output_387_binary_op): Rewrite SSE part. (ix86_emit_mode_set): Rewrite insn mnemonic construction. (ix86_prepare_fp_compare_args): Redefine is_sse as bool. Bootstrapped and regression tested on

[PR other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards

2017-10-19 Thread Thomas Schwinge
Hi! As discussed in : | [...] target | libraries [...] conditionally use certain linker features, depending on linker | version numbers. For example, linker version scripts in libgomp; see | LIBGOMP_BUILD_VERSIONED_SHLIB, LIBGOMP_BUILD_VERSIONED_SHLIB_GNU usage in |

[RFC] New pragma exec_charset

2017-10-19 Thread Andreas Krebbel
The TPF operating system uses the GCC S/390 backend. They set an EBCDIC exec charset for compilation using -fexec-charset. However, certain libraries require ASCII strings instead. In order to be able to put calls to that library into the normal code it is required to switch the exec charset

Re: [PATCH] ira-color: fix allocno_priority_compare_func for qsort (PR 82395)

2017-10-19 Thread Vladimir Makarov
On 10/19/2017 06:37 AM, Alexander Monakov wrote: Ping. On Thu, 5 Oct 2017, Alexander Monakov wrote: Bootstrapped and regtested on x86-64, OK for trunk? OK. Alexander, sorry for the delay with the answer and thank you for finding and fixing the problem. PR rtl-optimization/82395

Re: [PATCH] enhance -Warray-bounds to handle strings and excessive indices

2017-10-19 Thread Martin Sebor
Good question! STRING_CST does have a domain. The problem is that array_at_struct_end_p() returns true for STRING_CST. I've added the handling to the function and removed the block above from the latest patch. Can you split out the STRING_CST handling and commit that separately (split the

Re: [PATCH GCC][1/3]Simplify (A + CST cmp A -> CST cmp zero) for undefined overflow type

2017-10-19 Thread Bin.Cheng
On Thu, Oct 19, 2017 at 4:22 PM, Marc Glisse wrote: > On Thu, 19 Oct 2017, Bin Cheng wrote: > >> * match.pd (A + CST cmp A -> CST cmp zero): New simplification >> for undefined overflow types in (A + CST CMP A -> A CMP' CST'). > > > Could you check if you

  1   2   >