Warp: specialize OSR phis
Categories
(Core :: JavaScript Engine: JIT, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(4 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 | |
Bug 1633736 part 4 - Specialize OSR phis as part of phi specialization when Warp is enabled. r?iain!
47 bytes,
text/x-phabricator-request
|
Details | Review |
After bug 1632757 we generate good code for an empty for-loop in a function in the non-OSR case, but OSR ends up with unboxing/boxing instructions in the loop body because the OSR entry block has (untyped) Values flowing in, polluting phi types.
To fix this we need to improve phi type analysis to add guards/unboxing to the OSR entry block if needed when WarpBuilder is enabled.
Assignee | ||
Comment 1•4 years ago
|
||
The MagicIsConstructing case can happen with WarpBuilder with later patches.
Assignee | ||
Comment 2•4 years ago
|
||
A later patch will add a second caller.
Depends on D72880
Assignee | ||
Comment 3•4 years ago
|
||
A later patch will use this for null/undefined/magic Values: types that can't
be MUnbox'd.
Depends on D72881
Assignee | ||
Comment 4•4 years ago
|
||
For WarpBuilder we need an alternative to the IonBuilder TI-based mechanism.
It's somewhat similar in spirit: determine types for each slot and then add
guard/unbox instructions to the OSR entry block to check this. See the big
SMDOC comment for details.
This does great on various loops I've been analyzing. We'll have to see how
it works out for the more complicated (nested) loops, but because this is
WarpBuilder-specific code we can hopefully easily change things later if needed.
Depends on D72882
Updated•4 years ago
|
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/21d7efbe77c8 part 1 - Use IsNullOrUndefined and IsMagicType helpers, handle MagicIsConstructing type in replaceRedundantPhi. r=iain https://hg.mozilla.org/integration/autoland/rev/9358bf6499db part 2 - Add a helper method for draining phi worklist. r=iain https://hg.mozilla.org/integration/autoland/rev/b638015cdfd1 part 3 - Add MGuardValue for guarding on a specific Value. r=iain https://hg.mozilla.org/integration/autoland/rev/78291462524e part 4 - Specialize OSR phis as part of phi specialization when Warp is enabled. r=iain
Comment 6•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/21d7efbe77c8
https://hg.mozilla.org/mozilla-central/rev/9358bf6499db
https://hg.mozilla.org/mozilla-central/rev/b638015cdfd1
https://hg.mozilla.org/mozilla-central/rev/78291462524e
Description
•