Closed
Bug 531840
Opened 16 years ago
Closed 7 years ago
Optimize deadvars()
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect, P3)
Tamarin Graveyard
Baseline JIT (CodegenLIR)
Tracking
(Not tracked)
RESOLVED
WONTFIX
Q3 12 - Dolores
People
(Reporter: edwsmith, Unassigned)
References
Details
(Whiteboard: PACMAN)
Attachments
(1 file)
The deadvars() pass currently has a couple of opportunities to optimize:
1. deadvars_kill() works by erasing instructions, by overwriting them with LIR_skip. Instead, it could be turned into a LirFilter subclass, and run inline with the assembler, which a) eliminates one pass, and b) does not require erasing instructions with LIR_skip. This, in turn, lets LirReader::read() avoid needing a loop for skipping LIR_skip instructions; the loop can be turned into an if since there won't be multiple consequitive skips.
2. the deadvars_kill pass still must analyze each instruction, since deadvars_analyze() only remembers live/dead store states at blocks starting with LIR_label. Since it's doing the analysis, this is the *only* required pass in any method with no loops. so: skip deadvars_analyze() if there are no backward edges. we can detect this condition in the first pass while LIR is created.
Reporter | ||
Comment 1•16 years ago
|
||
not ready to land yet, but comments on the direction are appreciated.
Assignee: nobody → edwsmith
Attachment #415190 -
Flags: review?(rreitmai)
Reporter | ||
Comment 2•16 years ago
|
||
DeadStoreFilter appears to be a generalized version of nanojit::StackFilter that deals with arbitrary control flow (branches, labels, plus exception edges).
Reporter | ||
Updated•15 years ago
|
Target Milestone: --- → Future
Reporter | ||
Comment 3•15 years ago
|
||
Comment on attachment 415190 [details] [diff] [review]
working prototype, introduces DeadStoreAnalyzer and DeadStoreFilter
i will rebase this and r? again soon.
Attachment #415190 -
Flags: review?(rreitmai)
Reporter | ||
Updated•15 years ago
|
Whiteboard: PACMAN
Reporter | ||
Updated•15 years ago
|
Whiteboard: PACMAN → PACMAN, has-patch
Reporter | ||
Comment 4•15 years ago
|
||
marking "major" with the expectation of a nontrivial improvement in jit compiler speed.
Severity: normal → major
Priority: -- → P3
Target Milestone: Future → flash10.2
Reporter | ||
Comment 5•15 years ago
|
||
Observation:
- only a vanishingly small % of methods have >64 local vars (even >32 is a small %).
- most methods dont contain loops
So, we could write a single-pass, non-iterative version of deadvars, that uses a plain uint64_t mask for liveness tracking, and execute it in-line with code generation. in fact, this case might already be implemented correctly in StackFilter (which uses a BitSet, but the BitSet could be templatized).
Reporter | ||
Comment 6•15 years ago
|
||
Unassigning - patch is old and I probably won't have time to work on this any time soon. The idea is still valid, though; we could still perform the equivalent of deadvars_kill() concurrently with the assembler pass.
Assignee: edwsmith → nobody
Updated•14 years ago
|
Target Milestone: Q3 11 - Serrano → Future
Updated•14 years ago
|
Flags: flashplayer-injection-
Flags: flashplayer-bug-
Reporter | ||
Comment 7•13 years ago
|
||
targeting dolores in the hopes of improving jit compiler speed for gaming - will need to update patch, and/or try the approach from comment #5, then measure the effect on jit speed.
Target Milestone: Future → Q3 12 - Dolores
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•