Optimize codegen for loading aliased lexicals
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox114 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
We often have a sequence of MLoadFixedSlot => MLexicalCheck => MUnbox
when accessing lexicals in an outer scope. If we add support for MLexicalCheck
to FoldLoadsWithUnbox
, we can eliminate the lexical check and fold the load and unbox.
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
A common MIR pattern when loading lexicals from an outer scope is
MLoad{Fixed,Dynamic}Slot => MLexicalCheck => MUnbox(fallible)
.
This patch makes it possible to eliminate the lexical check in this case and to
fold the load and unbox into MLoad{Fixed,Dynamic}SlotAndUnbox
, because this
instruction will bail out if we see the uninitialized-lexical magic value so a
separate check for it is redundant. This is similar to how we don't need a separate
hole check for MLoadElementAndUnbox
.
We have test coverage for this case in multiple jit-tests.
Comment 3•2 years ago
|
||
bugherder |
Description
•