Closed Bug 1657372 Opened 5 years ago Closed 5 years ago

Warp: don't create ScriptCounts in Baseline

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

Warp currently doesn't use ScriptCounts but instead relies on the Baseline IC counters. That means we can make Baseline a bit faster by not allocating and maintaining ScriptCounts there.

Note that ScriptCounts are used by Branch Pruning, which is later empower Scalar Replacement to optimize for-of loops.

Using IC should be fine, but then the equivalent count should be added back such that branch pruning can remove the branches which are adding Phi causing Scalar Replacement incapabilities of making optimizations.

(In reply to Nicolas B. Pierron [:nbp] from comment #1)

Note that ScriptCounts are used by Branch Pruning, which is later empower Scalar Replacement to optimize for-of loops.

Using IC should be fine, but then the equivalent count should be added back such that branch pruning can remove the branches which are adding Phi causing Scalar Replacement incapabilities of making optimizations.

Yeah, we already add bailouts for Baseline ICs with hit count 0 so if we teach branch pruning about those always-bailing-out blocks that would still work I expect.

Branch pruning uses some heuristics based on the generated instructions to decide to remove or not a branch with a zero hit-count.
Making all branches with 0 hit-count always bailout was a performance hit when I was tuning it.

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b92cbbf74d59 Don't create/increment ScriptCounts in Baseline when Warp is enabled. r=iain
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: