Closed Bug 1663404 Opened 4 years ago Closed 4 years ago

Warp: figure out what to do with JSOp::OptimizeSpreadCall

Categories

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

task

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

WarpBuilder always pushes false now, disabling the optimization. We should fix this somehow, maybe by adding IC support.

André, do you think it makes sense to add an IC for this and optimize it similar to what you did with tryAttachArrayIteratorPrototypeOptimizable?

Flags: needinfo?(andrebargull)

Hmm, I guess that makes sense. I wonder if changing it to an IC will also make it easier to apply this optimisation to more spread patterns, because OptimizeSpreadCall is currently restricted to the case where the spreaded variable is a rest-argument; for example this case happens in default derived class constructors.

Flags: needinfo?(andrebargull)

Not doing this can result in control flow in Warp being different from that in Baseline, meaning we need a bailout and recompile. I should probably look into this..

The IC seems to work. It requires a fair number of guards though. This would be the ideal case for watchpoint-based invalidation in the future...

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED

Depends on D89442

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7662ebd5a4cb part 1 - Add Baseline IC for OptimizeSpreadCall. r=anba https://hg.mozilla.org/integration/autoland/rev/f4bf1e361087 part 2 - Add CacheIR generator for OptimizeSpreadCall. r=anba https://hg.mozilla.org/integration/autoland/rev/8056b46d4e1f part 3 - Add Ion/Warp IC for OptimizeSpreadCall. r=anba https://hg.mozilla.org/integration/autoland/rev/f957a22b6edf part 4 - Check forceInlineCaches option in WarpOracle. r=anba
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f4e57aaf3c6d part 1 - Add Baseline IC for OptimizeSpreadCall. r=anba https://hg.mozilla.org/integration/autoland/rev/41467a80e9a5 part 2 - Add CacheIR generator for OptimizeSpreadCall. r=anba https://hg.mozilla.org/integration/autoland/rev/7fa0a09e0f5b part 3 - Add Ion/Warp IC for OptimizeSpreadCall. r=anba https://hg.mozilla.org/integration/autoland/rev/bb43f60ce793 part 4 - Check forceInlineCaches option in WarpOracle. r=anba
Flags: needinfo?(jdemooij)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: