Closed Bug 1636946 Opened 5 years ago Closed 5 years ago

Optimize slot/element loads + MUnbox

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

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.

I have a patch for this but there's some complexity in the neighborhood that I want to clean up...

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

Also adds support for MLoadDynamicSlot and MLoadElement.

Depends on D75265

Keywords: leave-open
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
Keywords: leave-open
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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: