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)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX
Future

People

(Reporter: edwsmith, Unassigned)

References

Details

Attachments

(1 file, 2 obsolete files)

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.
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Assignee: nobody → edwsmith
Attachment #364551 - Flags: review?(jodyer)
Attachment #364551 - Flags: review?(jodyer)
No longer blocks: 478115
Depends on: 478115
Also makes live expression list optional (too much output most of the time).
Attachment #365433 - Flags: review?(lhansen)
Attachment #365433 - Attachment is patch: true
Attachment #365433 - Attachment mime type: application/octet-stream → text/plain
Attachment #365433 - Flags: review?(lhansen) → review+
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
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
Assignee: edwsmith → nobody
OS: Mac OS X → All
Priority: P3 → --
Hardware: x86 → All
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit
Component: Nanojit → JIT Compiler (NanoJIT)
Product: Core → Tamarin
QA Contact: nanojit → nanojit
Null check elimination has now been decoupled from the verifier, in VarTracker. Is this bug still relevant?
obsoleted by verifier work in spring 2010
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
bulk verifying resolved !fixed issues
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: