Closed Bug 1976218 Opened 1 year ago Closed 1 year ago

Use InlineSet for CompilationDependencyTracker

Categories

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

task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(2 files)

We currently use a Vector and we assert we don't add more than 32 dependencies to it, but that will no longer be guaranteed when we have more dynamic fuses. We can change this code to use an InlineSet to still optimize for a very small number of fuses (still the common case).

This works because the LifoAlloc is freed at the end of the compilation task,
after the compilation dependency tracker is reset().

This is more efficient when we can add more than a few dependencies (especially when
this happens on the main thread), but it's also required for the next patch because
InlineSet currently doesn't like when the hash policy's Lookup and Key types are
different (we'd want Key to be a UniquePtr and Lookup to be a raw pointer or
reference).

Changing the Vector to an InlineSet allows us to add more dynamic dependencies
later, while still optimizing for the common very-few-dependencies case.

Severity: -- → N/A
Priority: -- → P1
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch
QA Whiteboard: [qa-triage-done-c144/b143]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: