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

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: > > I've updated it according to richi's and your feedbacks. Regstrapped on > {x86_64,i686}-linux-gnu. Ok to install? > > > We limit the amount of copying for jump threading based on counting > stmts. This coun

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

2017-12-12 Thread Jeff Law
On 12/11/2017 10:08 PM, Alexandre Oliva wrote: > >> I wonder if for the handling of a larger threading path it wouldn't be >> useful to >> keep ssa_remaining_uses live and populated across processing of the threaded >> conditionals? OTOH it would probably require to track uses on the path vs. >>

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

2017-12-12 Thread Richard Biener
On Tue, Dec 12, 2017 at 6:17 AM, 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;

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

2017-12-11 Thread Alexandre Oliva
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; >> + jump_thread_edge *je; >> + FOR_EACH_VEC_ELT (*path, i, je)

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

2017-12-11 Thread Alexandre Oliva
On Dec 7, 2017, Richard Biener wrote: >> + FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES) > SSA_OP_USE avoids walking virtual uses and we don't want to walk those because we already know writes to memory are not going to be dead anyway, I suppose. >> + { >> +

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

2017-12-11 Thread Jeff Law
On 12/07/2017 05:04 AM, Alexandre Oliva wrote: > We limit the amount of copying for jump threading based on counting > stmts. This counting is overly pessimistic, because we will very > often delete stmts as a consequence of jump threading: when the final > conditional jump of a block is removed,

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

2017-12-07 Thread Richard Biener
On Thu, Dec 7, 2017 at 1:04 PM, Alexandre Oliva wrote: > We limit the amount of copying for jump threading based on counting > stmts. This counting is overly pessimistic, because we will very > often delete stmts as a consequence of jump threading: when the final > conditional jump of a block is

[PR81165] discount killed stmts when sizing blocks for threading

2017-12-07 Thread Alexandre Oliva
We limit the amount of copying for jump threading based on counting stmts. This counting is overly pessimistic, because we will very often delete stmts as a consequence of jump threading: when the final conditional jump of a block is removed, earlier SSA names computed exclusively for use in that