This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Enable jump threading on maths meeting hot paths


On 01/26/2017 03:39 AM, Jan Hubicka wrote:
On Thu, Jan 26, 2017 at 11:04 AM, Jan Hubicka <hubicka@ucw.cz> 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 under the if (j < path_length - 1)
conditional so we
look for hot BBs we are actually duplicating only (similar restrictions apply to
path[0]?).

Aha, you are right.  I am re-testing updated patch (it also solves the PR)

What about j == 0?  We don't duplicate that block either.

We do duplicate it, just eliminate the control flow at the end of bb
(j==0 is the last basic block of path containing the control flow being threaded)
Right. And that can (of course) allow other parts of the block to be eliminated as dead code -- we've never tried to model any of that.


I am updating patch actually print into details dump file what paths are considered
and what insn counts are counted.
Probably wise.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]