Closed
Bug 512398
Opened 16 years ago
Closed 16 years ago
nanojit: kill RegAlloc::used
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| status1.9.2 | --- | beta1-fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
|
7.16 KB,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
RegAlloc has fields 'free' and 'active' which track which registers are free and active at particular times. It also has a field 'used' whose use is unclear. Judging from the name it's similar to 'active' but it's only used in isValid(), which is a *very* weak sanity check that is called from only one place. And it's unclear to me that 'used' is updated in all the places it should be. And it should only be used with debug builds, but the conditional compilation is inconsistent.
Attached patch removes 'used' and 'isValid()' altogether. If people want to keep 'used', an explanation of what exactly it's tracking and a judgment of whether it's being updated appropriately would be appreciated!
Attachment #396377 -
Flags: review?(edwsmith)
Updated•16 years ago
|
Attachment #396377 -
Flags: review?(edwsmith) → review+
Comment 1•16 years ago
|
||
Comment on attachment 396377 [details] [diff] [review]
patch
The history of that field is that it was used on register-rich cpu's to keep track of which registers we actually do use, so the generated prolog/epilog don't have to spill everything.
the current approach of using a special LIR_param to track, spill, and restore incoming callee-saved registers works without the used mask, but doesn't integrate well with cpu's that have a mask-based save/restore instruction (arm, ppc).
Given that we're not using the field, the dead code should be removed.
if it comes back later, fine, but maybe something different and well documented will come back later, too.
| Assignee | ||
Comment 2•16 years ago
|
||
(In reply to comment #1)
> (From update of attachment 396377 [details] [diff] [review])
> The history of that field is that it was used on register-rich cpu's to keep
> track of which registers we actually do use, so the generated prolog/epilog
> don't have to spill everything.
How is that different to 'active'? Does 'used' record which registers are used anywhere in the block?
| Assignee | ||
Comment 3•16 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Comment 4•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 5•16 years ago
|
||
status1.9.2:
--- → beta1-fixed
Flags: wanted1.9.2+
You need to log in
before you can comment on or make changes to this bug.
Description
•