Re: [PATCH] Allow direct 0 and -1 moves to mask registers (PR target/88465)

2018-12-13 Thread Uros Bizjak
On Wed, Dec 12, 2018 at 11:38 PM Jakub Jelinek wrote: > > Hi! > > As mentioned in the PR, we can use kxor? %kN, %kN, %kN or > kxnor? %kN, %kN, %kN to set %kN to 0 or -1, instead of > setting a GPR to that and moving to the mask register. > > Bootstrapped/regtested on x86_64-linux and i686-linux, o

[testsuite] Include gdc.test prefix in test names (PR testsuite/88041)

2018-12-13 Thread Rainer Orth
As reported in the PR, the test names of DejaGnu tests should be the path relative to the respective testsuite directory, a convention the gdc.test tests currently don't follow. The patch below fixes this. After a few false starts (some described in the PR and several more) I came up with the fol

[PATCH][AArch64][doc] Clarify -msve-vector-bits=128 behaviour

2018-12-13 Thread Kyrill Tkachov
Hi all, We've received reports about the -msve-vector-bits=128 bits being somewhat ambiguous. It isn't clear whether -msve-vector-bits=128 forces vector-length-agnostic code or whether -msve-vector-bits=scalable forces 128-bit vector-lengh-specific code. The latter is a, perhaps unintuitive, re

Re: RFA: libiberty: Add a limit on demangling qualifiers (PR 87241) (version 2)

2018-12-13 Thread Nick Clifton
Hi Ian, > I thought we were removing the old demangling schemes? Doh! yes, I totally forgot. So I will withdraw this patch in favour of Jason's. Cheers Nick

Re: RFA: libiberty: Add a limit on demangling qualifiers (PR 87241)

2018-12-13 Thread Nick Clifton
Hi Jason, > This issue also will be resolved by disabling or removing the old > demangling code, which I haven't seen anyone argue against. Doh - of course. I withdraw my patch and I hope that yours will go in soon. Cheers Nick

Re: [testsuite] Include gdc.test prefix in test names (PR testsuite/88041)

2018-12-13 Thread Iain Buclaw
On Thu, 13 Dec 2018 at 10:16, Rainer Orth wrote: > > As reported in the PR, the test names of DejaGnu tests should be the > path relative to the respective testsuite directory, a convention the > gdc.test tests currently don't follow. > > The patch below fixes this. After a few false starts (some

Re: [PATCH v2 6/7] Remaining support for clobber high

2018-12-13 Thread Jakub Jelinek
On Thu, Jul 26, 2018 at 10:13:28AM +0100, Alan Hayward wrote: > --- a/gcc/rtl.c > +++ b/gcc/rtl.c > @@ -304,6 +304,10 @@ copy_rtx (rtx orig) > return orig; >break; > > +case CLOBBER_HIGH: > + gcc_assert (REG_P (XEXP (orig, 0))); > + return orig; Wrong formatting (indent

Re: [PATCH][AArch64][doc] Clarify -msve-vector-bits=128 behaviour

2018-12-13 Thread Richard Sandiford
Thanks for doing this. "Kyrill Tkachov" writes: > @@ -15716,16 +15716,19 @@ an effect when SVE is enabled. > > GCC supports two forms of SVE code generation: ``vector-length > agnostic'' output that works with any size of vector register and > -``vector-length specific'' output that only work

Re: [PATCH 4/6, OpenACC, libgomp] Async re-work, libgomp/target.c changes (revised, v2)

2018-12-13 Thread Jakub Jelinek
On Tue, Dec 11, 2018 at 09:47:10PM +0800, Chung-Lin Tang wrote: > I have revised the patch to make both gomp_[un]map_vars and > gomp_[un]map_vars_async > point to gomp_[un]map_vars_internal, which is static always_inline. This > should > alleviate that part of the concerns. > @@ -263,8 +279,9 @@

Re: [RS6000] Don't pass -many to the assembler

2018-12-13 Thread Alan Modra
On Wed, Nov 14, 2018 at 01:43:57PM +1030, Alan Modra wrote: > On Tue, Nov 13, 2018 at 05:17:41AM -0600, Segher Boessenkool wrote: > > On Tue, Nov 13, 2018 at 12:02:55PM +1030, Alan Modra wrote: > > > OK, fair enough. Another option is to just disable -many when gcc is > > > in development, like we

Re: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach)

2018-12-13 Thread Jakub Jelinek
On Mon, Dec 10, 2018 at 07:41:37PM +, Julian Brown wrote: > @@ -11870,7 +11874,8 @@ c_parser_oacc_wait_list (c_parser *parser, location_t > clause_loc, tree list) > static tree > c_parser_omp_variable_list (c_parser *parser, > location_t clause_loc, > -

Re: [PATCH][AArch64][doc] Clarify -msve-vector-bits=128 behaviour

2018-12-13 Thread Ramana Radhakrishnan
On Thu, Dec 13, 2018 at 10:15 AM Richard Sandiford wrote: > > Thanks for doing this. > > "Kyrill Tkachov" writes: > > @@ -15716,16 +15716,19 @@ an effect when SVE is enabled. > > > > GCC supports two forms of SVE code generation: ``vector-length > > agnostic'' output that works with any size of

Re: [PATCH] PR libstdc++/80762 avoid ambiguous __constructible_from

2018-12-13 Thread Jonathan Wakely
On 13/12/18 08:56 +0100, Christophe Lyon wrote: On Wed, 12 Dec 2018 at 17:13, Jonathan Wakely wrote: Ensure we don't try to instantiate __is_constructible_from, because there are two partial specializations that are equally good matches. PR libstdc++/80762 * include/bits/fs_pa

Re: [PATCH, rs6000] Allow libitm to use HTM on newer hw and kernels

2018-12-13 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 06:55:14PM -0600, Peter Bergner wrote: > On 12/12/18 2:52 PM, Segher Boessenkool wrote: > >> +/* This is a fairly new feature bit, so handle it not being defined. */ > >> +#ifndef PPC_FEATURE2_HTM_NO_SUSPEND > >> +# define PPC_FEATURE2_HTM_NO_SUSPEND 0 > >> +#endif > > > >

Re: [PATCH][PR84877]Dynamically align the address for local parameter copy on the stack when required alignment is larger than MAX_SUPPORTED_STACK_ALIGNMENT

2018-12-13 Thread Eric Botcazou
> 2018-03-22 Renlin Li > > PR middle-end/84877 > * explow.h (get_dynamic_stack_size): Declare it as external. > * explow.c (record_new_stack_level): Remove function static attribute. > * function.c (assign_stack_local_1): Dynamically align the stack slot > addr for

[libgomp, nvptx] Fix libgomp.c/target-5.c compilation

2018-12-13 Thread Tom de Vries
[ was: Re: [libgomp, nvptx] Disable OMP_{DISPLAY_AFFINITY,AFFINITY_FORMAT} support ] On 12-12-18 14:15, Jakub Jelinek wrote: > On Wed, Dec 12, 2018 at 02:02:20PM +0100, Tom de Vries wrote: >> This RFC patch implements that approach for getpid and gethostname (I >> wonder though whether it's not po

[Committed 2/2] S/390: Fix zvector vec_double builtin

2018-12-13 Thread Andreas Krebbel
The (unsigned) long int to double vector conversion instructions expect 2 immediate parameters. One for the inexact suppression control and another one for the rounding mode. However, the vec_double builtin has just the vector source operand. The 2 addtional operands need to be added with an inte

[Committed 1/2] S/390: Use VEC_INEXACT/VEC_NOINEXACT instead of magic numbers.

2018-12-13 Thread Andreas Krebbel
2018-12-13 Andreas Krebbel * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64") ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT. ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT. --- gcc/config/s390/vx-builtins.md | 12 ++-- 1 file

Re: [PATCH] Overload std::distance and std::advance for path::iterator

2018-12-13 Thread Jonathan Wakely
On 12/12/18 16:14 +, Jonathan Wakely wrote: +void +test04() +{ + std::filesystem::path p = "/a/b/c/d/e/f/g"; + VERIFY( std::distance(p.begin(), p.end()) == 8); + auto it = p.begin(); + std::advance(it, 1); + VERIFY( std::distance(p.begin(), it) == 1 ); + VERIFY( it->native() == "a" ); +

Re: [PATCH] PR libstdc++/80762 avoid ambiguous __constructible_from

2018-12-13 Thread Christophe Lyon
On Thu, 13 Dec 2018 at 12:00, Jonathan Wakely wrote: > > On 13/12/18 08:56 +0100, Christophe Lyon wrote: > >On Wed, 12 Dec 2018 at 17:13, Jonathan Wakely wrote: > >> > >> Ensure we don't try to instantiate __is_constructible_from, > >> because there are two partial specializations that are equall

Re: [PATCH] PR libstdc++/80762 avoid ambiguous __constructible_from

2018-12-13 Thread Jonathan Wakely
On 13/12/18 13:10 +0100, Christophe Lyon wrote: On Thu, 13 Dec 2018 at 12:00, Jonathan Wakely wrote: On 13/12/18 08:56 +0100, Christophe Lyon wrote: >On Wed, 12 Dec 2018 at 17:13, Jonathan Wakely wrote: >> >> Ensure we don't try to instantiate __is_constructible_from, >> because there are two

Re: [PATCH] Fix split-path-5.c testcase (PR testsuite/88454)

2018-12-13 Thread Segher Boessenkool
On Thu, Dec 13, 2018 at 08:49:53AM +0100, Jakub Jelinek wrote: > On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: > > Note that split-path-5 has the same basic structure. A half-diamond > > with a single statement in the middle block that should be trivially > > if-convertable if profitab

Re: [PATCH][AArch64][doc] Clarify -msve-vector-bits=128 behaviour

2018-12-13 Thread Richard Sandiford
Ramana Radhakrishnan writes: > On Thu, Dec 13, 2018 at 10:15 AM Richard Sandiford > wrote: >> >> Thanks for doing this. >> >> "Kyrill Tkachov" writes: >> > @@ -15716,16 +15716,19 @@ an effect when SVE is enabled. >> > >> > GCC supports two forms of SVE code generation: ``vector-length >> > agn

[committed] Fix libgomp.c++/for-24.C testcase (PR libgomp/88460)

2018-12-13 Thread Jakub Jelinek
Hi! This is PR86660 problem repeated on another testcase (copied + modified from the buggy one before it has been fixed, sorry for that). Fixed thusly, tested on x86_64-linux without offloading and by Tom with offloading, committed to trunk. Thanks Tom for reporting it and testing it. 2018-12-13

Re: [PATCH] error on missing LTO symbols

2018-12-13 Thread Tom de Vries
[ adding gcc-patches ] On 13-12-18 14:30, Tom de Vries wrote: > [ Patch copy-pasted from here ( > https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02076.html ). Patch was > resubmitted here ( > https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00043.html ). ] > > Hi, > > this issue just popped up again

Re: [libgomp, nvptx] Fix libgomp.c/target-5.c compilation

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 01:09:25PM +0100, Tom de Vries wrote: > 2018-12-13 Tom de Vries > > * affinity-fmt.c (gomp_print_string): New function, factored out of ... > (omp_display_affinity, gomp_display_affinity_thread): ... here, and ... > * fortran.c (omp_display_affinity_):

Re: [PATCH] error on missing LTO symbols

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 02:31:45PM +0100, Tom de Vries wrote: > > 2015-07-24 Cesar Philippidis Please use current date ;) > > > > gcc/ > > * lto-cgraph.c (input_overwrite_node): Error instead of assert > > on missing cgraph partitions. > > (input_varpool_node): Likewise. > >

[PR c++/87531] Fix second bug

2018-12-13 Thread Nathan Sidwell
This patch addresses the regression caused by the first fix. For reasons that used to make more sense, an overload set of template members would present as just a dependent using-decl, if it contained any such using decls. Then we'd defer repeat lookup to instantiation time. Except in a coup

Re: [patch] various OpenACC reduction enhancements - FE changes

2018-12-13 Thread Julian Brown
On Tue, 4 Dec 2018 13:57:24 +0100 Jakub Jelinek wrote: > On Fri, Jun 29, 2018 at 11:22:00AM -0700, Cesar Philippidis wrote: > > 2018-06-29 Cesar Philippidis > > Nathan Sidwell > > > > gcc/c/ > > * c-parser.c (c_parser_omp_variable_list): New > > c_omp_region_type argument.

Re: [patch] various OpenACC reduction enhancements - test cases

2018-12-13 Thread Julian Brown
On Tue, 4 Dec 2018 13:59:33 +0100 Jakub Jelinek wrote: > On Fri, Jun 29, 2018 at 11:23:21AM -0700, Cesar Philippidis wrote: > > Attached are the updated reductions tests cases. Again, these have > > been bootstrapped and regression tested cleanly for x86_64 with > > nvptx offloading. Is it OK for

Re: [PATCH] [RFC] PR target/52813 and target/11807

2018-12-13 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 06:26:10PM +0200, Dimitar Dimitrov wrote: > I expect that if I mark a HW register as "clobber", compiler would save its > contents before executing the asm statement, and after that it would restore > its contents. This is the GCC behaviour for all but the SP and PIC regis

Re: [PATCH, OpenACC, 4/8] Multi-dimensional dynamic array support for OpenACC data clauses, omp-low: dynamic array descriptor creation

2018-12-13 Thread Chung-Lin Tang
On 2018/10/16 8:56 PM, Chung-Lin Tang wrote: The next two patches are the bulk of the compiler patch in the middle-ends. The first patch here, implements the creation of dynamic array descriptors to pass to the runtime, a different way than completely using map-clauses. Because we support arbit

Re: [PATCH, OpenACC, 7/8] Multi-dimensional dynamic array support for OpenACC data clauses, libgomp support

2018-12-13 Thread Chung-Lin Tang
On 2018/12/6 10:43 PM, Jakub Jelinek wrote: On Thu, Dec 06, 2018 at 10:19:43PM +0800, Chung-Lin Tang wrote: Why do you call the non-contiguous arrays dynamic arrays? Is that some OpenACC term? I'd also prefix those with gomp_ and it is important to make it clear what is the ABI type shared wit

Re: [ping] Change static chain to r11 on aarch64

2018-12-13 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 10:04:11PM +, Wilco Dijkstra wrote: > Hi Martin, > > > Does a non-executable stack actually improve security? > > Absolutely, it's like closing your front door rather than just leave it open > for anyone. On many Linux systems, if you use trampolines anywhere then the

Re: [testsuite] Include gdc.test prefix in test names (PR testsuite/88041)

2018-12-13 Thread Rainer Orth
Hi Iain, >> I'm omitting the changes (also mentioned in the PR) to >> compilable/ddoc9676a.d and compilable/depsOutput9948.d which contain >> absolute path names in EXTRA_SOURCES because those need to go upstream >> first. >> > > This has been committed upstream > (https://github.com/dlang/dmd/pul

Re: [RS6000] Don't pass -many to the assembler

2018-12-13 Thread David Edelsohn
On Thu, Dec 13, 2018 at 5:26 AM Alan Modra wrote: > > On Wed, Nov 14, 2018 at 01:43:57PM +1030, Alan Modra wrote: > > On Tue, Nov 13, 2018 at 05:17:41AM -0600, Segher Boessenkool wrote: > > > On Tue, Nov 13, 2018 at 12:02:55PM +1030, Alan Modra wrote: > > > > OK, fair enough. Another option is to

Re: [PATCH 0/6, OpenACC, libgomp] Async re-work

2018-12-13 Thread Chung-Lin Tang
On 2018/12/7 6:26 AM, Julian Brown wrote: On Thu, 6 Dec 2018 22:22:46 + Julian Brown wrote: On Thu, 6 Dec 2018 21:42:14 +0100 Thomas Schwinge wrote: [...] ..., where the "Invalid read of size 8" happens, and which eventually would try to "free (tgt)" again, via libgomp/target.c:gomp_unm

Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC

2018-12-13 Thread Julian Brown
On Fri, 7 Dec 2018 15:05:46 +0100 Jakub Jelinek wrote: > On Thu, Dec 06, 2018 at 10:40:41PM +, Julian Brown wrote: > > + && (TREE_CODE (inner_type) == REAL_TYPE > > + || (!omp_is_reference (var) > > + && INTEGRAL_TYPE_P (inner_type)) > > +

Re: [PATCH 0/6, OpenACC, libgomp] Async re-work

2018-12-13 Thread Thomas Schwinge
Hi! On Thu, 13 Dec 2018 23:28:49 +0800, Chung-Lin Tang wrote: > On 2018/12/7 6:26 AM, Julian Brown wrote: > > On Thu, 6 Dec 2018 22:22:46 + > > Julian Brown wrote: > > > >> On Thu, 6 Dec 2018 21:42:14 +0100 > >> Thomas Schwinge wrote: > >> > >>> [...] > >>> ..., where the "Invalid read of

Re: [patch] various OpenACC reduction enhancements - ME and nvptx changes

2018-12-13 Thread Julian Brown
On Tue, 4 Dec 2018 16:55:04 +0100 Tom de Vries wrote: > On 04-12-18 13:29, Jakub Jelinek wrote: > > On Fri, Jun 29, 2018 at 11:19:53AM -0700, Cesar Philippidis wrote: > >> The attached patch includes the nvptx and GCC ME reductions > >> enhancements. > >> > >> Is this patch OK for trunk? It boo

Re: [committed] Clean up Fortran OpenACC wait clause handling

2018-12-13 Thread Thomas Schwinge
Hi Julian! On Mon, 3 Dec 2018 16:02:23 +, Julian Brown wrote: > On Fri, 30 Nov 2018 21:48:20 +0100 > Thomas Schwinge wrote: > > commit 3e3de40a5ab21d72f08071a7a40120dd05608cc1 > > Author: tschwinge > > Date: Fri Nov 30 20:39:18 2018 + > > > > Clean up Fortran OpenACC wait clause

Re: Add a loop versioning pass

2018-12-13 Thread Richard Biener
On December 12, 2018 7:43:10 PM GMT+01:00, Richard Sandiford wrote: >Richard Biener writes: >> On Thu, Dec 6, 2018 at 2:19 PM Richard Sandiford >>> Tested on x86_64-linux-gnu, aarch64-linux-gnu and aarch64_be-elf. >>> Also repeated the performance testing (but haven't yet tried an >>> LTO varian

Re: [PATCH] Support AVX512F masked gather loads (PR tree-optimization/88464)

2018-12-13 Thread Richard Biener
On December 12, 2018 11:43:10 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >We support either the AVX2 gather loads (128-bit or 256-bit, using >masks in >vector registers), both conditional and unconditional, but AVX512F >gather >loads only unconditional. The problem was that tree-vect-stmts.c >did

Re: [PATCH] Support AVX512F masked gather loads (PR tree-optimization/88464)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 05:09:17PM +0100, Richard Biener wrote: > Is there any chance you could look at replacing the i386 code to work with > the new IFN style used by Aarch64? Maybe for GCC 10, I'm afraid it is a lot of work mainly due to the weirdnesses of x86 mixed index vs. data sized types,

Re: [ping] Change static chain to r11 on aarch64

2018-12-13 Thread Wilco Dijkstra
Hi Martin, Uecker, Martin wrote: >Am Mittwoch, den 12.12.2018, 22:04 + schrieb Wilco Dijkstra: >> Hi Martin, >> >> > Does a non-executable stack actually improve security? >> >> Absolutely, it's like closing your front door rather than just leave it open >> for anyone. > > The question is wh

Re: [PATCH, rs6000] Allow libitm to use HTM on newer hw and kernels

2018-12-13 Thread Peter Bergner
On 12/13/18 2:41 AM, Segher Boessenkool wrote: > Or like > > unsigned long htm_flags = PPC_FEATURE2_HAS_HTM > #ifdef PPC_FEATURE2_HTM_NO_SUSPEND > | PPC_FEATURE2_HTM_NO_SUSPEND > #endif > | 0; > > Okay for trunk with either style. Thanks! Ok

Re: [PATCH] Delete powerpcspe

2018-12-13 Thread Jeff Law
On 12/12/18 10:33 AM, Segher Boessenkool wrote: > On Wed, Dec 12, 2018 at 11:36:29AM +0100, Richard Biener wrote: >> On Tue, Dec 11, 2018 at 2:37 PM Jeff Law wrote: >>> One way to deal with these problems is to create a fake simulator that >>> always returns success. That's what my tester does fo

Re: [PATCH][RS6000] Fix PR87870: ppc64 generates poor code when loading constants into TImode vars

2018-12-13 Thread Peter Bergner
On 11/16/18 5:29 PM, Segher Boessenkool wrote: > On Fri, Nov 16, 2018 at 04:26:18PM -0600, Peter Bergner wrote: >> However, when I made the change below, the length attribute seems a >> little off. For *_64bit, we have a length of 4, but for *_32bit, we >> have a length of 32. The "4" looks corre

Re: [ping] Change static chain to r11 on aarch64

2018-12-13 Thread Uecker, Martin
Hi Wilco, Am Donnerstag, den 13.12.2018, 16:33 + schrieb Wilco Dijkstra: > Uecker, Martin wrote: > > Am Mittwoch, den 12.12.2018, 22:04 + schrieb Wilco Dijkstra: > > > Hi Martin, > > > > > > > Does a non-executable stack actually improve security? > > > > > > Absolutely, it's like closi

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Jeff Law
On 12/6/18 1:59 PM, Jason Merrill wrote: > Since pvt was removed, it's bugged me that to pretty-print a vec I > needed to write out "call debug($)". So this patch adds a generic > command "pp" to print anything handled by a debug overload. > > OK for trunk? > Seems quite reasonable. I didn't ev

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Marek Polacek
On Thu, Dec 13, 2018 at 10:15:07AM -0700, Jeff Law wrote: > On 12/6/18 1:59 PM, Jason Merrill wrote: > > Since pvt was removed, it's bugged me that to pretty-print a vec I > > needed to write out "call debug($)". So this patch adds a generic > > command "pp" to print anything handled by a debug ov

[PATCH] x86: Don't use get_frame_size to finalize stack frame

2018-12-13 Thread H.J. Lu
get_frame_size () returns used stack slots during compilation, which may be optimized out later. Since ix86_find_max_used_stack_alignment is called by ix86_finalize_stack_frame_flags to check if stack frame is required, there is no need to call get_frame_size () which may give inaccurate final sta

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Jason Merrill
On Thu, Dec 13, 2018 at 12:26 PM Marek Polacek wrote: > On Thu, Dec 13, 2018 at 10:15:07AM -0700, Jeff Law wrote: > > On 12/6/18 1:59 PM, Jason Merrill wrote: > > > Since pvt was removed, it's bugged me that to pretty-print a vec I > > > needed to write out "call debug($)". So this patch adds a g

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Marek Polacek
On Thu, Dec 13, 2018 at 12:48:37PM -0500, Jason Merrill wrote: > On Thu, Dec 13, 2018 at 12:26 PM Marek Polacek wrote: > > On Thu, Dec 13, 2018 at 10:15:07AM -0700, Jeff Law wrote: > > > On 12/6/18 1:59 PM, Jason Merrill wrote: > > > > Since pvt was removed, it's bugged me that to pretty-print a v

Re: [PATCH AutoFDO]Skip generating histogram value for internal call

2018-12-13 Thread Jeff Law
On 12/12/18 8:50 PM, bin.cheng wrote: > Hi, > This patch skips generating histogram value for internal function call in > autofdo, > otherwise it would trigger ICE with following patch re-enabling indirect call > value > profile transformation. I think this patch is actually needed for GCC-6 on

Re: [PATCH] match_asm_constraints: Use copy_rtx where needed (PR88001)

2018-12-13 Thread Jeff Law
On 12/12/18 1:22 PM, Segher Boessenkool wrote: > The new insn here (temporarily) illegally shares RTL. This fixes it. > > Tested with an ARC cross, and regstrapped on powerpc64-linux {-m32,-m64}. > Is this okay for trunk? > > > Segher > > > 2018-12-12 Segher Boessenkool > > PR rtl-o

Re: [PATCH, rs6000] Allow libitm to use HTM on newer hw and kernels

2018-12-13 Thread Peter Bergner
On 12/13/18 10:42 AM, Peter Bergner wrote: > On 12/13/18 2:41 AM, Segher Boessenkool wrote: >> Or like >> >> unsigned long htm_flags = PPC_FEATURE2_HAS_HTM >> #ifdef PPC_FEATURE2_HTM_NO_SUSPEND >> | PPC_FEATURE2_HTM_NO_SUSPEND >> #endif >> | 0; >>

Re: [PATCH] avoid folding snprintf calls with bounds > INT_MAX (PR 87096)

2018-12-13 Thread Jeff Law
On 12/12/18 4:18 PM, Martin Sebor wrote: > POSIX requires snprintf to fail with EOVERFLOW when the specified > bound exceeds INT_MAX.  This requirement conflicts with the C > requirements on valid calls to the function and isn't universally > implemented (e.g., Glibc doesn't seem to follow it, and 

Re: [PATCH AutoFDO]Call update_max_bb_count even if autofdo counts are all zeros

2018-12-13 Thread Jeff Law
On 12/12/18 8:50 PM, bin.cheng wrote: > Hi, > This patch calls update_max_bb_count even if autofdo counts are all zeros, > otherwise it would trigger ICE because of mismatch between basic blocks' > count (all autofdo::zero) and cfun->cfg->max_count (guessed::non_zero). > For functions with all auto

Re: [RFC] Handle LHS zero_extracts in DSE

2018-12-13 Thread Jeff Law
On 12/7/18 8:57 AM, Andreas Krebbel wrote: > Hi, > > debugging a problem with an older GCC (4.6). I've seen RTXs using > ZERO_EXTRACT LHS operands on MEMs as in: > > (insn 7 6 0 (set (zero_extract:DI (mem/s/c:QI (plus:DI (reg/f:DI 39 > virtual-stack-vars) > (const_int -5 [0xff

Re: [PATCH] Fix split-path-5.c testcase (PR testsuite/88454)

2018-12-13 Thread Jeff Law
On 12/13/18 12:49 AM, Jakub Jelinek wrote: > Hi! > > On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: >> Note that split-path-5 has the same basic structure. A half-diamond >> with a single statement in the middle block that should be trivially >> if-convertable if profitable. So I adju

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-13 Thread Jeff Law
On 12/12/18 8:50 PM, bin.cheng wrote: > Hi, > > Due to ICE and mal-functional bugs, indirect call value profile transformation > is disabled on GCC-7/8/trunk. This patch restores the transformation. The > main issue is AutoFDO should store cgraph_node's profile_id of callee func in > the first h

Re: [PATCH] Fix cleanup_auto_inc_dec on x86 (PR rtl-optimization/88416)

2018-12-13 Thread Jeff Law
On 12/11/18 9:43 AM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, x86 (maybe a couple of other targets) isn't an > AUTO_INC_DEC target, it doesn't have REG_INC notes nor wants the generic > code to synthetize any pre/post inc/dec/modify, but does support push/pop > patterns that use thos

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Jeff Law
On 12/5/18 8:55 PM, Martin Sebor wrote: > The __builtin_has_attribute function fails with an ICE when > its first argument is an expression such as INDIRECT_REF, or > many others.  The code simply assumes it's either a type or > a decl.  The attached patch corrects this oversight. > > While testin

Re: [PATCH 1/3][GCC] Add new target hook asm_post_cfi_startproc

2018-12-13 Thread Jason Merrill
On 11/5/18 5:18 AM, Sam Tebbs wrote: On 11/05/2018 07:54 AM, Richard Biener wrote: On Fri, 2 Nov 2018, Sam Tebbs wrote: On 11/02/2018 05:28 PM, Sam Tebbs wrote: Hi all, This patch adds a new target hook called "asm_post_cfi_startproc". This hook is intended to be used by the aarch64 backe

Re: [PATCH AutoFDO/4]Fix profile count computation/propagation.

2018-12-13 Thread Jeff Law
On 12/10/18 6:36 PM, Bin.Cheng wrote: > On Thu, Nov 8, 2018 at 6:33 AM Jeff Law wrote: >> On 10/31/18 12:34 AM, bin.cheng wrote: >>> Hi, >>> This patch fixes AutoFDO breakage on trunk. The main reason for breakage >>> is AutoFDO >>> relies on standalone edge count computing and propagating profi

[PATCH/doc] consistently use @code for const and volatile qualifiers

2018-12-13 Thread Martin Sebor
As we discussed, the manual isn't completely consistent in its use of @code for const and volatile qualifiers. I made a pass through extend.texi and added @code wherever it seemed to be missing. This doesn't mean all uses but only those that specifically refer to the qualifiers. In terms like "

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Martin Sebor
On 12/13/18 11:59 AM, Jeff Law wrote: On 12/5/18 8:55 PM, Martin Sebor wrote: The __builtin_has_attribute function fails with an ICE when its first argument is an expression such as INDIRECT_REF, or many others.  The code simply assumes it's either a type or a decl.  The attached patch corrects 

[PATCH] v4: C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-12-13 Thread David Malcolm
On Wed, 2018-12-12 at 15:37 -0500, Jason Merrill wrote: > On 12/7/18 3:13 PM, David Malcolm wrote: > > On Tue, 2018-12-04 at 18:31 -0500, Jason Merrill wrote: > > > On 12/3/18 5:10 PM, Jeff Law wrote: > > > > On 11/19/18 9:51 AM, David Malcolm wrote: > > > > [...] > > > > @@ -1058,6 +1058,9 @@ gro

[PATCH, rs6000] Replace X-form addressing with D-form addressing in new pass for Power9

2018-12-13 Thread Kelvin Nilsen
This patch is a refinement of a path first submitted to this list on Nov. 10, 2018. This new patch incorporates improvements suggested by seg...@gcc.gnu.org. Two regression observed at the time this patch was previously distributed have been resolved as described here: https://sourceware.or

Re: [PATCH] rs6000: Fix AIX aggregate passing fix

2018-12-13 Thread David Edelsohn
On Tue, Dec 4, 2018 at 7:26 PM Segher Boessenkool wrote: > > David's fix for the AIX aggregate passing from yesterday unfortunately > also triggers on powerpc64-linux. This fixes it. > > David, looking at this once more, does this not need a "&& type" test > on AIX? Before the AGGREGATE_TYPE_P t

Re: [PATCH/doc] consistently use @code for const and volatile qualifiers

2018-12-13 Thread Jeff Law
On 12/13/18 12:10 PM, Martin Sebor wrote: > As we discussed, the manual isn't completely consistent in its > use of @code for const and volatile qualifiers.  I made a pass > through extend.texi and added @code wherever it seemed to be > missing.  This doesn't mean all uses but only those that > spe

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Martin Sebor
On 12/13/18 12:20 PM, Martin Sebor wrote: On 12/13/18 11:59 AM, Jeff Law wrote: On 12/5/18 8:55 PM, Martin Sebor wrote: The __builtin_has_attribute function fails with an ICE when its first argument is an expression such as INDIRECT_REF, or many others.  The code simply assumes it's either a ty

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 12:48:18PM -0700, Martin Sebor wrote: > > The support is necessary in order to determine the attributes > > in expressions such as: > > > >   struct S { __attribute__ ((packed)) int a[32]; }; > > > >   extern struct S s; > > > >   _Static_assert (__builtin_has_attribut

Re: [C++ PATCH] Fix up __builtin_is_constant_evaluated handling in array type sizes (PR c++/88446)

2018-12-13 Thread Jason Merrill
On 12/11/18 3:35 PM, Marek Polacek wrote: On Tue, Dec 11, 2018 at 05:39:25PM +0100, Jakub Jelinek wrote: Hi! As mentioned in the PR, while we allow VLAs in some contexts in C++ as an extension, they aren't standard and the standard requires in those spots constant expressions, thus __builtin_is

Re: [C++ PATCH] Fix up __builtin_is_constant_evaluated handling in array type sizes (PR c++/88446)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 03:05:10PM -0500, Jason Merrill wrote: > > Perhaps use /*pretend_const_required=*/true? > > Please. And the name of the parameter should change to match the other > patches. OK with those changes. You've already acked a newer version of that patch that has that in and cu

Re: [PATCH] PR libstdc++/71044 optimize std::filesystem::path construction

2018-12-13 Thread Jonathan Wakely
On 12/12/18 17:22 +, Jonathan Wakely wrote: This new implementation has a smaller footprint than the previous implementation, due to replacing std::vector<_Cmpt> with a custom pimpl type that only needs a single pointer. The _M_type enumeration is also combined with the pimpl type, by using a

[PATCH] Fix handling of POSIX paths containing a root-name

2018-12-13 Thread Jonathan Wakely
Fix path appending and concatenating to work correctly for a leading root-name. Check a new macro, SLASHSLASH_IS_ROOT_NAME, instead of making the behaviour depend directly on __CYGWIN__. * src/filesystem/std-path.cc (SLASHSLASH_IS_ROOT_NAME): New macro to control whether interpret

Re: [PATCH] v4: C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-12-13 Thread Jason Merrill
On 12/13/18 3:12 PM, David Malcolm wrote: On Wed, 2018-12-12 at 15:37 -0500, Jason Merrill wrote: On 12/7/18 3:13 PM, David Malcolm wrote: On Tue, 2018-12-04 at 18:31 -0500, Jason Merrill wrote: On 12/3/18 5:10 PM, Jeff Law wrote: On 11/19/18 9:51 AM, David Malcolm wrote: [...] @@ -1058,6

Re: C++ PATCH for c++/88216, ICE with class type in non-type template parameter

2018-12-13 Thread Jason Merrill
On 12/11/18 4:05 PM, Marek Polacek wrote: On Tue, Dec 11, 2018 at 10:48:17AM -0500, Jason Merrill wrote: On 12/10/18 2:52 PM, Marek Polacek wrote: + if (processing_template_decl && value_dependent_expression_p (expr)) You don't need to check processing_template_decl before value_dependent_ex

Re: V4 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-13 Thread Jason Merrill
On 9/25/18 11:46 AM, H.J. Lu wrote: On Fri, Aug 31, 2018 at 2:04 PM, Jason Merrill wrote: On 07/23/2018 05:24 PM, H.J. Lu wrote: On Mon, Jun 18, 2018 at 12:26 PM, Joseph Myers wrote: On Mon, 18 Jun 2018, Jason Merrill wrote: On Mon, Jun 18, 2018 at 11:59 AM, Joseph Myers wrote: On Mon

patch to fix PR88414

2018-12-13 Thread Vladimir Makarov
The following patch fixes    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88414 The patch was bootstrapped and tested on x86-64. Committed as rev. 267109. Index: ChangeLog === --- ChangeLog (revision 267108) +++ ChangeLog (working

Re: [PATCH] [RFC] PR target/52813 and target/11807

2018-12-13 Thread Dimitar Dimitrov
On Thu, Dec 13, 2018 at 8:48:38 EET Segher Boessenkool wrote: > On Wed, Dec 12, 2018 at 06:26:10PM +0200, Dimitar Dimitrov wrote: > > I expect that if I mark a HW register as "clobber", compiler would save > > its > > contents before executing the asm statement, and after that it would > > restore

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Martin Sebor
On 12/13/18 12:56 PM, Jakub Jelinek wrote: On Thu, Dec 13, 2018 at 12:48:18PM -0700, Martin Sebor wrote: The support is necessary in order to determine the attributes in expressions such as:   struct S { __attribute__ ((packed)) int a[32]; };   extern struct S s;   _Static_assert (__bui

Re: [C++ Patch] PR 84644 ("internal compiler error: in warn_misplaced_attr_for_class_type, at cp/decl.c:4718")

2018-12-13 Thread Jason Merrill
On 10/30/18 9:22 PM, Paolo Carlini wrote: Hi, On 30/10/18 21:37, Jason Merrill wrote: On 10/26/18 2:02 PM, Paolo Carlini wrote: On 26/10/18 17:18, Jason Merrill wrote: On Fri, Oct 26, 2018 at 4:52 AM Paolo Carlini wrote: On 24/10/18 22:41, Jason Merrill wrote: On 10/15/18 12:45 PM, Paolo C

Re: [doc,committed] clarify docs for function attribute "const"

2018-12-13 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00426.html (I have now committed the @code{const} cleanup mentioned below.) On 12/6/18 6:12 PM, Martin Sebor wrote: On 12/3/18 11:04 PM, Sandra Loosemore wrote: On 12/3/18 2:47 PM, Martin Sebor wrote: [snip] Attached is my proposed update. 

[PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jakub Jelinek
Hi! The following testcase ICEs, because we have an indirect jump with a single (fake) successor edge to EXIT, one reachable from the body of the function after prologue and another one reachable from before the prologue (due to shrink-wrapping). The patch fixes this by disallowing crossjumping o

[PATCH] Fix stmt folding in the inliner (PR tree-optimization/88444)

2018-12-13 Thread Jakub Jelinek
Hi! The inliner doesn't want to fold statements immediately, but records them and then fold_marked_statements is meant to fold them when inlining is done. On the following testcase it doesn't fold some of them though. The problem is that it wants to scan only newly added basic blocks (i.e. those

[C++ PATCH] Use RANGE_EXPRs in build_vec_init (PR c++/82294, PR c++/87436)

2018-12-13 Thread Jakub Jelinek
Hi! The following patch makes use of RANGE_EXPRs in build_vec_init, instead of appending many ctor elements. E.g. on the PR87436 testcase the memory usage goes down from more than 5GB to a few megabytes and compile time decreases significantly too. Bootstrapped/regtested on x86_64-linux and i686

[PATCH] Improve gimplification of constructors with RANGE_EXPRs (PR c++/82294, PR c++/87436)

2018-12-13 Thread Jakub Jelinek
Hi! With the previously posted patch to use RANGE_EXPRs in build_vec_init, the following patch attempts to do what the reporters were asking for - determine if it wouldn't be more efficient to use (perhaps nested) loops to initialize at runtime some automatic variable over having huge .rodata cons

Re: [PATCH] Fix stmt folding in the inliner (PR tree-optimization/88444)

2018-12-13 Thread Jeff Law
On 12/13/18 3:59 PM, Jakub Jelinek wrote: > Hi! > > The inliner doesn't want to fold statements immediately, but records them > and then fold_marked_statements is meant to fold them when inlining is done. > > On the following testcase it doesn't fold some of them though. > The problem is that it

Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jeff Law
On 12/13/18 3:53 PM, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs, because we have an indirect jump with > a single (fake) successor edge to EXIT, one reachable from the body > of the function after prologue and another one reachable from before the > prologue (due to shrink-wrapping

[C++ PATCH] Sanity check __cxa_* user declarations (PR c++/88482)

2018-12-13 Thread Jakub Jelinek
Hi! If the user provides his own __cxa_* prototypes and does so incorrectly (or even worse declares them as variables etc.), we can get various ICEs. The following patch adds some sanity checking, mainly that they are actually functions and with a compatible return type and argument type(s). For

Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 04:28:10PM -0700, Jeff Law wrote: > > 2018-12-13 Jakub Jelinek > > > > PR rtl-optimization/88470 > > * cfgcleanup.c (outgoing_edges_match): If the function is > > shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake > > edge to EXIT, return fal

[PATCH/wwwdocs] add uses of @code to coding conventions

2018-12-13 Thread Martin Sebor
Attached is the update I propose to add to the Spelling, terminology and markup section of the Coding conventions, to give guidance for when to use the @code{} Texinfo command. I believe this reflects existing (if somewhat inconsistent) practice. It's not intended to add a new requirement. Mart

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-13 Thread Jeff Law
On 12/12/18 11:12 AM, Uecker, Martin wrote: > > Hi Jeff, > > thank you. I fixed all the minor issues, but see below. > > > Am Montag, den 03.12.2018, 14:56 -0700 schrieb Jeff Law: >> On 11/4/18 1:48 PM, Uecker, Martin wrote: >>> Hi Joseph, >>> >>> here is a new version of this patch which adds

Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jeff Law
On 12/13/18 4:32 PM, Jakub Jelinek wrote: > On Thu, Dec 13, 2018 at 04:28:10PM -0700, Jeff Law wrote: >>> 2018-12-13 Jakub Jelinek >>> >>> PR rtl-optimization/88470 >>> * cfgcleanup.c (outgoing_edges_match): If the function is >>> shrink-wrapped and bb1 ends with a JUMP_INSN with a s

Re: [PATCH/wwwdocs] add uses of @code to coding conventions

2018-12-13 Thread Jeff Law
On 12/13/18 4:34 PM, Martin Sebor wrote: > Attached is the update I propose to add to the Spelling, > terminology and markup section of the Coding conventions, to > give guidance for when to use the @code{} Texinfo command. >  I believe this reflects existing (if somewhat inconsistent) > practice. 

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 02:05:29PM -0700, Martin Sebor wrote: > > So how is the builtin defined then? Is the argument always an expression > > and you only return whether its type has the attribute, or do something > > different if the expression is of certain kind? > > For a DECL the built-in lo

Re: [PATCH 01/10] Fix LRA bug

2018-12-13 Thread Jeff Law
On 12/12/18 4:52 AM, Andrew Stubbs wrote: > > [This is new patch not included in the previously posted patch sets.] > > This patch fixes an ICE building libgfortran/random.c. > > The problem was an adddi3 instruction that had an eliminable frame pointer. > GCN adddi3 includes a match_scratch, wh

  1   2   >