Re: [PATCH][Middle-end]2nd patch of PR78809 and PR83026

2017-12-15 Thread Qing Zhao
> On Dec 15, 2017, at 11:47 AM, Jakub Jelinek wrote: > > On Fri, Dec 15, 2017 at 11:17:37AM -0600, Qing Zhao wrote: >> HOST_WIDE_INT const_string_leni = -1; >> >> if (idx1) >>{ >> const_string_leni = compute_string_length (idx1); >> var_string = arg2; >>} >> else if (idx2)

Re: [PATCH] Fix ICE with extend_ref_init_temps of structured binding (PR c++/81197)

2017-12-15 Thread Jason Merrill
On 12/04/2017 07:00 PM, Jakub Jelinek wrote: @@ -1291,7 +1291,56 @@ write_unqualified_name (tree decl) { found = true; gcc_assert (DECL_ASSEMBLER_NAME_SET_P (decl)); - write_source_name (DECL_ASSEMBLER_NAME (decl)); + if (VAR_P (decl) + && DECL_DECOMPOSITIO

Re: [C++ RFC PATCH] Fix ICE with late attributes in templates (PR c++/83300)

2017-12-15 Thread Jason Merrill
On Fri, Dec 15, 2017 at 3:11 PM, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 03:02:50PM -0500, Jason Merrill wrote: >> On 12/07/2017 11:45 AM, Jakub Jelinek wrote: >> > save_template_attributes ignored flags, when ATTR_FLAG_TYPE_IN_PLACE >> > wasn't set on a type, it would happily attach the at

Re: [C++ PATCH] Fix ICE on invalid std::tuple_size<...>::value (PR c++/83205)

2017-12-15 Thread Jason Merrill
OK. On Fri, Dec 15, 2017 at 2:46 PM, Jakub Jelinek wrote: > On Fri, Dec 15, 2017 at 08:09:20PM +0100, Jakub Jelinek wrote: >> On Fri, Dec 15, 2017 at 02:01:36PM -0500, Jason Merrill wrote: >> > On 11/29/2017 08:19 PM, Martin Sebor wrote: >> > > On 11/29/2017 03:32 PM, Jakub Jelinek wrote: >> > >

Fix Debug insert_return_type

2017-12-15 Thread François Dumont
Here is a patch to fix those failures of the latest report: UNRESOLVED: 23_containers/map/modifiers/extract.cc compilation failed to produce executable FAIL: 23_containers/set/modifiers/extract.cc (test for excess errors) UNRESOLVED: 23_containers/set/modifiers/extract.cc compilation failed to

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Jeff Law
On 11/17/2017 08:58 AM, Richard Sandiford wrote: > This patch looks for pseudo registers that are live across a call > and for which no call-preserved hard registers exist. It then > recomputes the pseudos as necessary to ensure that they are no > longer live across a call. The comment at the hea

Re: [PATCH][Middle-end]2nd patch of PR78809 and PR83026

2017-12-15 Thread Qing Zhao
Hi, Wilco, thanks a lot for your review and comments. > On Dec 15, 2017, at 6:41 AM, Wilco Dijkstra wrote: > > Hi Qing, > > Just looking at a very high level, I have a few comments: > > 1. Constant folding str(n)cmp - folding is done separately in > fold-const-call.c > and gimple-fold.c.

Re: [PR81165] discount killed stmts when sizing blocks for threading

2017-12-15 Thread Jeff Law
On 12/11/2017 10:17 PM, Alexandre Oliva wrote: > On Dec 11, 2017, Jeff Law wrote: > >>> + gcc_assert (path->length () == 0 || path->last ()->e == e); >>> + if (path->length () == 0) >>> +return estimate_threading_killed_stmts (e->dest); >>> + >>> + int total = 0; >>> + int i = 0; >>> + j

Backports to 7.3

2017-12-15 Thread Jakub Jelinek
Hi! I've backported today following 23 patches after bootstrapping/regtesting them on x86_64-linux and i686-linux. Some of the backports are just partial backports, in particular for r255133 I've just backported the removal of case BUILT_IN_STPNCPY_CHK:, for r255354 the patch didn't apply at all,

[committed][PR tree-optimization/36550] Thread through blocks with real statements if they're all dead with -Os

2017-12-15 Thread Jeff Law
Phew. Got this one fixed before it hit its 10th birthday... pr36550 is a false positive from -Wuninitialized at -Os. When optimizing for size, jump threading is severely limited. Essentially we only thread through blocks that transfer control with no other side effects. This unnecessarily rejec

Re: [PATCH 03/14] C++: add location_t wrapper nodes during parsing (minimal impl)

2017-12-15 Thread David Malcolm
On Fri, 2017-12-15 at 13:58 -0500, Jason Merrill wrote: > On Fri, Dec 15, 2017 at 11:35 AM, David Malcolm > wrote: > > On Fri, 2017-12-15 at 10:01 -0500, Jason Merrill wrote: > > > On Thu, Dec 14, 2017 at 2:25 PM, David Malcolm > > om> > > > wrote: > > > > On Mon, 2017-12-11 at 21:10 -0500, Jason

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Sandiford
Jeff Law writes: > On 12/14/2017 12:26 PM, Richard Sandiford wrote: How does it relate to what LRA can do? AFAIK LRA doesn't try to find any global optimal solution and previous hardreg assignments may work against it? >> >> Yeah, both of those are problems. But the more importan

Re: Add an "early rematerialisation" pass

2017-12-15 Thread Richard Sandiford
Jeff Law writes: > On 11/17/2017 08:58 AM, Richard Sandiford wrote: >> This patch looks for pseudo registers that are live across a call >> and for which no call-preserved hard registers exist. It then >> recomputes the pseudos as necessary to ensure that they are no >> longer live across a call.

Re: Backports to 7.3

2017-12-15 Thread Jakub Jelinek
On Fri, Dec 15, 2017 at 11:23:21PM +0100, Jakub Jelinek wrote: > Hi! > > I've backported today following 23 patches after bootstrapping/regtesting > them on x86_64-linux and i686-linux. And 2 more: Jakub 2017-12-16 Jakub Jelinek Backported from mainline 2017-12-15 Ja

libgo patch committed: emulate Flock on AIX

2017-12-15 Thread Ian Lance Taylor
This patch by Tony Reix adds an emulation of the Flock call to libgo's syscall package on AIX. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --- gcc/go/gofrontend/MERGE (revision 255666) +++ gcc/go/gofrontend/MERG

libgo patch committed: use hostname -s on AIX

2017-12-15 Thread Ian Lance Taylor
This patch by Tony Reix changes the libgo tests for the os package on AIX to use hostname -s, not plain hostname. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === --

Re: [PATCH][i386] Fix PR83358 - increase divide/mod latencies a bit

2017-12-15 Thread Jeff Law
On 12/12/2017 01:28 AM, Markus Trippelsdorf wrote: > As the testcase shows, trunk currently generates horrible code for > divisions used in tight loops. This happens because the algorithm > expanding div/mod doesn't take parallelism into account and this makes > the cost model unrealistic. > Fix th

<    1   2