Improve WarpBuilder IC logic
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(7 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
Currently if we don't inline CacheIR, we always use an Ion IC. If an IC site is cold, it's better to bail out so that Baseline can collect type information. This means there are 3 states we want the oracle to be able to communicate to the builder: bailout, inline CacheIR, use Ion IC.
The current WarpBuilder logic makes that awkward, so as a first step I have a patch that adds a buildIC method that takes a CacheKind + the list of inputs and then either inlines CacheIR or adds an Ion IC.
| Assignee | ||
Comment 1•5 years ago
|
||
Having all logic for an IC site in WarpBuilder::buildIC will make it easier to
make future changes (like bailing out for cold Baseline ICs). It also enforces
all ICs are handled consistently and it de-duplicates code for JSOps that use
the same CacheKind.
This patch also adds transpiler support for some JSOps (In, InstanceOf, etc) and
we now assert the transpiler (buildIC) is called with the right number of inputs
(based on the CacheKind).
| Assignee | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
| bugherder | ||
Updated•5 years ago
|
| Assignee | ||
Comment 4•5 years ago
|
||
When we bail out for cold ICs, some jit-tests fail because they expect to run in
Ion/Warp at certain points.
| Assignee | ||
Comment 5•5 years ago
|
||
This fixes another test failure because we were not getting back into Warp code
quickly enough after a cold-IC bailout. With --ion-eager we want to compile without
waiting and that should probably also apply to recompiles.
Depends on D81063
| Assignee | ||
Comment 6•5 years ago
|
||
Until now we always used an Ion IC if there was no Baseline IC stub to transpile.
This isn't great for Baseline ICs that were never hit because we could get stuck
in Ion ICs instead of using the transpiler.
With this patch we bail out and if that happens more than 10 times we invalidate
the Warp code and then warm up and try a second time.
Depends on D81064
Comment 8•5 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•5 years ago
|
||
| Assignee | ||
Comment 10•5 years ago
|
||
Goal is to make it easy to add a second flag in the next patch.
Depends on D81820
| Assignee | ||
Comment 11•5 years ago
|
||
Set a flag on stubs used by the transpiler and then treat those similar to a
constraint in the old system: invalidate when attaching a new IC stub (in front of
it), when updating the stub, or when unlinking the stub.
This is necessary to avoid repeated bailouts followed by a deoptimization in
CheckFrequentBailouts.
Depends on D81821
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
| bugherder | ||
Comment 14•5 years ago
|
||
Comment 16•5 years ago
|
||
Backed out for bustages on BaselineIC.h and TrialInlining.cpp
backout: https://hg.mozilla.org/integration/autoland/rev/c32e0fa855e4fc5cce10f101382e779d088641ae
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=308797063&repo=autoland&lineNumber=14870
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - In file included from Unified_cpp_js_src_jit10.cpp:38:
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - /builds/worker/checkouts/gecko/js/src/jit/TrialInlining.cpp(51,34): error: too few arguments to function call, expected 2, have 1
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - fallbackStub->discardStubs(cx());
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - /builds/worker/checkouts/gecko/js/src/jit/BaselineIC.h(708,3): note: 'discardStubs' declared here
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - void discardStubs(JSContext* cx, JSScript* script);
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - ^
[task 2020-07-07T06:29:01.327Z] 06:29:01 INFO - 1 error generated.
[task 2020-07-07T06:29:01.328Z] 06:29:01 ERROR - make[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:748: Unified_cpp_js_src_jit10.obj] Error 1
[task 2020-07-07T06:29:01.330Z] 06:29:01 INFO - make[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src/jit'
[task 2020-07-07T06:29:01.331Z] 06:29:01 INFO - make[4]: *** Waiting for unfinished jobs....
| Assignee | ||
Comment 17•5 years ago
|
||
(In reply to Natalia Csoregi [:nataliaCs] from comment #16)
Backed out for bustages on BaselineIC.h and TrialInlining.cpp
Oops sorry, this conflicted with changes that are only on autoland.
Comment 18•5 years ago
|
||
Comment 19•5 years ago
|
||
| bugherder | ||
Comment 20•5 years ago
|
||
Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Description
•