Re: PR82687, g++.dg/asan/default-options-1.C fails with PR82575 fix

2017-10-24 Thread Richard Biener
On October 25, 2017 2:27:12 AM GMT+02:00, Alan Modra wrote: >On Tue, Oct 24, 2017 at 11:48:27AM +0200, Richard Biener wrote: >> On Tue, 24 Oct 2017, Alan Modra wrote: >> > The problem with making discarded symbols hidden is that the >> > non-default visibility is sticky. When symbols other than t

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-24 Thread Mukesh Kapoor
On 10/24/2017 7:05 AM, Jason Merrill wrote: On Fri, Oct 20, 2017 at 3:52 PM, Mukesh Kapoor wrote: On 10/20/2017 11:00 AM, Mukesh Kapoor wrote: On 10/20/2017 10:45 AM, Nathan Sidwell wrote: On 10/20/2017 12:37 PM, Mukesh Kapoor wrote: This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: [PATCH] PR debug/81570: dwarf2cfi.c: Update cfa.offset in create_pseudo_cfg

2017-10-24 Thread Jason Merrill
On Thu, Jul 27, 2017 at 3:50 PM, H.J. Lu wrote: > execute_dwarf2_frame is called for each funtion. But create_cie_data > is called only once to initialize cie_cfi_row for all functions. Since > INCOMING_FRAME_SP_OFFSET may be different for each function, we can't > use the same INCOMING_FRAME_SP

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

2017-10-24 Thread vladimir . mezentsev
On 10/19/2017 06:07 AM, 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? In ori

Re: [PATCH, alpha] Move linux-specific specfile definitions to linux.h

2017-10-24 Thread coypu
On Fri, Oct 13, 2017 at 11:13:52AM -0600, Jeff Law wrote: > So we can't depend on patches that OpenBSD applies. What's important is > what is in the official GCC sources. > > I'd like to see some discussion about what these macros should look like > for the *bsd ports. Merely removing them from

Re: [PATCH v3 1/14] D: The front-end (DMD) language implementation and license.

2017-10-24 Thread Jeff Law
On 10/18/2017 01:33 AM, Iain Buclaw wrote: > On 6 October 2017 at 14:51, Ian Lance Taylor wrote: >> On Fri, Oct 6, 2017 at 1:34 AM, Iain Buclaw wrote: >>> >>> Out of curiosity, I did have a look at some of the tops of gofrontend >>> sources this morning. They are all copyright the Go Authors, an

[PATCH] PR libstdc++/82706 fix test for case where operations succeed

2017-10-24 Thread Jonathan Wakely
This test's logic was wrong for the case where the nofollow option is supported and the operation succeeds. PR libstdc++/82706 * testsuite/27_io/filesystem/operations/permissions.cc: Fix test. Tested x86_64-linux, committed to trunk. commit 4e94cea9af0581c319aa2f5092c63d668

Re: PR82687, g++.dg/asan/default-options-1.C fails with PR82575 fix

2017-10-24 Thread Alan Modra
On Tue, Oct 24, 2017 at 11:48:27AM +0200, Richard Biener wrote: > On Tue, 24 Oct 2017, Alan Modra wrote: > > The problem with making discarded symbols hidden is that the > > non-default visibility is sticky. When symbols other than the > > __gnu_lto ones are discarded that turns out to be a bad id

Re: [PATCH v3 1/14] D: The front-end (DMD) language implementation and license.

2017-10-24 Thread Jeff Law
On 10/03/2017 03:36 PM, Joseph Myers wrote: > On Tue, 3 Oct 2017, Jeff Law wrote: > >> /* Copyright (c) 2010-2014 by Digital Mars >> * All Rights Reserved, written by Walter Bright >> * http://www.digitalmars.com >> * Distributed under the Boost Software License, Version 1.0. >> * (See accompa

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

2017-10-24 Thread Michael Meissner
On Tue, Oct 24, 2017 at 11:08:15PM +, Joseph Myers wrote: > On Tue, 24 Oct 2017, Michael Meissner wrote: > > > This patch adds a new switch (-fimplicit-math-floatn) that when enabled, it > > will add implicit declarations for copysign, fabs, fma, fmax, fmin, nan, and > > sqrt _Float and _Float

Re: [patch 0/5] nios2 address mode improvements

2017-10-24 Thread Jeff Law
On 10/20/2017 02:56 AM, Jakub Jelinek wrote: > On Thu, Oct 19, 2017 at 08:03:45PM -0600, Sandra Loosemore wrote: >> A harder problem is that doing the high/lo_sum splitting in expand >> inhibits subsequent optimizations. One such problem arises when you >> have accesses to multiple fields in a sta

Re: [patch 0/5] nios2 address mode improvements

2017-10-24 Thread Jeff Law
On 10/19/2017 08:03 PM, Sandra Loosemore wrote: > 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 i

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

2017-10-24 Thread Jeff Law
On 10/24/2017 10:24 AM, Richard Sandiford wrote: > Andrew MacLeod writes: >> On 10/19/2017 04:22 PM, Richard Sandiford wrote: >>> Richard Sandiford writes: Aldy Hernandez writes: > On Tue, Oct 17, 2017 at 6:05 PM, Richard Sandiford > wrote: >> Andrew MacLeod writes: >>> On

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

2017-10-24 Thread Joseph Myers
On Tue, 24 Oct 2017, Michael Meissner wrote: > This patch adds a new switch (-fimplicit-math-floatn) that when enabled, it > will add implicit declarations for copysign, fabs, fma, fmax, fmin, nan, and > sqrt _Float and _FloatX variants. Like the previous patch, it adds fma, > fmax, fmin, and sqr

Re: [PATCH][i386,AVX] Enable VBMI2 support [1/7]

2017-10-24 Thread Joseph Myers
On Tue, 24 Oct 2017, Koval, Julia wrote: > config/i386/i386.opt (mavx512vbmi2): New option. Any patch adding a new command-line option needs to add documentation of it to invoke.texi. -- Joseph S. Myers jos...@codesourcery.com

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

2017-10-24 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. > >

Merge from trunk to gccgo branch

2017-10-24 Thread Ian Lance Taylor
I merged trunk revision 254059 to the gccgo branch. Ian

RE: [PING][PATCH][Aarch64] Improve int<->FP conversions

2017-10-24 Thread Michael Collison
James, The patch was test as required. However when I tested with the latest trunk there were two test failures that need to be updated because of my patch. The files gcc.target/aarch64/vect-vcvt.c was failing because the scan-assembler directives assumed the destination register was assumed t

Re: [RFA][PATCH] Provide a class interface into substitute_and_fold.

2017-10-24 Thread Jeff Law
On 10/24/2017 02:57 PM, David Malcolm wrote: > On Tue, 2017-10-24 at 12:44 -0600, Jeff Law wrote: >> This is similar to the introduction of the ssa_propagate_engine, but >> for >> the substitution/replacements bits. >> >> In a couple places the pass specific virtual functions are just >> wrappers >

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

2017-10-24 Thread Egeyar Bagcioglu
On 10/20/2017 03:13 PM, Richard Earnshaw (lists) wrote: On 19/10/17 09:14, Richard Biener wrote: I guess Alex work on stmt frontiers will fix this instance? Thank you all for the reviews. I fetched Alex's branches in gcc (aoliva/SFN) and in binutils (users/aoliva/SFN). Using gcc and binutils

Re: [RFA][PATCH] Provide a class interface into substitute_and_fold.

2017-10-24 Thread David Malcolm
On Tue, 2017-10-24 at 12:44 -0600, Jeff Law wrote: > This is similar to the introduction of the ssa_propagate_engine, but > for > the substitution/replacements bits. > > In a couple places the pass specific virtual functions are just > wrappers > around existing functions. A good example of this

Re: [RFA][PATCH] Provide a class interface to ssa_propagate

2017-10-24 Thread David Malcolm
On Tue, 2017-10-24 at 11:40 -0600, Jeff Law wrote: > tree-ssa-propagate.c provides a fairly generic engine to propagate > values through a lattice while in SSA form. The engine uses two > callbacks to allow passes to provide pass specific handling of > statements and phi nodes. > > The callback m

Re: [demangler PATCH]: eliding template return types

2017-10-24 Thread Jason Merrill
On Thu, Sep 21, 2017 at 12:13 PM, Nathan Sidwell wrote: > Guys in cc: you've looked at demangling sometime in the past, so may have an > opinion. > > As alluded to in https://gcc.gnu.org/ml/gcc-patches/2017-09/msg01482.html we > display the return type of template functions containing local object

Re: [PATCH] Improve -Ofast vectorization of std::sin etc. (PR libstdc++/81706)

2017-10-24 Thread Jason Merrill
On Tue, Oct 24, 2017 at 3:36 PM, Jakub Jelinek wrote: > On Tue, Oct 24, 2017 at 01:55:58PM -0400, Jason Merrill wrote: >> On Tue, Oct 24, 2017 at 11:33 AM, Jakub Jelinek wrote: >> > On Tue, Oct 24, 2017 at 11:06:51AM -0400, Jason Merrill wrote: >> >> On 09/29/2017 08:32 AM, Jakub Jelinek wrote: >

Re: [PATCH] Make __FUNCTION__ a mergeable string and do not generate symbol entry.

2017-10-24 Thread Jason Merrill
On Thu, Sep 14, 2017 at 5:22 AM, Martin Liška wrote: > On 08/10/2017 09:43 PM, Jason Merrill wrote: >> On 07/14/2017 01:35 AM, Martin Liška wrote: >>> On 05/01/2017 09:13 PM, Jason Merrill wrote: On Wed, Apr 26, 2017 at 6:58 AM, Martin Liška wrote: > On 04/25/2017 01:58 PM, Jakub Jelinek

Re: [PATCH] Improve -Ofast vectorization of std::sin etc. (PR libstdc++/81706)

2017-10-24 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 01:55:58PM -0400, Jason Merrill wrote: > On Tue, Oct 24, 2017 at 11:33 AM, Jakub Jelinek wrote: > > On Tue, Oct 24, 2017 at 11:06:51AM -0400, Jason Merrill wrote: > >> On 09/29/2017 08:32 AM, Jakub Jelinek wrote: > >> > + tree b = builtin_decl_explicit (DECL_FUNCTION_CO

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 08:39:13PM +0300, Alexander Monakov wrote: > On Tue, 24 Oct 2017, Jakub Jelinek wrote: > > loop transfering the addresses or firstprivate_int values to the device > > - where we issued mapnum host2dev transfers each just pointer-sized > > when we could have just prepared all

Re: [C++ Patch] PR 65579 ("gcc requires definition of a static constexpr member...")

2017-10-24 Thread Paolo Carlini
Hi Jason, On 24/10/2017 20:58, Jason Merrill wrote: On Tue, Sep 26, 2017 at 4:28 AM, Paolo Carlini wrote: Hi, this is a relatively old bug already analyzed by Martin last year. He also proposed a patch: https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00593.html After a short exchange Jas

Re: [PATCH] Improve V?TImode shifts (PR target/82370)

2017-10-24 Thread Kirill Yukhin
On 24 Oct 19:14, Uros Bizjak wrote: > On Tue, Oct 24, 2017 at 4:46 PM, Jakub Jelinek wrote: > > On Tue, Oct 24, 2017 at 05:44:44AM -0700, H.J. Lu wrote: > >> > What I can see from config/atom.md: > >> > ;; if palignr or psrldq > >> > (define_insn_reservation "atom_sseishft_2" 1 > >> > (and (eq_

Re: [C++ Patch] PR 65579 ("gcc requires definition of a static constexpr member...")

2017-10-24 Thread Jason Merrill
On Tue, Sep 26, 2017 at 4:28 AM, Paolo Carlini wrote: > Hi, > > this is a relatively old bug already analyzed by Martin last year. He also > proposed a patch: > > https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00593.html > > After a short exchange Jason proposed a different approach based on si

Re: Patch ping

2017-10-24 Thread Kirill Yukhin
Hello Jakub, On 24 Oct 13:01, Jakub Jelinek wrote: > http://gcc.gnu.org/ml/gcc-patches/2017-10/msg00525.html > PR target/82460 - improve AVX512* vperm[ti]2* > Kyrill, can you please review this one? Your patch is OK for trunk. -- Thanks, K > > Thanks > > Jakub

[RFA][PATCH] Provide a class interface into substitute_and_fold.

2017-10-24 Thread Jeff Law
This is similar to the introduction of the ssa_propagate_engine, but for the substitution/replacements bits. In a couple places the pass specific virtual functions are just wrappers around existing functions. A good example of this is ccp_folder::get_value. Many other routines in tree-ssa-ccp.c

Re: [AArch64, testsuite] gcc.target/aarch64/extend.c: xfails for ilp32

2017-10-24 Thread Andrew Pinski
On Tue, Oct 24, 2017 at 11:27 AM, Charles Baylis wrote: > In ILP32, GCC fails to merge pointer arithmetic into the addressing > mode of a load instruction, as > add w0, w0, w1, lsl 2 > ldr w0, [x0] > is not equivalent to: > ldr w0, [x0, w1, lsl 2] > > Shows the

Re: [PATCH][aarch64] Fix target/pr77729 - missed optimization related to zero extension

2017-10-24 Thread Steve Ellcey
Ping.  There was discussion of larger fixes for this including a type promotion pass but this patch seems small, safe, and in line with other platforms (like arm32). Steve Ellcey sell...@cavium.com On Thu, 2017-09-14 at 11:43 -0700, Steve Ellcey wrote: > On Thu, 2017-09-14 at 11:53 -0600, Jeff La

[AArch64, testsuite] gcc.target/aarch64/symbol-range.c: skip for ilp32

2017-10-24 Thread Charles Baylis
This test relies on an object size >4GB, so cannot be compiled for ILP32. Shows the expected FAIL->UNSUPPORTED on aarch64-linux-gnu_ilp32, no regressions for aarch64-linux-gnu. Charles Baylis * gcc.target/aarch64/symbol-range.c: Add dg-skip-if for ilp32 targets. From 7ac10484589cdee7

[AArch64, testsuite] gfortran.dg/ieee/ieee_8.f90: xfail for aarch64+ilp32

2017-10-24 Thread Charles Baylis
The test is already marked xfail for aarch64*-*-gnu, but this needs to be changed to aarch64*-*-gnu* in order to match aarch64-linux-gnu_ilp32. Test was previously xfail'd in [1]. Shows the expected FAIL->XFAILs on aarch64-linux-gnu_ilp32. gcc/testsuite: Charles Baylis * gfortran.dg

[AArch64, testsuite] gcc.target/aarch64/extend.c: xfails for ilp32

2017-10-24 Thread Charles Baylis
In ILP32, GCC fails to merge pointer arithmetic into the addressing mode of a load instruction, as add w0, w0, w1, lsl 2 ldr w0, [x0] is not equivalent to: ldr w0, [x0, w1, lsl 2] Shows the expected FAIL->XFAILs on aarch64-linux-gnu_ilp32, no regressions on aar

[AArch64, testsuite] gcc.target/aarch64/fmul_fcvt_1.c: ilp32 fixes

2017-10-24 Thread Charles Baylis
This test includes the implicit assumption that the 'long' type on AArch64 is a 64 bit type. This is not the case for ILP32, so use 'long long' instead. Shows the expected new PASSes on aarch64-linux-gnu_ilp32, no regressions on aarch64-linux-gnu, gcc/testsuite: Charles Baylis * gcc.

RFC: why do our std::ofsteam functions add ios_base::trunc ?

2017-10-24 Thread Jonathan Wakely
While adding the new C++17 overloads taking filesystem paths to I noticed that ofstream uses out|trunc for the default arguments instead of out as the stadnard says. The effect is the same, but my preference would be to do what the standard says. Is there a good reason for deviating from what the

Re: [PATCH, rs6000] 1/2 Add x86 SSE2 intrinsics to GCC PPC64LE target

2017-10-24 Thread Steven Munroe
On Mon, 2017-10-23 at 16:21 -0500, Segher Boessenkool wrote: > Hi! > > On Tue, Oct 17, 2017 at 01:24:45PM -0500, Steven Munroe wrote: > > Some inline assembler is required. There a several cases where we need > > to generate Data Cache Block instruction. There are no existing builtin > > for flus

Re: [PATCH][aarch64] Fix pr81356 - copy empty string with wrz, not a ldrb/strb

2017-10-24 Thread Steve Ellcey
Re-ping. Steve Ellcey sell...@cavium.com On Mon, 2017-09-25 at 10:36 -0700, Steve Ellcey wrote: > Ping. > > Steve Ellcey > sell...@cavium.com > > > On Fri, 2017-09-15 at 11:22 -0700, Steve Ellcey wrote: > > > > PR 81356 points out that doing a __builtin_strcpy of an empty string on > > aarch6

Re: [Patch][aarch64] Use IFUNCs to enable LSE instructions in libatomic on aarch64

2017-10-24 Thread Steve Ellcey
Ping. Steve Ellcey sell...@cavium.com On Tue, 2017-10-03 at 11:57 -0700, Steve Ellcey wrote: > On Mon, 2017-10-02 at 15:38 +0100, Szabolcs Nagy wrote: > > > >   > > looks good to me, but i cannot approve. > > > > (this will make libatomic depend on ifuncs on aarch64*-linux-gnu.) > If you build

Re: [PATCH 4/9] [SFN] introduce statement frontier notes, still disabled

2017-10-24 Thread Jason Merrill
On Sat, Sep 30, 2017 at 5:08 AM, Alexandre Oliva wrote: > diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c > index a89ee49..f9209ac 100644 > --- a/gcc/cp/constexpr.c > +++ b/gcc/cp/constexpr.c > @@ -306,6 +306,9 @@ build_data_member_initialization (tree t, > vec **vec) >tree_stmt_iter

Re: [PATCH][aarch64] Put vector fnma instruction into canonical form for better code generation.

2017-10-24 Thread Steve Ellcey
Ping. Steve Ellcey On Fri, 2017-10-06 at 14:01 -0700, Steve Ellcey wrote: > This patch is a follow up to a discussion at: > > https://gcc.gnu.org/ml/gcc/2017-06/msg00126.html > > For some reason the simd version of fnma in aarch64-simd.md > is not in the canonical form of having the neg operato

Re: [PATCH PR79868 ][aarch64] Fix error calls in aarch64 code so they can be translated (version 2)

2017-10-24 Thread Steve Ellcey
Thanks for looking at this Frederic,  I don't see your name in the MAINTAINERS list so I assume I still need approval from one of the diagnostic message maintainers (Dodji or David) or maybe an Aarch64 maintainer or a global maintainer. Ping? Steve Ellcey sell...@cavium.com On Sun, 2017-10-08 at

Re: [PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread H.J. Lu
On Tue, Oct 24, 2017 at 10:40 AM, Andi Kleen wrote: > "H.J. Lu" writes: >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/i386/pr82699-4.c >> @@ -0,0 +1,11 @@ >> +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ >> +/* { dg-options "-O2 -fpic -fcf-protection -mcet -pg -mfentry >>

[PATCH] RISC-V: Add Sign/Zero extend patterns for PIC loads

2017-10-24 Thread Palmer Dabbelt
Loads on RISC-V are sign-extending by default, but we weren't telling GCC this in our PIC load patterns. This corrects the problem, and adds a zero-extending pattern as well. gcc/ChangeLog 2017-10-24 Palmer Dabbelt * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define. * config/ri

Re: [PATCH] Improve -Ofast vectorization of std::sin etc. (PR libstdc++/81706)

2017-10-24 Thread Jason Merrill
On Tue, Oct 24, 2017 at 11:33 AM, Jakub Jelinek wrote: > On Tue, Oct 24, 2017 at 11:06:51AM -0400, Jason Merrill wrote: >> On 09/29/2017 08:32 AM, Jakub Jelinek wrote: >> > + tree b = builtin_decl_explicit (DECL_FUNCTION_CODE (newdecl)); >> > + if (b) >> > + duplicate_one_attribute (

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Alexander Monakov
On Tue, 24 Oct 2017, Jakub Jelinek wrote: > > Why did you chose the 32KB and 4KB limits? I wonder if that would have > > any impact on firstprivate_int values. If this proves to be effective, > > it seems like we should be able to eliminate GOMP_MAP_FIRSTPRIVATE_INT > > altogether. > > The thing i

[RFA][PATCH] Provide a class interface to ssa_propagate

2017-10-24 Thread Jeff Law
tree-ssa-propagate.c provides a fairly generic engine to propagate values through a lattice while in SSA form. The engine uses two callbacks to allow passes to provide pass specific handling of statements and phi nodes. The callback mechanism served us well in a C world. It is however somewhat

Re: [PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread Andi Kleen
"H.J. Lu" writes: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr82699-4.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ > +/* { dg-options "-O2 -fpic -fcf-protection -mcet -pg -mfentry > -fasynchronous-unwind-tables" } */ > +/* { dg-final { scan-a

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Alexander Monakov
On Tue, 24 Oct 2017, Jakub Jelinek wrote: > loop transfering the addresses or firstprivate_int values to the device > - where we issued mapnum host2dev transfers each just pointer-sized > when we could have just prepared all the pointers in an array and host2dev > copy them all together. Can you p

Re: [RFA][PATCH] Convert sprintf warning code to use a dominator walk

2017-10-24 Thread Martin Sebor
On 10/23/2017 05:14 PM, Jeff Law wrote: Martin, I'd like your thoughts on this patch. One of the things I'm working on is changes that would allow passes that use dominator walks to trivially perform context sensitive range analysis as a part of their dominator walk. As I outlined earlier thi

Re: [PATCH] Improve V?TImode shifts (PR target/82370)

2017-10-24 Thread Uros Bizjak
On Tue, Oct 24, 2017 at 4:46 PM, Jakub Jelinek wrote: > On Tue, Oct 24, 2017 at 05:44:44AM -0700, H.J. Lu wrote: >> > What I can see from config/atom.md: >> > ;; if palignr or psrldq >> > (define_insn_reservation "atom_sseishft_2" 1 >> > (and (eq_attr "cpu" "atom") >> >(and (eq_attr "ty

Re: [PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread H.J. Lu
On Tue, Oct 24, 2017 at 09:04:05AM -0700, H.J. Lu wrote: > ENDBR must be the first instruction of a function. This patch queues > ENDBR if we need to put the profiling counter call before the prologue > and generate ENDBR before the profiling counter call. > > OK for trunk if there is no regressi

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

2017-10-24 Thread Wilco Dijkstra
James Greenhalgh wrote: > > This code is a mess, would macroing your magic number 2 help at all? All the > double negatives give me a massive headache! Well we really need to rename flag_omit_frame_pointer to flag_use_frame_pointer or similar (omit and emit are too similar!). That removes most dou

Re: [RFC] New pragma exec_charset

2017-10-24 Thread Andreas Krebbel
On 10/24/2017 05:33 PM, Martin Sebor wrote: >>> My concern with this pragma/attribute and inlining has to do with >>> strings in one exec charset being propagated into functions that >>> operate on strings in another charset. E.g., like in the test >>> case below that's "miscompiled" with your pat

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

2017-10-24 Thread Richard Sandiford
Andrew MacLeod writes: > On 10/19/2017 04:22 PM, Richard Sandiford wrote: >> 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: >>> Ald

Re: [103/nnn] poly_int: TYPE_VECTOR_SUBPARTS

2017-10-24 Thread Richard Sandiford
Richard Biener writes: > On Tue, Oct 24, 2017 at 1:18 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> Do you have any numbers on the effect of poly-int on compile-times? >>> Esp. for example on stage2 build times when stage1 is -O0 -g "optimized"? >> >> I've just tried that for an x

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

2017-10-24 Thread James Greenhalgh
On Fri, Aug 04, 2017 at 04:46:09PM +0100, Wilco Dijkstra wrote: > To fix PR60580 simplify the logic in aarch64_override_options_after_change_1 > (). > If the frame pointer is enabled, set it to a special value that behaves > similar > to frame pointer omission. If we don't do this all leaf func

Re: [PATCH, i386]: Remove dead x87 cbranch helpers

2017-10-24 Thread Uros Bizjak
On Tue, Oct 24, 2017 at 5:39 PM, Rainer Orth wrote: > Hi Uros, > >> Remove dead code, obsoleted by cbranch rewrite years ago. >> >> 2017-10-11 Uros Bizjak >> >> * config/i386/i386.md (*cmp__i387): >> Do not use float_operator operator predicate. >> (*cmp__cc_i387): Ditto. >> * c

[PATCH] i386: Insert ENDBR before the profiling counter call

2017-10-24 Thread H.J. Lu
ENDBR must be the first instruction of a function. This patch queues ENDBR if we need to put the profiling counter call before the prologue and generate ENDBR before the profiling counter call. OK for trunk if there is no regressions? H.J. --- gcc/ PR target/82699 * config/i386/

Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation

2017-10-24 Thread Uros Bizjak
On Tue, Oct 24, 2017 at 5:35 PM, Rainer Orth wrote: > Uros Bizjak writes: > >> On Fri, Oct 13, 2017 at 12:56 PM, Tsimbalist, Igor V >> wrote: -Original Message- From: Uros Bizjak [mailto:ubiz...@gmail.com] Sent: Friday, October 13, 2017 10:02 AM To: Tsimbalist, Igor V

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 08:47:39AM -0700, Cesar Philippidis wrote: > On 10/24/2017 02:55 AM, Jakub Jelinek wrote: > > > Poeple from NVidia reported privately unexpected amount of host2dev > > transfers for #pragma omp target*. > > Did they mention which program they were testing? No. Just the n

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Cesar Philippidis
On 10/24/2017 02:55 AM, Jakub Jelinek wrote: > Poeple from NVidia reported privately unexpected amount of host2dev > transfers for #pragma omp target*. Did they mention which program they were testing? > The code even had comments like: >/* FIXME: Perhaps add some smarts, lik

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

2017-10-24 Thread Jonathan Wakely
On 24/10/17 17:14 +0200, FX wrote: Presumably for the i386 and x86_64 multilibs (does it make any difference if you do --disable-multlib? It would be easier to debug the output if each command was only done once). Same problem without multilib. OK good, so then test without multilib, because

Re: [PATCH, i386]: Remove dead x87 cbranch helpers

2017-10-24 Thread Rainer Orth
Hi Uros, > Remove dead code, obsoleted by cbranch rewrite years ago. > > 2017-10-11 Uros Bizjak > > * config/i386/i386.md (*cmp__i387): > Do not use float_operator operator predicate. > (*cmp__cc_i387): Ditto. > * config/i386/predicates.md (float_operator): Remove predicate. > >

Re: [C++ Patch] PR 82466 ("Missing warning for re-declaration of built-in function as variable")

2017-10-24 Thread Jason Merrill
OK. On Mon, Oct 9, 2017 at 6:37 AM, Paolo Carlini wrote: > Hi, > > this issue filed by Bernd is sort-of a small follow-up to his c++/71973: the > C front-end already warns for things like: > > int printf; > > where we are declaring in the global namespace a built-in. Beyond copying > over to

Re: [C++ PATCH] With -Wuseless-cast on direct enum init (PR c++/82299)

2017-10-24 Thread Jason Merrill
OK. On Fri, Sep 29, 2017 at 4:57 PM, Jakub Jelinek wrote: > Hi! > > The casts added for the C++17 direct enum initialization IMNSHO shouldn't > trigger -Wuseless-cast warnings. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? > > 2017-09-29 Jakub Jelinek

Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation

2017-10-24 Thread Rainer Orth
Uros Bizjak writes: > On Fri, Oct 13, 2017 at 12:56 PM, Tsimbalist, Igor V > wrote: >>> -Original Message- >>> From: Uros Bizjak [mailto:ubiz...@gmail.com] >>> Sent: Friday, October 13, 2017 10:02 AM >>> To: Tsimbalist, Igor V >>> Cc: gcc-patches@gcc.gnu.org >>> Subject: Re: 0006-Part-6

Re: [RFC] New pragma exec_charset

2017-10-24 Thread Martin Sebor
My concern with this pragma/attribute and inlining has to do with strings in one exec charset being propagated into functions that operate on strings in another charset. E.g., like in the test case below that's "miscompiled" with your patch -- the first test for n == 7 is eliminated and the buffe

Re: [PATCH] Improve -Ofast vectorization of std::sin etc. (PR libstdc++/81706)

2017-10-24 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 11:06:51AM -0400, Jason Merrill wrote: > On 09/29/2017 08:32 AM, Jakub Jelinek wrote: > > + tree b = builtin_decl_explicit (DECL_FUNCTION_CODE (newdecl)); > > + if (b) > > + duplicate_one_attribute (&DECL_ATTRIBUTES (b), > > +DEC

Re: [PATCH][GCC][AArch64] Restrict lrint inlining on ILP32.

2017-10-24 Thread James Greenhalgh
On Wed, Sep 13, 2017 at 04:00:24PM +0100, Tamar Christina wrote: > Hi All, > > The inlining of lrint isn't valid in all cases on ILP32 when > -fno-math-errno is used because an inexact exception is raised in > certain circumstances. > > Instead the restriction is placed such that the integer mode

Re: [PATCH][GCC][ARM][AArch64] Testsuite framework changes and execution tests [Patch (8/8)]

2017-10-24 Thread James Greenhalgh
On Fri, Oct 06, 2017 at 01:45:18PM +0100, Tamar Christina wrote: > Hi All, > > this is a minor respin of the patch with the comments addressed. Note this > patch is now 7/8 in the series. > > > Regtested on arm-none-eabi, armeb-none-eabi, > aarch64-none-elf and aarch64_be-none-elf with no issue

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

2017-10-24 Thread FX
> Presumably for the i386 and x86_64 multilibs (does it make any > difference if you do --disable-multlib? It would be easier to debug the > output if each command was only done once). Same problem without multilib. > I can't really do much more by email, somebody with access to one of > these fa

Re: [PATCH][GCC][Testsuite][ARM][AArch64] Enable Dot Product for generic tests for ARM and AArch64 [Patch (7/8)]

2017-10-24 Thread James Greenhalgh
On Fri, Oct 06, 2017 at 01:45:15PM +0100, Tamar Christina wrote: > Hi All, > > this is a respin with the changes suggested. Note that this patch is no 8/8 > in the series. > > Regtested on arm-none-eabi, armeb-none-eabi, > aarch64-none-elf and aarch64_be-none-elf with no issues found. > > Ok fo

Re: [PATCH] Improve -Ofast vectorization of std::sin etc. (PR libstdc++/81706)

2017-10-24 Thread Jason Merrill
On 09/29/2017 08:32 AM, Jakub Jelinek wrote: + tree b = builtin_decl_explicit (DECL_FUNCTION_CODE (newdecl)); + if (b) + duplicate_one_attribute (&DECL_ATTRIBUTES (b), +DECL_ATTRIBUTES (newdecl), +"o

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

2017-10-24 Thread Jonathan Wakely
On 24/10/17 16:03 +0200, FX wrote: OK, could you try this, and share the full output? Attached is the output of “make -j4” in a build at stage1, where I have just run "rm -rf x86_64-apple-darwin17.0.0/**/libstdc++-v3”, with the patch applied. FX There are two commands that create the includ

Re: [PATCH][AArch64] Wrong type-attribute for stp and str

2017-10-24 Thread Richard Earnshaw (lists)
On 24/10/17 15:54, Dominik Inführ wrote: > >> On 24 Oct 2017, at 11:40, Richard Earnshaw (lists) >> wrote: >> >> On 23/10/17 17:36, Dominik Inführ wrote: >>> I’ve added your suggestions. I would also like to propose to change the >>> type attribute from neon_stp to store_8 and store_16, this se

Re: [PATCH][AArch64] Wrong type-attribute for stp and str

2017-10-24 Thread Dominik Inführ
> On 24 Oct 2017, at 11:40, Richard Earnshaw (lists) > wrote: > > On 23/10/17 17:36, Dominik Inführ wrote: >> I’ve added your suggestions. I would also like to propose to change the type >> attribute from neon_stp to store_8 and store_16, this seems to be more in >> line with respect to other

Re: [PATCH] Improve V?TImode shifts (PR target/82370)

2017-10-24 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 05:44:44AM -0700, H.J. Lu wrote: > > What I can see from config/atom.md: > > ;; if palignr or psrldq > > (define_insn_reservation "atom_sseishft_2" 1 > > (and (eq_attr "cpu" "atom") > >(and (eq_attr "type" "sseishft") > > (and (eq_attr "atom_unit" "sis

Re: [C++ Patch] PR 80991 ("ICE with __is_trivially_constructible in template")

2017-10-24 Thread Jason Merrill
OK. On Wed, Oct 18, 2017 at 7:07 AM, Paolo Carlini wrote: > Hi, > > a rather straightforward issue that we didn't notice so far only because in > all our uses of __is_trivially_constructible either neither type is > dependent or both are (eg, in library uses). The below handles in the > obvious w

Re: [PATCH] Fix test-suite fallout of default -Wreturn-type.

2017-10-24 Thread Jason Merrill
On 10/18/2017 08:48 AM, Martin Liška wrote: This is second patch that addresses test-suite fallout. All these tests fail because -Wreturn-type is now on by default. +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C -constexpr T g(T t) { return f(t); } // { dg-error "f.int" } +constexpr T g(T

Re: [PATCH] Fix all tests that fail with -sanitize=return.

2017-10-24 Thread Jason Merrill
On 10/18/2017 08:47 AM, Martin Liška wrote: This is first patch that addresses test-suite fallout. All these tests fail in runtime. +++ b/gcc/testsuite/g++.dg/missing-return.C @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-Wreturn-type -fdump-tree-optimized" } */ + +int foo(int a

Re: [PATCH GCC]A simple implementation of loop interchange

2017-10-24 Thread Michael Matz
Hello, On Fri, 22 Sep 2017, Bin.Cheng wrote: > This is updated patch for loop interchange with review suggestions > resolved. Changes are: > 1) It does more light weight checks like rectangle loop nest check > earlier than before. > 2) It checks profitability of interchange before data depen

Re: [PATCH][RFC] Instrument function exit with __builtin_unreachable in C++.

2017-10-24 Thread Jason Merrill
On 10/18/2017 09:07 AM, Martin Liška wrote: @@ -1182,7 +1182,13 @@ cxx_eval_builtin_function_call (const constexpr_ctx *ctx, tree t, tree fun, { new_call = build_call_array_loc (EXPR_LOCATION (t), TREE_TYPE (t), CALL_EXPR_FN (t), nargs

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

2017-10-24 Thread FX
The output of “make -j4” in a build at stage1, where I have just run "rm -rf x86_64-apple-darwin17.0.0/**/libstdc++-v3”, with the patch applied: https://gist.github.com/fxcoudert/46f0026c44eb3db2937ac0e92a477338 FX

Re: [C++ Patch] PR 80955 (Macros expanded in definition of user-defined literals)

2017-10-24 Thread Jason Merrill
On Fri, Oct 20, 2017 at 3:52 PM, Mukesh Kapoor wrote: > On 10/20/2017 11:00 AM, Mukesh Kapoor wrote: >> On 10/20/2017 10:45 AM, Nathan Sidwell wrote: >>> On 10/20/2017 12:37 PM, Mukesh Kapoor wrote: This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955. Handle user-def

Re: [PATCH] RFC: Preserving locations for variable-uses and constants (PR 43486)

2017-10-24 Thread Jason Merrill
On Fri, Oct 20, 2017 at 5:53 PM, David Malcolm wrote: > Design questions: > > * The patch introduces a new kind of tree node, currently called > DECL_WRAPPER_EXPR (although it's used for wrapping constants as well > as decls). Should wrappers be a new kind of tree node, or should they > reu

[PATCH] Fix PR82697

2017-10-24 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-10-24 Richard Biener PR tree-optimization/82697 * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set zero for conditional load and unconditional store. * gcc.dg/torture/pr82697

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

2017-10-24 Thread Jonathan Wakely
On 24/10/17 11:06 +0200, FX wrote: Thanks Jonathan. I tried, and it does not work, I still get the same error: Making all in include mkdir -p ./x86_64-apple-darwin17.0.0/bits/stdc++.h.gch mkdir -p ./x86_64-apple-darwin17.0.0/bits/stdc++.h.gch /Users/fx/devel/gcc/ibin/./gcc/xgcc -shared-libgcc -

Re: [000/nnn] poly_int: representation of runtime offsets and sizes

2017-10-24 Thread Richard Sandiford
Richard Biener writes: > On Tue, Oct 24, 2017 at 2:48 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Tue, Oct 24, 2017 at 1:23 PM, Richard Sandiford >>> wrote: Eric Botcazou writes: >> Yeah. E.g. for ==, the two options would be: >> >> a) must_eq (a, b) ->

[PATCH] Avoid -Wattribute-alias warnings for long double compat symbols

2017-10-24 Thread Jonathan Wakely
The long double compat symbols are producing warnings, this suppressess them. * config/locale/gnu/c_locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]: Ignore -Wattribute-alias warnings. * src/c++11/istream-inst.cc: Likewise. * src/c++11/locale-inst.cc: Likewise. * sr

[PATCH] Refactor std::basic_string_view members and add noexcept

2017-10-24 Thread Jonathan Wakely
This applies 'noexcept' more liberally in our std::basic_string_view, anywhere that can't actually throw (even if it has a narrow contract). I've also refactored some members to remove complex conditional expressions, because they're not needed with C++14 constexpr, we can just write the code as

Re: [000/nnn] poly_int: representation of runtime offsets and sizes

2017-10-24 Thread Richard Biener
On Tue, Oct 24, 2017 at 2:48 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Tue, Oct 24, 2017 at 1:23 PM, Richard Sandiford >> wrote: >>> Eric Botcazou writes: > Yeah. E.g. for ==, the two options would be: > > a) must_eq (a, b) -> a == b >must_ne (a, b) ->

Re: [000/nnn] poly_int: representation of runtime offsets and sizes

2017-10-24 Thread Richard Sandiford
Richard Biener writes: > On Tue, Oct 24, 2017 at 1:23 PM, Richard Sandiford > wrote: >> Eric Botcazou writes: Yeah. E.g. for ==, the two options would be: a) must_eq (a, b) -> a == b must_ne (a, b) -> a != b which has the weird property that (a == b) != (

Re: [PATCH] Add bootstrap-cet.mk to bootstrap GCC with Intel CET

2017-10-24 Thread H.J. Lu
On Tue, Oct 24, 2017 at 5:42 AM, Richard Biener wrote: > On Tue, Oct 24, 2017 at 1:14 PM, H.J. Lu wrote: >> Bootstrap GCC with Intel CET by configuring GCC with >> >> --with-build-config="bootstrap-cet bootstrap-debug" >> >> Tested on Linux/i686 and Linux/x86-64. >> >> OK for trunk? > > Ok. Do y

Re: [PATCH] Improve V?TImode shifts (PR target/82370)

2017-10-24 Thread H.J. Lu
On Fri, Oct 20, 2017 at 12:33 PM, Kirill Yukhin wrote: > Hello Jakub, Uroš, Jakub > On 04 Oct 21:35, Jakub Jelinek wrote: >> Hi! >> >> The following patch tweaks the TImode vector shifts similarly >> to the earlier vector shift patch, so that for shifts by immediate >> we can accept a memory input

Re: [PATCH] Add bootstrap-cet.mk to bootstrap GCC with Intel CET

2017-10-24 Thread Richard Biener
On Tue, Oct 24, 2017 at 1:14 PM, H.J. Lu wrote: > Bootstrap GCC with Intel CET by configuring GCC with > > --with-build-config="bootstrap-cet bootstrap-debug" > > Tested on Linux/i686 and Linux/x86-64. > > OK for trunk? Ok. Do you have a simulator that understands CET yet? Richard. > H.J. > --

[PATCH] i386: Avoid PLT when shadow stack is enabled directly

2017-10-24 Thread H.J. Lu
PLT should be avoided with shadow stack in 32-bit mode if more than 2 parameters are passed in registers since only 2 parameters can be passed in registers for external function calls via PLT with shadow stack enabled. OK for trunk if there is no regressions? H.J. --- gcc/ PR target/8178

  1   2   >