Closed
Bug 478211
Opened 16 years ago
Closed 14 years ago
eliminate null pointer checks in CodegenLIR independently from the verifier
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect)
Tamarin Graveyard
Baseline JIT (CodegenLIR)
Tracking
(Not tracked)
VERIFIED
WONTFIX
Future
People
(Reporter: edwsmith, Unassigned)
References
Details
Attachments
(1 file, 2 obsolete files)
9.82 KB,
patch
|
Details | Diff | Splinter Review |
It is possible to avoid using FrameState.notNull and instead eliminate null checks in CodegenLIR with a fairly simple Nanojit filter.
rough sketch:
* the (p == 0) expression can already be matched by CseFilter
* a new filter can maintain a set of LIns* for previously seen pointers that are not null. (if you see jt(p==0), then from that point until the next label, p is in the set).
* if a second jt(p==0) is seen, it can be dropped since it's always false.
* similar logic can be used for handling the check for Atom pointers being == nullAtom or undefinedAtom (the relation needed is p <= undefinedAtom)
Since this works on the LIns* for p, we don't need the loop that searches for copies of p in FrameState that is in Verifier::emitSetNull().
With this change, FrameState.notNull will be write-only and can be eliminated. notNull is not captured by OP_newclass or OP_newfunction so it's only used as an optimization within the verifier pipeline, and only with the jit enabled.
Note: there is no going back. removing notNull will relax the verifier's type-meet rules, after which point all future vm's must support the more relaxed rules. luckily, this is what we want.
This bug depends on removing MIR so we don't have to do all this twice.
Updated•16 years ago
|
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Reporter | ||
Comment 1•16 years ago
|
||
Assignee: nobody → edwsmith
Attachment #364551 -
Flags: review?(jodyer)
Reporter | ||
Updated•16 years ago
|
Attachment #364551 -
Flags: review?(jodyer)
Reporter | ||
Updated•16 years ago
|
Reporter | ||
Comment 2•16 years ago
|
||
Also makes live expression list optional (too much output most of the time).
Attachment #365433 -
Flags: review?(lhansen)
Updated•16 years ago
|
Attachment #365433 -
Attachment is patch: true
Attachment #365433 -
Attachment mime type: application/octet-stream → text/plain
Updated•16 years ago
|
Attachment #365433 -
Flags: review?(lhansen) → review+
Reporter | ||
Comment 3•16 years ago
|
||
Comment on attachment 365433 [details] [diff] [review]
show consts, labels, and branches, in live instruction list
pushed http://hg.mozilla.org/tamarin-redux/rev/6701ace052c6
Attachment #365433 -
Attachment is obsolete: true
Reporter | ||
Comment 4•16 years ago
|
||
A few more functions added to the not-null list, updated to work with either pointer size.
Attachment #364551 -
Attachment is obsolete: true
As an experiment I did the following:
- stop managing notNull in frame state
- still call coder->writeCheckNull from the verifier
- change assert_nz to call is_nz to check the nz-ness of a value
The hypothesis is that this will uncover missing nz copies in the NullCheckFilter.
When there are no more asserts we can move the call to writeCheckNull out of the verifier and into CodegenLIR.
Flags: flashplayer-qrb? → flashplayer-qrb+
Priority: -- → P3
Target Milestone: --- → Future
Reporter | ||
Updated•15 years ago
|
Assignee: edwsmith → nobody
OS: Mac OS X → All
Priority: P3 → --
Hardware: x86 → All
Updated•15 years ago
|
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit
Updated•15 years ago
|
Component: Nanojit → JIT Compiler (NanoJIT)
Product: Core → Tamarin
QA Contact: nanojit → nanojit
Comment 6•14 years ago
|
||
Null check elimination has now been decoupled from the verifier, in VarTracker.
Is this bug still relevant?
Reporter | ||
Comment 7•14 years ago
|
||
obsoleted by verifier work in spring 2010
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•