Platform/Features/IonMonkey: Difference between revisions

m
Reverted edits by Couponcodez (talk) to last revision by Curtisk
No edit summary
m (Reverted edits by Couponcodez (talk) to last revision by Curtisk)
 
(25 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{FeatureStatus
{{FeatureStatus
|Feature name=Modern JIT Compiler for JavaScript
|Feature name=Modern JIT Compiler for JavaScript (IonMonkey)
|Feature stage=Definition
|Feature stage=Landed
|Feature status=In progress
|Feature version=Firefox 18
|Feature health=OK
|Feature health=OK
}}
}}
{{FeatureTeam
{{FeatureTeam
|Feature product manager=Chris Blizzard
|Feature feature manager=David Anderson
|Feature feature manager=David Anderson
|Feature lead engineer=David Anderson, David Mandelin
|Feature lead engineer=David Anderson, David Mandelin
|Feature qa lead=Paul Silaghi
}}
}}
{{FeaturePageBody
{{FeaturePageBody
Line 28: Line 32:


See [[/RegisterAllocator]] for information on the register allocator interfaces.
See [[/RegisterAllocator]] for information on the register allocator interfaces.
|Feature implementation notes=Note: time estimates here are total guesswork, erring on the safe side. Items are in no particular order.
|Feature implementation notes=#<s> '''Bailouts'''</s>
 
## <s>What: Bailouts are the heart of the optimizing compiler. When speculation fails (triggering a type, shape, overflow guard, etc), or C++ throws an exception, or needs to GC, we must be able to inspect the JIT frame, and if needed, reconstruct an interpreter frame.</s>
# '''Bailouts'''
## <s>Dependencies:</s>
## What: Bailouts are the heart of the optimizing compiler. When speculation fails (triggering a type, shape, overflow guard, etc), or C++ throws an exception, or needs to GC, we must be able to inspect the JIT frame, and if needed, reconstruct an interpreter frame.
### <s>Register allocator</s>
## Dependencies:
### <s>Code Generator</s>
### Register allocator
## <s>Work involved:</s>
### Code Generator
### <s>Implementing guards</s>
## Work involved:
### <s>Snapshot building at guard points</s>
### Implementing guards
### <s>Bailout trampoline</s>
### Snapshot building at guard points
### <s>Frame reconstruction</s>
### Bailout trampoline
## <s>Priority: Critical, blocks testing</s>
### Frame reconstruction
## <s>Time: 2-3 weeks</s>
## Priority: Critical, blocks testing
## <s>Owner: dvander</s>
## Time: 2-3 weeks
## <s>Status: <b>DONE</b></s>
## Owner: dvander
# '''Calls out to C++'''
# '''Calls out to C++'''
## What: Ability to call into C++ from JIT code.
## What: Ability to call into C++ from JIT code.
Line 53: Line 56:
### GC needs to walk Ion frames
### GC needs to walk Ion frames
## Priority: Very high
## Priority: Very high
## Time: 3-4 weeks
## Time: 4+ weeks
## Owner: TBD
## Owner: <b>npierron</b>
# '''Property Access and Inline Caches'''
# '''Property Access and Inline Caches'''
## What: Code to handle property access sites
## What: Code to handle property access sites
Line 65: Line 68:
## Time: 4-5 weeks?
## Time: 4-5 weeks?
## Owner: TBD
## Owner: TBD
# '''Function calls'''
# <s>'''Function calls'''</s>
## What: Ability to call other Ion or interpreter JS functions
## <s>What: Ability to call other Ion or interpreter JS functions</s>
## Dependencies: Bailouts, maybe ICs?
## <s>Dependencies: Bailouts</s>
## Work involved:
## <s>Work involved:</s>
### Handle monomorphic versus polymorphic calls (ICs).
### <s>Handle monomorphic versus polymorphic calls (ICs).</s>
### Handle arity mismatches.
### <s>Handle arity mismatches.</s>
### Modify trampolines and calling convention so frame reconstruction can restore nested frames.
### <s>Modify trampolines and calling convention so frame reconstruction can restore nested frames.</s>
## Priority: High
## <s>Priority: High</s>
## Time: 2-3 weeks
## <s>Time: 4+ weeks</s>
## Owner: TBD
## <s>Status: <b>Done, except for TI integration.</b></s>
## <s>Owner: sstangl</s>
# '''Baseline Compiler'''
# '''Baseline Compiler'''
## What: A compiler that replaces JägerMonkey as an untyped and fast compiler.
## What: A compiler that replaces JägerMonkey as an untyped and fast compiler.
Line 100: Line 104:
## Dependencies: None
## Dependencies: None
## Work involved:
## Work involved:
### Explore problem space. Ideally we want to use the same TypeOracle interface for both inference and profiling.
### Use Type Inference to determine specializations and inlining.
### Make a TypeOracle that uses inference results to inform IonMonkey.
### Make a TypeOracle that uses inference results to inform IonMonkey.
## Priority: Medium
### Support on-stack invalidation.
## Time: ???
## Priority: High
## Owner: TBD (maybe bhackett?)
## Time: 4 weeks
# '''Method Inlining'''
## Owner: <b>dvander</b>
## What: Inline methods
# <s>'''Method Inlining'''</s>
## Dependencies: Bailouts, either profiling, ICs, or calls out to C++
## <s>What: Inline methods</s>
## <s>Dependencies: Bailouts, either profiling, ICs, or calls out to C++</s>
## <s>Work involved:</s>
### <s>Some heuristic to determine whether methods should be inlined (this can be totally bogus, but maybe better to start with simple methods).</s>
### <s>Changing IonBuilder such that JSScripts bytecode parsing can be "stacked" so inner SSA graph is inlined.</s>
### <s>Change M/LSnapshots to be nested, so snapshots in an inner frame all point to the same outer snapshot.</s>
### <s>Change snapshot encoding and frame reconstruction to support inlining.</s>
## <s>Priority: Medium</s>
## <s>Time: 3 weeks</s>
## <s>Owner: <b>cdleary</b></s>
# <s>'''On-Stack Replacement'''</s>
## <s>What: Jump into JIT code at loop headers, possibly by profiling off-thread.</s>
## <s>Work involved:</s>
### <s>Explore ways to monitor hotness of JIT code.</s>
### <s>Implement the ability to jump into Ion-compiled code at loop headers, possibly by inserting special OSR nodes in the IR.</s>
## <s>Priority: Medium</s>
## <s>Time: 4 weeks</s>
## <s>Owner: <b>sstangl</b></s>
# '''ARM Port'''
## What: Port IonMonkey to ARM
## Work involved:
## Work involved:
### Some heuristic to determine whether methods should be inlined (this can be totally bogus, but maybe better to start with simple methods).
### Bootstrap ARM to x86 parity so both develop at the same time.
### Changing IonBuilder such that JSScripts bytecode parsing can be "stacked" so inner SSA graph is inlined.
## Priority: High
### Change M/LSnapshots to be nested, so snapshots in an inner frame all point to the same outer snapshot.
## Time: 4 weeks
### Change snapshot encoding and frame reconstruction to support inlining.
## <b>Owner: mrosenberg</b>
## Priority: Medium
## Time: 4-6 weeks
## Owner: TBD
# '''On-Stack Replacement'''
## What: Jump into JIT code at loop headers, possibly by profiling off-thread.
## Work involved:
### Explore ways to monitor hotness of JIT code.
### Implement the ability to jump into Ion-compiled code at loop headers, possibly by inserting special OSR nodes in the IR.
## Priority: Medium
## Time: ??? Probably less than a month
## Owner: TBD
# '''Debugging'''
# '''Debugging'''
## What: Work with jsd/jsdbg2 or whatever debugging APIs are required.
## What: Work with jsd/jsdbg2 or whatever debugging APIs are required.
Line 134: Line 146:
## Time: ???
## Time: ???
## Owner: TBD
## Owner: TBD
 
# '''Testing'''
 
## What: We should be testing everything - correctness, perf, memory.
## Dependencies: Bailouts
## Work involved:
### Making sure tbpl stays green, frequent merging from m-c.
### Breaking down memory, cpu time of each Ion pass.
### AWFY lines.
## Priority: High
## Time: Continuous
## Owner: everyone
}}
}}
{{FeatureInfo
{{FeatureInfo
|Feature priority=P1
|Feature priority=P1
|Feature rank=1
|Feature roadmap=Platform
|Feature roadmap=Platform
|Feature list=Platform
|Feature list=Platform
|Feature project=Responsiveness
|Feature engineering team=JavaScript
|Feature engineering team=JavaScript
}}
}}
{{FeatureTeamStatus}}
{{FeatureTeamStatus
|Feature security status=sec-review-unnecessary
|Feature security health=OK
}}
Confirmed users, Bureaucrats and Sysops emeriti
674

edits