IonMonkey: Add register hinting to the linear scan register allocator

RESOLVED FIXED

Status

()

RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: adrake, Assigned: adrake)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

7 years ago
Wimmer's paper reports ~1% run-time speedup from simply doing register hinting across moves.
(Assignee)

Updated

7 years ago
Blocks: 670624
(Assignee)

Updated

7 years ago
Assignee: general → adrake
Status: NEW → ASSIGNED
(Assignee)

Comment 1

7 years ago
Created attachment 545252 [details] [diff] [review]
Patch v0

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)
(Assignee)

Comment 2

7 years ago
Created attachment 548741 [details] [diff] [review]
Patch v1

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+
(Assignee)

Comment 4

7 years ago
http://hg.mozilla.org/projects/ionmonkey/rev/0d79db47e6fa
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.