Re: Enable jump threading on maths meeting hot paths

2017-01-27 Thread Jeff Law
On 01/26/2017 03:39 AM, Jan Hubicka wrote: On Thu, Jan 26, 2017 at 11:04 AM, Jan Hubicka wrote: + if (!contains_hot_bb && speed_p) + contains_hot_bb |= optimize_bb_for_speed_p (bb); + Hmm, but you are also counting the destination of the threading here which we will not duplicate.

Re: Enable jump threading on maths meeting hot paths

2017-01-26 Thread Jan Hubicka
> On Thu, Jan 26, 2017 at 11:04 AM, Jan Hubicka wrote: > >> > + if (!contains_hot_bb && speed_p) > >> > + contains_hot_bb |= optimize_bb_for_speed_p (bb); > >> > + > >> > >> Hmm, but you are also counting the destination of the threading here > >> which we will > >> not duplicate. Shou

Re: Enable jump threading on maths meeting hot paths

2017-01-26 Thread Richard Biener
On Thu, Jan 26, 2017 at 11:04 AM, Jan Hubicka wrote: >> > + if (!contains_hot_bb && speed_p) >> > + contains_hot_bb |= optimize_bb_for_speed_p (bb); >> > + >> >> Hmm, but you are also counting the destination of the threading here >> which we will >> not duplicate. Shouldn't this be un

Re: Enable jump threading on maths meeting hot paths

2017-01-26 Thread Jan Hubicka
> > + if (!contains_hot_bb && speed_p) > > + contains_hot_bb |= optimize_bb_for_speed_p (bb); > > + > > Hmm, but you are also counting the destination of the threading here > which we will > not duplicate. Shouldn't this be under the if (j < path_length - 1) > conditional so we > look

Re: Enable jump threading on maths meeting hot paths

2017-01-26 Thread Richard Biener
On Wed, Jan 25, 2017 at 7:11 PM, Jan Hubicka wrote: > Hi, > this patch modifies profitable_jump_thread_path heuristics by enabling > code expansion when the threaded path contains at least one hot path. > The basic idea is that while we do not decrease instruction count on the > non-duplicated pat

Enable jump threading on maths meeting hot paths

2017-01-25 Thread Jan Hubicka
Hi, this patch modifies profitable_jump_thread_path heuristics by enabling code expansion when the threaded path contains at least one hot path. The basic idea is that while we do not decrease instruction count on the non-duplicated path, we reduce number of entry edges and by this path separation