Closed Bug 674490 Opened 13 years ago Closed 13 years ago

IonMonkey: Be a little lazier about allocating registers in the linear scan register allocator

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: adrake, Assigned: adrake)

References

Details

Attachments

(1 file)

We allocate registers for intervals which really, really don't need them. A heuristic to prevent this from occurring could eliminate some particularly stupid moves.
Attached patch Patch v0Splinter Review
This adds a tiny cheap check right before free register allocation. If there are no real (non-KEEPALIVE) uses coming up, and a canonical spill location is already there (no code would be emitted to do the spill), then spill.

There may be an argument for this even if there is no existing canonical spill location, since it's going to get spilled as soon as a register is needed later, anyway. Thoughts?
Attachment #548749 - Flags: review?(dvander)
Comment on attachment 548749 [details] [diff] [review]
Patch v0

Review of attachment 548749 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #548749 - Flags: review?(dvander) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/3be9cb4bc96a
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.