Closed Bug 670632 Opened 10 years ago Closed 10 years ago

IonMonkey: Add register hinting to the linear scan register allocator

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: adrake, Assigned: adrake)

References

Details

Attachments

(1 file, 1 obsolete file)

Wimmer's paper reports ~1% run-time speedup from simply doing register hinting across moves.
Blocks: 670624
Assignee: general → adrake
Status: NEW → ASSIGNED
Attached patch Patch v0 (obsolete) — Splinter Review
Nice and simple. I can hit this case on some test cases, but it's Yet Another Heuristic™. We should remember to benchmark with and without this later on some test cases we care about.
Attachment #545252 - Flags: review?(dvander)
Attached patch Patch v1Splinter Review
This includes both of the following hinting optimizations:

1) When an interval is up for free register allocation, if it is not the first
   interval for the virtual register (i.e. it was split from another interval),
   try to allocate the same register as the previous interval in order to avoid
   emitting a move, even if it's not "optimal" by other heuristics. This is the
   optimization described in Wimmer's paper.

2) When an interval is up for free register allocation, if the next use of the
   interval has a FIXED policy, try to allocate that register. This eliminates
   truly stupid moves surrounding FIXED policies that could have been avoided
   just by picking the fixed register to start with.

Neither of these is a particularly huge gain, but neither is particularly hard to do, either.
Attachment #545252 - Attachment is obsolete: true
Attachment #548741 - Flags: review?(dvander)
Attachment #545252 - Flags: review?(dvander)
Comment on attachment 548741 [details] [diff] [review]
Patch v1

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