Open Bug 1540935 Opened 5 years ago Updated 2 years ago

Fix Ion resume point overhead

Categories

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

enhancement

Tracking

()

Tracking Status
firefox68 --- fix-optional

People

(Reporter: jandem, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: perf)

Resume points have significant perf and memory overhead and scale poorly because they capture all locals and args at each block and after many instructions.

Nicolas and I talked about this yesterday and we think an incremental plan of attack like this could work:

  1. Add a UsedByResumePoint flag to MIR instructions + some flag/field to capture observability. We could easily assert correctness of these flags. Passes that remove resume point operands could recompute it with a single pass if needed.

  2. Stop using MUses for resume points. Instead, resume points will hold raw MDefinition pointers. A map could be used to deal with replaceAllUsesWith.

  3. Once we're here it will be much easier to replace resumeAfter resume points with delta resume points (encoding the delta compared to a previous one), because no code will rely on exact resume point uses.

  4. At this point we could consider using delta resume points for (certain) entry resume points as well.

Depends on: 1454586

There's some overlap with bug 1454586, but I think the "delta resume points" idea from that bug would be easier to do after steps 1 and 2 here.

Keywords: perf
Priority: -- → P2
Type: defect → enhancement
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.