[PATCH] Adapt a couple of scalar comparison match.pd optimizations for vector comparisons against uniform vectors (PR target/88152)

2018-11-28 Thread Jakub Jelinek
Hi! The following patch adapts a couple of scalar comparison against INTEGER_CST optimizations to vector comparison against uniform_vector_p VECTOR_CST. The PR was specifically asking for the a > INT_MAX, a >= INT_MAX etc. to (signed) a < 0, the first two hunks are prerequsites of that though in

Re: [C++ PATCH] Fix clone_body (PR c++/86669)

2018-11-28 Thread Jakub Jelinek
On Wed, Nov 28, 2018 at 09:42:47AM +0100, Jakub Jelinek wrote: > Bootstrapped/regtested on x86_64-linux and i686-linux (earlier version > without the insert_decl_map call), ok for trunk if it passes another > bootstrap/regtest in the current form? FYI, bootstrapped/regtested successfully on both.

Re: RFA: a x86 test modification

2018-11-28 Thread Uros Bizjak
On Thu, Nov 29, 2018 at 12:43 AM Jeff Law wrote: > > On 11/28/18 2:47 PM, Vladimir Makarov wrote: > > The patch I committed today recently for > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88207 > > > > creates a new regression for pr34256.c. 2 moves is expected but gcc > > with the

[PATCH v5] Repeat jump threading after combine

2018-11-28 Thread Ilya Leoshkevich
Repost of v4: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg02067.html Bootstrapped and regtested on x86_64-redhat-linux, s390x-redhat-linux and ppc64le-redhat-linux. Consider the following RTL: (insn (set (reg 65) (if_then_else (eq %cc 0) 1 0))) (insn (parallel [(set %cc (compare (reg 65) 0))

Re: [PATCH 5/6] [RS6000] Use standard call patterns for __tls_get_addr calls

2018-11-28 Thread Alan Modra
On Wed, Nov 28, 2018 at 07:32:50AM -0600, Segher Boessenkool wrote: > On Wed, Nov 28, 2018 at 11:37:42AM +1030, Alan Modra wrote: > > On Tue, Nov 27, 2018 at 10:29:29AM -0600, Segher Boessenkool wrote: > > > Looks fine. Thank you for the cleanup! Okay for trunk, but please do the > > > extra

Re: Fix hashtable node deallocation

2018-11-28 Thread François Dumont
I am unclear about this patch, is it accepted ? On 11/19/18 10:19 PM, François Dumont wrote: On 11/19/18 1:34 PM, Jonathan Wakely wrote: On 10/11/18 22:40 +0100, François Dumont wrote: While working on a hashtable enhancement I noticed that we are not using the correct method to deallocate

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-28 Thread Jeff Law
On 11/20/18 8:28 AM, Martin Sebor wrote: > On 11/20/2018 02:21 AM, Richard Biener wrote: >> On Mon, Nov 19, 2018 at 4:36 PM Martin Sebor wrote: >>> >>> On 11/19/2018 03:32 AM, Richard Biener wrote: On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: > > To encourage and simplify

Re: [PATCH v4] Add sinh(atanh(x)) and cosh(atanh(x)) optimizations

2018-11-28 Thread Jeff Law
On 11/27/18 12:38 PM, Giuliano Augusto Faulin Belinassi wrote: > Only do this optimization if funsafe-math and -fno-math-errno are > enabled, as pointed in the previous iteration. > > Also added one more test case to ensure that fno-math-errno is > required for the optimization. > > Special

Re: [PATCH 1/4] introduce struct strlen_data_t into gimple-fold

2018-11-28 Thread Jeff Law
On 11/25/18 5:05 PM, Martin Sebor wrote: > >> If so, then I think we need >> to look for a better name than MAXSIZE and MAXLEN. > > I find these names quite fitting and I'm not sure what might work > better.  I renamed MAXSIZE to MAXBOUND but nothing comes to mind > as a replacement for MAXLEN. 

Re: [PATCH] be more permissive about function alignments (PR 88208)

2018-11-28 Thread Jeff Law
On 11/27/18 9:32 PM, Martin Sebor wrote: > The tests for the new __builtin_has_attribute function have been > failing on a number of targets because of a couple of assumptions > that only hold on some. > > First, they expect that it's safe to apply attribute aligned with > a smaller alignment 

Re: [PATCH] Add testcase for already fixed PR c++/87539

2018-11-28 Thread Jason Merrill
On 11/28/18 3:13 AM, Jakub Jelinek wrote: Hi! The PR86687 fix fixed ICE on the following testcase on mingw. Because the PR was about fixing debug info, I think it is worth adding this testcase to the testsuite. The testcase is as far as creduce managed to reduce it after almost 18 hours.

Re: [PING][PATCH] correct handling of EXCESS_PRECISION_EXPR in function calls (PR 88091)

2018-11-28 Thread Jeff Law
On 11/28/18 5:05 PM, Martin Sebor wrote: > On 11/27/18 10:47 AM, Joseph Myers wrote: >> On Mon, 26 Nov 2018, Martin Sebor wrote: >> >>> Ping: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01674.html >> >> This patch needs an update to the comment on convert_argument to explain >> the semantics of 

Re: C++ PATCH for c++/88184, ICE when treating name as template-name

2018-11-28 Thread Jason Merrill
On 11/28/18 10:48 AM, Marek Polacek wrote: Since P0846R0 was implemented, a name will be treated as a template-name when it is an unqualified-id followed by a < and name lookup finds either one or more functions or finds nothing, in order to potentially cause ADL to be performed. In this case,

Re: [PATCH v4] Repeat jump threading after combine

2018-11-28 Thread Jeff Law
On 11/28/18 1:51 PM, Segher Boessenkool wrote: > Hi! > > On Tue, Nov 27, 2018 at 05:07:11PM +0100, Ilya Leoshkevich wrote: >> perf diff -c wdiff:1,1 shows, that there is just one function >> (htab_traverse) that is significantly slower now: >> >> 2.98% 11768891764 exe[.]

Re: [PATCH] [PR86397] set p_t_decl while canonicalizing eh specs for mangling

2018-11-28 Thread Jason Merrill
On 11/27/18 11:54 PM, Alexandre Oliva wrote: On Nov 27, 2018, Jason Merrill wrote: On 11/22/18 6:40 PM, Alexandre Oliva wrote: Mangling visits the base template function type, prior to template resolution, and on such types, exception specifications may contain unresolved noexcept

Re: [PATCH, rs6000] Fix PR87496: ICE in aggregate_value_p at gcc/function.c:2046

2018-11-28 Thread Peter Bergner
On 11/28/18 3:27 PM, Peter Bergner wrote: > Ok for mainline once bootstrap and regtesting are complete and clean? > > Peter > > > gcc/ > PR target/87496 > * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow > -mabi=ieeelongdouble without both -mpopcntd and

Re: [C++ PATCH] Fix wrong-code with generic lambda (PR c++/86943)

2018-11-28 Thread Jason Merrill
On 11/27/18 5:41 PM, Jakub Jelinek wrote: On Tue, Nov 27, 2018 at 05:20:56PM -0500, Jason Merrill wrote: On 11/23/18 4:15 PM, Jakub Jelinek wrote: Hi! On the following testcase, the call to operator () is marked as CALL_FROM_THUNK_P and therefore genericization ignores all subtrees thereof.

Re: [C++ Patch] Improve compute_array_index_type locations

2018-11-28 Thread Jason Merrill
On 11/6/18 4:01 AM, Paolo Carlini wrote: when I improved create_array_type_for_decl I didn't notice that it calls compute_array_index_type as helper, which simply needs to have the location information propagated. Tested x86_64-linux. This looks like it will use the declarator-id location in

[PATCH] PR libstdc++/86910 fix filesystem::create_directories

2018-11-28 Thread Jonathan Wakely
Implement the proposed semantics from P1164R0, which reverts the changes of LWG 2935. This means that failure to create a directory because a non-directory already exists with that name will be reported as an error. While rewriting the function, also fix PR 87846, which is a result of the C++17

Re: [PATCH, libstdc++] Uniform container erasure for c++20.

2018-11-28 Thread Jonathan Wakely
On 28/11/18 12:12 -0500, Ed Smith-Rowland wrote: Index: testsuite/21_strings/basic_string/erasure.cc === --- testsuite/21_strings/basic_string/erasure.cc(nonexistent) +++ testsuite/21_strings/basic_string/erasure.cc

Re: [PING][PATCH] correct handling of EXCESS_PRECISION_EXPR in function calls (PR 88091)

2018-11-28 Thread Martin Sebor
On 11/27/18 10:47 AM, Joseph Myers wrote: On Mon, 26 Nov 2018, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01674.html This patch needs an update to the comment on convert_argument to explain the semantics of the new valtype parameter and how it differs from the

Re: [RS6000] CONST_DOUBLE tidy

2018-11-28 Thread Segher Boessenkool
On Thu, Nov 29, 2018 at 10:18:40AM +1030, Alan Modra wrote: > On Wed, Nov 28, 2018 at 12:14:55PM -0600, Segher Boessenkool wrote: > > On Sun, Nov 25, 2018 at 10:46:28PM +1030, Alan Modra wrote: > > > - /* If we are using V.4 style PIC, consider all constants to be hard. > > > */ > > > - if

Re: [RS6000] CONST_DOUBLE tidy

2018-11-28 Thread Alan Modra
On Wed, Nov 28, 2018 at 12:14:55PM -0600, Segher Boessenkool wrote: > On Sun, Nov 25, 2018 at 10:46:28PM +1030, Alan Modra wrote: > > - /* If we are using V.4 style PIC, consider all constants to be hard. */ > > - if (flag_pic && DEFAULT_ABI == ABI_V4) > > -return 0; > > Did you remove

Re: RFA: a x86 test modification

2018-11-28 Thread Jeff Law
On 11/28/18 2:47 PM, Vladimir Makarov wrote: >   The patch I committed today recently for > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88207 > >   creates a new regression for pr34256.c.  2 moves is expected but gcc > with the patch generates 3 moves.  I think now RA generates the right 

Re: [PATCH/coding style] clarify pointers and operators

2018-11-28 Thread Martin Sebor
On 11/27/18 10:20 PM, Sandra Loosemore wrote: On 11/26/18 10:59 AM, Martin Sebor wrote: Martin suggested we update the Coding Conventions to describe the expected style for function declarations with a pointer return types, and for overloaded operators.  Below is the patch. As an aside,

[PATCH] Restore aarch64 support for asm ("# %a0" : : "i" (0)) (PR target/87598)

2018-11-28 Thread Jakub Jelinek
Hi! As mentioned in the PR, aarch64 used to allow VOIDmode CONST_INTs as %aN operands, but r255230 started ICEing on it and r257907 turned that ICE into error (output_operand_lossage). The following patch restores the previous behavior, by allowing such CONST_INTs through. They will fail

Re: [RS6000] "G" and "H" constraints

2018-11-28 Thread Alan Modra
On Wed, Nov 28, 2018 at 11:55:21AM -0600, Segher Boessenkool wrote: > > (define_constraint "G" > > - "Constant that can be copied into GPR with two insns for DF/DI > > - and one for SF." > > + "Constant that can be copied into GPR with two insns for DF/DD > > + and one for SF/SD." > >

Re: [PATCH 1/5][libbacktrace] Factor out backtrace_vector_free

2018-11-28 Thread Ian Lance Taylor via gcc-patches
On Wed, Nov 28, 2018 at 3:15 PM, Tom de Vries wrote: > > this patch factors out new function backtrace_vector_free. > > Bootstrapped and reg-tested on x86_64. > > OK for trunk? We should only add new files if we really absolutely must, as this package is copied around to a lot of places (e.g.,

[PATCH 5/5][libbacktrace] Reduce memory usage in build_address_map

2018-11-28 Thread Tom de Vries
Hi, In build_address_map we allocate a unit, and then look for addresses in the unit, which we store in the addrs vector, with the elements pointing to the unit. However, if we cannot find addresses in the unit, the allocated unit is not used. Fix this by detecting if the allocated unit has

[PATCH 4/5][libbacktrace] Simplify memory management in build_address_map

2018-11-28 Thread Tom de Vries
Hi, In the main loop in build_address_map, we first read the abbrevs into a local variable abbrevs, and then allocate the corresponding unit, after which we assign the abbrevs to the unit. This results in dedicated free-upon-failure handling for the variable, and extra code to make sure that

[PATCH 3/5][libbacktrace] Fix memory leak in loop in build_address_map

2018-11-28 Thread Tom de Vries
Hi, When failing in build_address_map, we free the unit that's currently being handled in the loop, but the ones that already have been allocated are leaked. Fix this by keeping track of allocated units in a vector, and releasing them upon failure. Also, now that we have a vector of allocated

[PATCH 1/5][libbacktrace] Factor out backtrace_vector_free

2018-11-28 Thread Tom de Vries
Hi, this patch factors out new function backtrace_vector_free. Bootstrapped and reg-tested on x86_64. OK for trunk? Thanks, - Tom [libbacktrace] Factor out backtrace_vector_free 2018-11-28 Tom de Vries * Makefile.am (libbacktrace_la_SOURCES): Add backtrace-vector. *

[PATCH 2/5][libbacktrace] Fix memory leak in build_address_map

2018-11-28 Thread Tom de Vries
Hi, While upon failure in build_address_map we call free_unit_addrs_vector, this does not actually free the addrs vector, but merely the abbrevs of the units pointed at by the elements of the addrs vector. Fix this by adding code to build_address_map to make sure that the addrs vector is freed

Re: [PATCH] avoid error_mark_node in -Wsizeof-pointer-memaccess (PR 88065)

2018-11-28 Thread Martin Sebor
On 11/21/18 3:04 AM, Jakub Jelinek wrote: On Tue, Nov 20, 2018 at 12:39:44AM +0100, Jakub Jelinek wrote: On Mon, Nov 19, 2018 at 04:10:09PM -0700, Jeff Law wrote: PR c/88065 - ICE in -Wsizeof-pointer-memaccess on an invalid strncpy gcc/c-family/ChangeLog: PR c/88065 Please also add

Re: [PATCH] PR libstdc++/67843 set shared_ptr lock policy at build-time

2018-11-28 Thread Hans-Peter Nilsson
> Date: Tue, 27 Nov 2018 23:25:55 + > From: Jonathan Wakely > This resolves a longstanding issue where the lock policy for shared_ptr > reference counting depends on compilation options when the header is > included, so that different -march options can cause ABI > changes. > [...] Thank you

Re: [PATCH 5/6] [RS6000] Use standard call patterns for __tls_get_addr calls

2018-11-28 Thread Alan Modra
On Wed, Nov 28, 2018 at 07:32:50AM -0600, Segher Boessenkool wrote: > On Wed, Nov 28, 2018 at 11:37:42AM +1030, Alan Modra wrote: > > On Tue, Nov 27, 2018 at 10:29:29AM -0600, Segher Boessenkool wrote: > > > Do you think we should to deprecate -mtls-markers in GCC 9? > > > > Support for the TLS

Re: [PATCH] Fix PR68212, unrolled loop no longer aligned

2018-11-28 Thread Jan Hubicka
> 2018-11-28 Pat Haugen > > PR rtl-optimization/68212 > * cfgloopmanip.c (duplicate_loop_to_header_edge): Adjust scale factor. > > testsuite/ChangeLog: > 2018-11-28 Pat Haugen > > PR rtl-optimization/68212 > * gcc.dg/pr68212.c: New test. > > > > Index:

Re: [PATCH v3] Make function clone name numbering independent.

2018-11-28 Thread Segher Boessenkool
Hi! On Wed, Nov 28, 2018 at 04:09:14PM -0500, Michael Ploujnikov wrote: > I've also included a small change to rs6000 which I'm pretty sure is > safe, but I have no way of testing. Do you have an account on the GCC Compile Farm? https://cfarm.tetaneutral.net/ There are some nice Power machines

Re: [PATCH, V2, d] Fix IdentityExp comparison for complex floats

2018-11-28 Thread Iain Buclaw
On Wed, 28 Nov 2018 at 22:32, Johannes Pfau wrote: > > Next version, addresses the review comments. > > Tested at https://github.com/D-Programming-GDC/GDC/pull/768 > --- > gcc/d/ChangeLog: > > 2018-11-28 Johannes Pfau > > * expr.cc (ExprVisitor::visit(IdentityExp)): Add support for

Re: [testsuite] Require ucn support in gdc.test/compilable/ddoc12.d (PR d/88039)

2018-11-28 Thread Iain Buclaw
On Tue, 27 Nov 2018 at 20:32, Rainer Orth wrote: > > Hi Mike, > > > On Nov 27, 2018, at 2:18 AM, Rainer Orth > > wrote: > >> > >> Some assemblers, including the Solaris one, don't support UTF-8 > >> identifiers, which breaks the gdc.test/compilable/ddoc12.d testcase as > >> reported in the PR.

Re: [RS6000] PR11848 rs6000_emit_move long double split

2018-11-28 Thread Segher Boessenkool
On Sun, Nov 25, 2018 at 10:52:08PM +1030, Alan Modra wrote: > This split is disabled for power7 and up, so we don't often see its > bad effects. However, on a powerpc-linux compiler (which defaults > to PPC750 judging from rs6000/sysv4.h) we see > > long double ld1 (void) { return 1.0L; }

Re: C++ PATCH to implement C++20 P0634R3, Down with typename!

2018-11-28 Thread Jason Merrill
On 11/12/18 10:27 AM, Marek Polacek wrote: This patch implements C++20 P0634R3, Down with typename! which makes 'typename' optional in several contexts specified in [temp.res]. The gist of the patch is in

Re: [RS6000] movdi_internal64 insn lengths

2018-11-28 Thread Segher Boessenkool
On Sun, Nov 25, 2018 at 10:47:53PM +1030, Alan Modra wrote: > Fixes alternatives wi<-Oj (xxlxor), wi<-wM (xxlorc) and wv<-wS. > Bootstrapped etc. powerpc64le-linux. Okay for trunk, thanks! (For the record, wv<-wS is xxsltib+extend). Segher > * config/rs6000/rs6000.md

[PATCH, libphobos] Committed merge common version blocks using arch_any conditions

2018-11-28 Thread Iain Buclaw
Hi, This patch is backported from druntime master. It sets a precedence in upstream for merging architecture agnostic C bindings into one block, rather than separate duplicated blocks. A nice side-effect is it almost completes the C bindings for s390-linux-gnu and sparc-linux-gnu, and fixes a

RFA: a x86 test modification

2018-11-28 Thread Vladimir Makarov
  The patch I committed today recently for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88207   creates a new regression for pr34256.c.  2 moves is expected but gcc with the patch generates 3 moves.  I think now RA generates the right code. We have the following code before RA (insn 7 6 13

[PATCH 1/2, d] Fix hashing of complex reals

2018-11-28 Thread Johannes Pfau
Hashing of complex types where the floating point type used for the real and imaginary parts has padding (such as X86 80 bit reals) has padding, is currently broken in druntime. Fixed by backporting https://github.com/dlang/druntime/pull/2356 from druntime commit

[PATCH 2/2, d] Enable tests for rt.util.typeinfo and core.internal.convert

2018-11-28 Thread Johannes Pfau
With these backports, these tests now pass for GDC and we don't need the special cases in the Makefiles anymore. -- Johannes --- libphobos/ChangeLog: 2018-11-28 Johannes Pfau * libdruntime/Makefile.am: Test rt.util.typeinfo and core.internal.convert. *

[PATCH, V2, d] Fix IdentityExp comparison for complex floats

2018-11-28 Thread Johannes Pfau
Next version, addresses the review comments. Tested at https://github.com/D-Programming-GDC/GDC/pull/768 --- gcc/d/ChangeLog: 2018-11-28 Johannes Pfau * expr.cc (ExprVisitor::visit(IdentityExp)): Add support for complex types. (build_float_identity): New function.

[PATCH] Fix PR68212, unrolled loop no longer aligned

2018-11-28 Thread Pat Haugen
The following patch fixes the case where unrolling in the absence of profile information can cause a loop to no longer look hot and therefor not get aligned. In this case, instead of dividing by the unroll factor we now just scale by profile_probability::likely (). The diff looks worse than

[PATCH, rs6000] Fix PR87496: ICE in aggregate_value_p at gcc/function.c:2046

2018-11-28 Thread Peter Bergner
PR87496 shows a bug where we ICE if we attempt to use -mabi=ieeelongdouble and -mno-popcntd. The IEEE128 support requires full ISA 2.06 (aka POWER7) support, so we really should throw an error when using those options together. Ditto for -mabi=ieeelongdouble and -mno-vsx. The patch below does

[PATCH 1/2] [og8] Further OpenACC reference-counting improvements

2018-11-28 Thread Julian Brown
This is the main set of improvements to reference-counting behaviour (see parent email for further details). ChangeLog libgomp/ * libgomp.h (splay_tree_key_s): Substitute dynamic_refcount field for virtual_refcount. (acc_dispatch_t): Remove data_environ field.

[PATCH 0/2] [og8] Further OpenACC/libgomp refcounting fixes

2018-11-28 Thread Julian Brown
As mentioned in: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01773.html I had a few more changes planned for the reference-counting implementation for OpenACC in libgomp. These are embodied in this patch series. The highlights are: - reference counts in the linked memory-mapping splay tree

[PATCH 2/2] [og8] OpenACC reference count consistency checking

2018-11-28 Thread Julian Brown
This is the reference count consistency-checking code. The model used for checking is as follows. 1. Each splay tree key that references a target memory descriptor increases that descriptor's refcount by 1. 2. Each variable listed in a target memory descriptor that links back to a

[PATCH v3] Make function clone name numbering independent.

2018-11-28 Thread Michael Ploujnikov
Continuing from https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00228.html It took longer than expected, but I've finally rebased this on top of the new clone_function_name* API and included the requested optimizations. There are a few remaining spots where we could probably apply similar

Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.

2018-11-28 Thread Segher Boessenkool
On Tue, Nov 27, 2018 at 08:54:07PM +0100, Mark Wielaard wrote: > On Tue, 2018-11-27 at 12:37 -0600, Segher Boessenkool wrote: > > > Define a new target macro TARGET_HAS_DEFAULT_NOEXEC_STACK for those > > > targets > > > that have a non-executable default stack based on when they call > > >

Re: [PATCH v4] Repeat jump threading after combine

2018-11-28 Thread Segher Boessenkool
Hi! On Tue, Nov 27, 2018 at 05:07:11PM +0100, Ilya Leoshkevich wrote: > perf diff -c wdiff:1,1 shows, that there is just one function > (htab_traverse) that is significantly slower now: > > 2.98% 11768891764 exe[.] htab_traverse > 1.91% 563949986 exe

Re: [PING^3] Re: [PATCH 1/3] Support instrumenting returns of instrumented functions

2018-11-28 Thread Andi Kleen
On Wed, Nov 28, 2018 at 05:24:37PM +0100, Jan Hubicka wrote: > > On Wed, Nov 28, 2018 at 04:59:25PM +0100, Jan Hubicka wrote: > > > Hi, > > > I wonder how __return_loc sections work. In general it would be nice to > > > > You mean how it's used? It's for patching in/out return instrumentation >

Fix minnor issue with INTEGER_CST merging in lto.c

2018-11-28 Thread Jan Hubicka
Hi, this patch fixes handling of INTEGER_CST for lto_read_decls. The condition here ought to match conditional when tree-streamer-out and tree.c expect integer constants to be shared. Bootstrapped/regtested x86_64-linux, comitted. Honza Index: ChangeLog

Re: *ping*^2 – PR C++/88114 - PATCH for destructor not generated for "virtual ~destructor() = default"

2018-11-28 Thread Tobias Burnus
On the 25th November 2018, schrieb Tobias Burnus wrote: On 21 November 2018, Tobias Burnus wrote: Hello all, if a class contains any 'virtual ... = 0', it's an abstract class and for an abstract class, the destructor not added to the vtable. For a normal    virtual ~class() { } that's not

handle profile_probability::always better in tree-ssa-ifcombine

2018-11-28 Thread Jan Hubicka
Hi, this patch fixes similar issue in update_profile_after_ifcombine (in Jakub's testcase the conditional is first combined and later split again and in both cases we got update unnecesarily imprecise). Bootstrapped/regtested x86_64-linux, comitted. * tree-ssa-ifcombine.c

handle profile_probability::always in profile_count::split better

2018-11-28 Thread Jan Hubicka
Hi, this fixes (minor) profile updating issue which was uncovered by somewhat devilish testcase Jakub accidentally created for branch prediction code. When expanding if (cond) goto xxx; gimple stmt with probability profile_count::one into mutliple conditionals, we may end up predicting whole

Re: [PATCH][Version 3]Come up with -flive-patching master option.

2018-11-28 Thread Qing Zhao
> On Nov 28, 2018, at 9:52 AM, Jan Hubicka wrote: > >> >> 2018-11-20 qing zhao >> >> * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code. >> * common.opt: Add -flive-patching flag. >> * doc/invoke.texi: Document -flive-patching. >> * flag-types.h (enum

Re: V2 [PATCH] i386: Add pass_remove_partial_avx_dependency

2018-11-28 Thread Jan Hubicka
> On 11/28/18 12:48 PM, H.J. Lu wrote: > > On Mon, Nov 5, 2018 at 7:29 AM Jan Hubicka wrote: > >> > >>> On 11/5/18 7:21 AM, Jan Hubicka wrote: > > > > Did you mean "the nearest common dominator"? > > If the nearest common dominator appears in the loop while all uses are >

Re: V2 [PATCH] i386: Add pass_remove_partial_avx_dependency

2018-11-28 Thread Jeff Law
On 11/28/18 12:48 PM, H.J. Lu wrote: > On Mon, Nov 5, 2018 at 7:29 AM Jan Hubicka wrote: >> >>> On 11/5/18 7:21 AM, Jan Hubicka wrote: > > Did you mean "the nearest common dominator"? If the nearest common dominator appears in the loop while all uses are out of loops, this

patch to fix PR88207

2018-11-28 Thread Vladimir Makarov
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88207   The patch was tested and bootstrapped on x86/x86-64.   Committed as rev. 266582.   The patch creates one new regression on pr34256.c.  But I think gcc with the patch generates the right code.  I'll send a patch

Re: [PATCH][rs6000] better use of unaligned vsx in memset() expansion

2018-11-28 Thread Segher Boessenkool
On Wed, Nov 28, 2018 at 01:24:01PM -0600, Aaron Sawdey wrote: > The first version of this had a big bug and cleared past the requested bytes. > This version passes regstrap on ppc64le(power7/8/9), ppc64be(power6/7/8), > and ppc32(power8). > > OK for trunk (and 8 backport after a week)? > @@

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-28 Thread Jason Merrill
On Wed, Nov 28, 2018 at 11:57 AM Marek Polacek wrote: > > On Tue, Nov 27, 2018 at 04:01:46PM -0500, Jason Merrill wrote: > > > > > if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)) > > > > > { > > > > > identifier = cp_parser_identifier (parser); > > > > > @@

Re: V2 [PATCH] i386: Add pass_remove_partial_avx_dependency

2018-11-28 Thread H.J. Lu
On Mon, Nov 5, 2018 at 7:29 AM Jan Hubicka wrote: > > > On 11/5/18 7:21 AM, Jan Hubicka wrote: > > >> > > >> Did you mean "the nearest common dominator"? > > > > > > If the nearest common dominator appears in the loop while all uses are > > > out of loops, this will result in suboptimal xor

Re: C++ PATCH for c++/88222, ICE with bit-field with invalid type

2018-11-28 Thread Jason Merrill
OK. On Wed, Nov 28, 2018 at 1:48 PM Marek Polacek wrote: > > On Wed, Nov 28, 2018 at 07:35:42PM +0100, Paolo Carlini wrote: > > Hi, > > > > On 28/11/18 19:05, Marek Polacek wrote: > > > Paolo's recent commit changed > > > > > > - pedwarn (input_location, OPT_Wpedantic, > > > +

Re: [PATCH][rs6000] better use of unaligned vsx in memset() expansion

2018-11-28 Thread Aaron Sawdey
The first version of this had a big bug and cleared past the requested bytes. This version passes regstrap on ppc64le(power7/8/9), ppc64be(power6/7/8), and ppc32(power8). OK for trunk (and 8 backport after a week)? Thanks! Aaron Index: gcc/config/rs6000/rs6000-string.c

Re: C++ PATCH for c++/88222, ICE with bit-field with invalid type

2018-11-28 Thread Marek Polacek
On Wed, Nov 28, 2018 at 07:35:42PM +0100, Paolo Carlini wrote: > Hi, > > On 28/11/18 19:05, Marek Polacek wrote: > > Paolo's recent commit changed > > > > - pedwarn (input_location, OPT_Wpedantic, > > + pedwarn (declarator->id_loc, OPT_Wpedantic, > > > > but as this testcase

Re: C++ PATCH for c++/88222, ICE with bit-field with invalid type

2018-11-28 Thread Paolo Carlini
Hi, On 28/11/18 19:05, Marek Polacek wrote: Paolo's recent commit changed - pedwarn (input_location, OPT_Wpedantic, + pedwarn (declarator->id_loc, OPT_Wpedantic, but as this testcase shows, declarator might not always be present. So let's brace ourselves for that. Thanks

Re: [PATCH] clarify comments for implicit_p flag for built-ins

2018-11-28 Thread Martin Sebor
On 11/28/18 6:35 AM, Richard Biener wrote: On Tue, Nov 27, 2018 at 3:52 AM Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01759.html If there are no objections or suggestions for tweaks I'll commit this updated comment this week. Please do not commit such changes

Re: [RS6000] CONST_DOUBLE tidy

2018-11-28 Thread Segher Boessenkool
Hi! On Sun, Nov 25, 2018 at 10:46:28PM +1030, Alan Modra wrote: > Once upon a time CONST_DOUBLE was used to hold large integer constants > that didn't fit into a CONST_INT. Now that CONST_INT is always at > least 64 bits, and the rs6000 backend uses CONST_WIDE_INT for larger > integers, there is

Go patch committed: Inline functions with assignments and return statements

2018-11-28 Thread Ian Lance Taylor
This patch to the Go frontend adds support for inlining functions that contain only assignments and return statements, with expressions of either constants or parameters. Functions that contain other kinds of statements or expressions are not yet inlined. With this change, about 100 functions in

C++ PATCH for c++/88222, ICE with bit-field with invalid type

2018-11-28 Thread Marek Polacek
Paolo's recent commit changed - pedwarn (input_location, OPT_Wpedantic, + pedwarn (declarator->id_loc, OPT_Wpedantic, but as this testcase shows, declarator might not always be present. So let's brace ourselves for that. Bootstrapped/regtested on x86_64-linux, ok for trunk?

RE: [PATCH 2/9][GCC][AArch64][middle-end] Add rules to strip away unneeded type casts in expressions

2018-11-28 Thread Tamar Christina
Hi Joseph, This is an updated version of my first patch which moves part of the type conversion code from convert.c to match.pd because match.pd is able to apply this transformation in the presence of intermediate temporary variables. I couldn't move the error parts as match.pd doesn't seem to

[PATCH, libphobos] Committed update libphobos version to 2.076.1

2018-11-28 Thread Iain Buclaw
Hi, This patch merges all changes made between upstream phobos 2.076.0 and 2.076.1 versions. Consolidated the internal version number for each libgphobos and libgdruntime into libtool_VERSION as they are only ever updated in lockstep and bumped it to 76:3:0. Bootstrapped and tested on

Re: [RS6000] "G" and "H" constraints

2018-11-28 Thread Segher Boessenkool
Hi! On Sun, Nov 25, 2018 at 10:44:00PM +1030, Alan Modra wrote: > The patch fixes two cases where the "G" and "H" constraints were used > incorrectly. Their purpose is calculating insn lengths. Thus it > never makes sense to put "GH" together or with "F" in an insn > alternative. > >

RE: [PATCH 5/9][GCC][AArch64/Arm] Add auto-vectorization tests.

2018-11-28 Thread Tamar Christina
Hi James, > -Original Message- > From: James Greenhalgh > Sent: Wednesday, November 28, 2018 17:27 > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; ni...@redhat.com; Ramana Radhakrishnan > ; Kyrylo Tkachov > > Subject: Re: [PATCH

[committed] Fix H8 call pattern problems

2018-11-28 Thread Jeff Law
This fixes a minor problem with the H8 call patterns that shows up as an assembler syntax error in a couple of the c-torture tests. The H8 call patterns indicated they accepted any offsettable operand. That is not correct. It's not even close to correct. The H8 can call to a SYMBOL_REF or REG

Re: [PATCH 5/9][GCC][AArch64/Arm] Add auto-vectorization tests.

2018-11-28 Thread James Greenhalgh
On Sun, Nov 11, 2018 at 04:27:33AM -0600, Tamar Christina wrote: > Hi All, > > This patch adds tests for AArch64 and Arm to test the autovectorization > of complex numbers using the Armv8.3-a instructions. > > This patch enables them only for AArch64 at this point. > > Bootstrapped Regtested on

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

2018-11-28 Thread Sam Tebbs
On 11/21/18 4:40 PM, Sam Tebbs wrote: > On 11/2/18 6:07 PM, 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 backend to emit a directive

Re: [PATCH 4/9][GCC][AArch64/Arm] Add new testsuite directives to check complex instructions.

2018-11-28 Thread James Greenhalgh
On Sun, Nov 11, 2018 at 04:27:04AM -0600, Tamar Christina wrote: > Hi All, > > This patch adds new testsuite directive for both Arm and AArch64 to support > testing of the Complex Arithmetic operations form Armv8.3-a. > > Bootstrap and Regtest on aarch64-none-linux-gnu, arm-none-gnueabihf and >

Re: [PATCH 3/9][GCC][AArch64] Add autovectorization support for Complex instructions

2018-11-28 Thread James Greenhalgh
On Mon, Nov 12, 2018 at 06:31:45AM -0600, Tamar Christina wrote: > Hi Kyrill, > > > Hi Tamar, > > > > On 11/11/18 10:26, Tamar Christina wrote: > > > Hi All, > > > > > > This patch adds the expander support for supporting autovectorization of > > > complex number operations > > > such as

Re: [PATCH, libstdc++] Uniform container erasure for c++20.

2018-11-28 Thread Ed Smith-Rowland
On 11/26/18 6:18 AM, Jonathan Wakely wrote: On 24/11/18 13:54 -0500, Ed Smith-Rowland wrote: All, I's very late but uniform container erasure is, I think, the last little tidbit to graduate from fundamentals/v2 to std at the last meeting.  I think it would be a shame not to nudge this into

Re: [PATCH] PR libstdc++/83306 make filesystem_error no-throw copyable

2018-11-28 Thread Jonathan Wakely
On 28/11/18 16:52 +, Jonathan Wakely wrote: On 28/11/18 15:27 +, Jonathan Wakely wrote: The class API provides no way to modify the members, so we can share them between copies of the same object. Copying becomes a simple reference count update, which doesn't throw. Also adjust the

Re: [RS6000] Bogus easy_fp_constant call

2018-11-28 Thread Segher Boessenkool
On Sun, Nov 25, 2018 at 10:41:11PM +1030, Alan Modra wrote: > easy_fp_constant accepts const_double, easy_vector_constant accepts > const_vector. Calling one from the other therefore will always return > false. I believe the zero_constant call in easy_vector_constant will > cover the 0.0 case of

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-28 Thread Marek Polacek
On Tue, Nov 27, 2018 at 04:01:46PM -0500, Jason Merrill wrote: > > > > if (cp_lexer_next_token_is (parser->lexer, CPP_NAME)) > > > > { > > > > identifier = cp_parser_identifier (parser); > > > > @@ -18904,7 +18916,12 @@ cp_parser_namespace_definition (cp_parser* > > > >

Re: [PATCH][GCC][AARCH64] Replace calls to strtok with strtok_r in aarch64 attribute handling code

2018-11-28 Thread James Greenhalgh
On Fri, Nov 23, 2018 at 08:22:49AM -0600, Sam Tebbs wrote: > Hi all, > > They AArch64 general attribute handling code uses the strtok function to > separate comma-delimited attributes in a string. This causes problems for and > interfers with attribute-specific handling code that also uses strtok

[PATCH] PR libstdc++/83511 add default argument to basic_string_view::substr

2018-11-28 Thread Jonathan Wakely
PR libstdc++/83511 * include/std/string_view (basic_string_view::substr): Add default argument to first parameter. * include/experimental/string_view (basic_string_view::substr): Likewise. *

Re: [PATCH] PR libstdc++/83306 make filesystem_error no-throw copyable

2018-11-28 Thread Jonathan Wakely
On 28/11/18 15:27 +, Jonathan Wakely wrote: The class API provides no way to modify the members, so we can share them between copies of the same object. Copying becomes a simple reference count update, which doesn't throw. Also adjust the what() string to allow distinguishing between an

Re: Add a loop versioning pass

2018-11-28 Thread Richard Sandiford
Thanks for the review and sorry for the long time replying. Richard Biener writes: >> This patch adds a pass that versions loops with variable index strides >> for the case in which the stride is 1. E.g.: >> >> for (int i = 0; i < n; ++i) >> x[i * stride] = ...; >> >> becomes: >>

Re: [PATCH][AArch64][2/3] Correct type attribute for mul and mneg instructions

2018-11-28 Thread James Greenhalgh
On Mon, Nov 26, 2018 at 11:36:43AM -0600, Kyrill Tkachov wrote: > Hi all, > > In the AAarch64 ISA the MUL and MNEG instructions are actually aliases of > MADD and MSUB. > Therefore they should have the type attribute mla, rather than mul, which > should only be used > for AArch32 32-bit

Re: [PATCH][AArch64][3/3] Introduce mla64 type

2018-11-28 Thread James Greenhalgh
On Mon, Nov 26, 2018 at 11:36:47AM -0600, Kyrill Tkachov wrote: > Hi all, > > On some cores the X-register MADD/MSUB (and hence MUL and MNEG) instructions > may behave differently > than the W-register forms and the scheduling models may want to reflect that. > That is currently not possible

Re: [PATCH v3] [aarch64] Correct the maximum shift amount for shifted operands.

2018-11-28 Thread James Greenhalgh
On Wed, Nov 28, 2018 at 07:08:02AM -0600, Philipp Tomsich wrote: > > > On 28.11.2018, at 13:10, Richard Earnshaw (lists) > mailto:richard.earns...@arm.com>> wrote: > > On 26/11/2018 19:50, Christoph Muellner wrote: > The aarch64 ISA specification allows a left shift amount to be applied >

Re: [PING^3] Re: [PATCH 1/3] Support instrumenting returns of instrumented functions

2018-11-28 Thread Jan Hubicka
> On Wed, Nov 28, 2018 at 04:59:25PM +0100, Jan Hubicka wrote: > > Hi, > > I wonder how __return_loc sections work. In general it would be nice to > > You mean how it's used? It's for patching in/out return instrumentation > at runtime, and to find them we use the sections. > > > avoid direct

Re: [PATCH AutoFDO/2]Treat ZERO as common profile probability/count

2018-11-28 Thread Jan Hubicka
> On Tue, Nov 20, 2018 at 6:55 PM bin.cheng wrote: > > > > Sender:Jan Hubicka > > Sent at:2018 Nov 5 (Mon) 22:21 > > To:Richard Biener > > Cc:bin.cheng ; GCC Patches > > > > Subject:Re: [PATCH AutoFDO/2]Treat ZERO as common profile probability/count > > > > > > > > > On Wed, Oct 31, 2018 at

Re: [RS6000] Use config/linux.h for powerpc*-*-linux*

2018-11-28 Thread Segher Boessenkool
On Wed, Nov 28, 2018 at 11:54:55PM +1030, Alan Modra wrote: > On Wed, Nov 28, 2018 at 01:12:45PM +0100, Matthias Klose wrote: > > On 27.11.18 00:56, Alan Modra wrote: > > > On Mon, Nov 26, 2018 at 05:16:38PM -0600, Segher Boessenkool wrote: > > >> On Mon, Nov 12, 2018 at 09:56:37PM +1030, Alan

Re: [PING^3] Re: [PATCH 1/3] Support instrumenting returns of instrumented functions

2018-11-28 Thread Andi Kleen
On Wed, Nov 28, 2018 at 04:59:25PM +0100, Jan Hubicka wrote: > Hi, > I wonder how __return_loc sections work. In general it would be nice to You mean how it's used? It's for patching in/out return instrumentation at runtime, and to find them we use the sections. > avoid direct output of

  1   2   >