Closed Bug 826734 Opened 12 years ago Closed 12 years ago

IonMonkey: Improve backtracking allocator spilling around calls

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bhackett1024, Unassigned)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
If a vreg's live range spans a call, the register allocator will be forced to spill it at some point.  The backtracking allocator does this rather poorly --- it will spill the vreg across its live range, and introduce new point intervals for all the register uses of the vreg.  This prevents reuse of registers when there are multiple uses of the vreg with no intervening calls, and can cause a lot of unwarranted memory traffic.

The attached patch uses a different splitting strategy when a register's live range includes a call.  The vreg is still spilled across its range (this would be good to fix when the calls are in cold code, but detecting that requires profiling data), but register uses of the vreg are consolidated into the same interval when they have no intervening call.

This improves the allocation for x86/x64 on all benchmarks (see bug 822116 for comparison):

sunspider
x86 ratio 0.706
x64 ratio 0.739

v8
x86 ratio 0.768
x64 ratio 0.939

kraken
x86 ratio 0.703
x64 ratio 0.862
Attachment #697933 - Flags: review?(jdemooij)
Blocks: 826741
Attachment #697933 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/mozilla-central/rev/47821c30804e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: