Optimize slot/element loads + MUnbox
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
Warp MIR often loads an element or slot and then does a fallible unbox to some type. It's more efficient to combine the load + unbox in a single MIR/LIR instruction. Especially for LoadElement because we can eliminate the hole check.
We already have this optimization for fixed slot loads, but the implementation is a bit ad-hoc and I think we can do better if we move this out of MUnbox::foldsTo
.
Assignee | ||
Comment 1•4 years ago
|
||
I have a patch for this but there's some complexity in the neighborhood that I want to clean up...
Assignee | ||
Comment 2•4 years ago
|
||
Some long overdue renaming.
Assignee | ||
Comment 3•4 years ago
|
||
The ObjectPolicy was a no-op in this case. Change that to an assert and stop using
ObjectPolicy for slots/elements, it didn't really make sense.
Depends on D75262
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D75263
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D75264
Assignee | ||
Comment 6•4 years ago
|
||
Also adds support for MLoadDynamicSlot and MLoadElement.
Depends on D75265
Assignee | ||
Updated•4 years ago
|
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6b265b68d408 part 1 - Rename MLoadSlot/MStoreSlot to MLoadDynamicSlot/MStoreDynamicSlot. r=evilpie https://hg.mozilla.org/integration/autoland/rev/c2c904b194ca part 2 - Don't use ObjectPolicy for slots/elements operands. r=evilpie https://hg.mozilla.org/integration/autoland/rev/d2e95cb1d217 part 3 - Move LoadFixedSlotAndUnbox codegen logic into a helper function. r=evilpie
Assignee | ||
Updated•4 years ago
|
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2b968efa9858 part 4 - Add MDefinition::maybeSingleDefUse method. r=evilpie https://hg.mozilla.org/integration/autoland/rev/db07a336651e part 5 - Replace load + unbox folding in MUnbox::foldsTo with a proper optimization pass. r=evilpie
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6b265b68d408
https://hg.mozilla.org/mozilla-central/rev/c2c904b194ca
https://hg.mozilla.org/mozilla-central/rev/d2e95cb1d217
https://hg.mozilla.org/mozilla-central/rev/2b968efa9858
https://hg.mozilla.org/mozilla-central/rev/db07a336651e
Description
•