Closed
Bug 676389
Opened 13 years ago
Closed 13 years ago
IonMonkey: Add a "COPY" policy to LUse
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dvander, Unassigned)
References
Details
Attachments
(2 files, 1 obsolete file)
11.01 KB,
patch
|
adrake
:
review+
|
Details | Diff | Splinter Review |
37.62 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
We're starting to see a pattern where we need a temporary register that contains the value of a virtual register. For example, LBoxDouble on x86: const LAllocation *in = box->getOperand(0); const LDefinition *temp = box->getTemp(0); masm.movsd(ToFloatRegister(in), ToFloatRegister(temp)); If this is the last use of |in|, we can't re-use that register, and get: addsd %xmm7, %xmm6 movsd %xmm6, %xmm7 movd %xmm7, %edx This also came up for Hannes with LTableSwitch. I'm proposing a COPY policy for LUse which would either: (1) If this is the last use, use or allocate an existing register. (2) Otherwise, allocate a temporary register, and insert a move. For the greedy allocator, this should be straightforward: * If last use, give register. * If no regs free, evict. * Otherwise, allocate reg and move. Andrew, could you discuss what would be needed on the LSRA end?
Reporter | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
I think the cleanest solution I can come up with for this would be kind of invasive. If the linear scan algorithm can tolerate "bogus" intervals which don't correspond to a use or a def, then when I see a COPY in liveness analysis I can just shove in a little interval that forces an interval split. For calls later, calls can inject a bunch of little fixed intervals that force splits for other spilled registers.
Reporter | ||
Comment 3•13 years ago
|
||
Attachment #550533 -
Attachment is obsolete: true
Comment 4•13 years ago
|
||
Adds support for the copy policy and does a substantial amount of refactoring -- hints need to be rerefactored, but that can be a separate issue.
Attachment #554249 -
Flags: review?(dvander)
Reporter | ||
Updated•13 years ago
|
Attachment #554249 -
Flags: review?(dvander) → review+
Updated•13 years ago
|
Attachment #553650 -
Flags: review+
Comment 5•13 years ago
|
||
http://hg.mozilla.org/projects/ionmonkey/rev/9c7e1a2c09cf http://hg.mozilla.org/projects/ionmonkey/rev/42d5f6784ef0
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•