Closed Bug 1567388 Opened 5 years ago Closed 5 years ago

Allow running IonBuilder without a BaselineScript for definite properties analysis

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(5 files)

With Baseline ICs moved into JitScript and bailouts hopefully soon bailing to the interpreter, there aren't that many places where Ion cares about BaselineScript. There are still some uses of BaselineScript in IonBuilder but I think those could be fixed by moving these fields to JitScript (maybe a CachedIonData class hanging off it).

For normal Ion compilation we will still depend on the Baseline JIT (it's where we can OSR into Ion for example) and that is fine. However the definite properties analysis currently eagerly Baseline compiles scripts (also the ones it inlines) and that's something we could stop doing.

First step here is to gather some data on how many scripts the DPA ends up Baseline compiling on typical websites.

Priority: -- → P2

When starting the browser, opening Gmail, a random Google Doc and Sheet, Facebook, Twitter, CNN we Baseline compile > 3300 functions for the definite properties analysis (AnalyzeNewScriptDefiniteProperties + IonBuilder::canInlineTarget). That's significant enough that we should fix this.

Now that IonBuilder only depends on JitScript we no longer need to have a BaselineScript.

Depends on D39167

This saves a little memory for JitScripts that are never Ion-compiled.

Depends on D39168

This prevents assertion failures with later patches because we will run the
definite properties analysis in IonBuilder without requiring a Baseline
compilation.

Just aborting in IonBuilder should be fine nowadays: we can now properly
backtrack from inlining failures (instead of aborting the whole compilation)
and when this happens we mark the script uninlineable too.

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/77669a7fee83 part 0 - Stop marking scripts as uninlineable during Baseline compilation. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/2e0669f670df part 1 - Move ionCompiledOrInlined flag from BaselineScript to JitScript. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/22681d4e56b6 part 2 - Move BaselineScript fields for Ion compilation to JitScript. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/e61205c33c0c part 3 - Stop Baseline-compiling scripts for the definite properties analysis. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/820875f59ff9 part 4 - Move inlinedCompilations Vector to CachedIonData. r=tcampbell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: