Closed
Bug 1459038
Opened 8 years ago
Closed 7 years ago
Deduplicate CacheIR emitters that differ only in stub fields
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | affected |
People
(Reporter: mgaudet, Unassigned)
References
Details
Attachments
(1 obsolete file)
Once Bug 1348792 lands, we will be able to merge the Baseline and Ion CacheIR compiler code for opcodes whose implementations differ only in terms of how they handle stub fields.
| Reporter | ||
Comment 1•8 years ago
|
||
| Reporter | ||
Updated•8 years ago
|
Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
| Reporter | ||
Updated•8 years ago
|
Attachment #8973821 -
Attachment is obsolete: true
| Reporter | ||
Comment 2•8 years ago
|
||
I took a pass through and have highlighted the below methods as either perfect for deduplication, or almost perfect.
Perfect cases for deduplication
* emitGuardGroupHasUnanalyzedNewScript
* emitGuardXrayExpandoShapeAndDefaultProto
* emitGuardFunctionPrototype l
* emitMegamorphicLoadSlotResult (Bug 1460895)
* emitMegamorphicStoreSlotResult
* emitLoadObject
Look unifiable, though may have require one extra scratch reg:
* emitGuardShape
* emitGuardGroup
* emitLoadUnboxedPropertyResult
* emitLoadEnvironmentFixedSlotResult
* emitLoadEnvironmentDynamicSlotResult
Assuming Bug 1460895 is a good example, I'll follow up opening bugs for the perfect cases above.
Jan: About the deduplications where we'd need an extra scratch register (and immediate load). What is your feeling: Worth it in terms of deduplication value, or potentially a performance concern?
Flags: needinfo?(jdemooij)
Comment 3•8 years ago
|
||
(In reply to Matthew Gaudet (he/him) [:mgaudet] (UTC-5) from comment #2)
> Jan: About the deduplications where we'd need an extra scratch register (and
> immediate load). What is your feeling: Worth it in terms of deduplication
> value, or potentially a performance concern?
For the ones you listed I'd say it's probably not worth it because they're all very simple instructions. Also, emitGuardShape in particular is very hot because most property access stubs contain at least one shape guard, so adding an extra load + scratch register isn't great :)
Unifying the others sounds great though!
Flags: needinfo?(jdemooij)
| Reporter | ||
Comment 4•8 years ago
|
||
I think it's possible to deduplicate things like emitGuardShape, with some more magic. But I don't have a clear answer right now, so I won't open a blocking bug for that.
| Reporter | ||
Updated•8 years ago
|
Assignee: mgaudet → nobody
Status: ASSIGNED → NEW
| Reporter | ||
Comment 5•7 years ago
|
||
All the dependent bugs are closed, so closing this.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•