Changes between Version 10 and Version 11 of FTLJIT


Ignore:
Timestamp:
Jan 28, 2016 12:50:27 PM (8 years ago)
Author:
fpizlo@apple.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FTLJIT

    v10 v11  
    1 The FTL JIT is JavaScriptCore's top-tier optimizing compiler.  It's a combination of our DFG compiler for doing high-level optimizations and type inference, and a lowering phase that turns that code into C-like SSA.  Currently it can be configured to use either B3 or LLVM as the backend:
     1The FTL JIT is JavaScriptCore's top-tier optimizing compiler.  It's a combination of our DFG compiler for doing high-level optimizations and type inference, and a lowering phase that turns that code into C-like SSA.  Currently it can be configured to use either [wiki:BareBonesBackend B3] or LLVM as the backend:
    22
    33- The FTL JIT started out as a marriage of the DFG and LLVM.  We are phasing out LLVM support, but it's currently still possible to configure FTL to use LLVM.
     
    1515The FTL is integrated as an alternative backend for the DFG JIT but largely reuses existing DFG functionality.  The FTL differs from the DFG as follows:
    1616
    17 - Instead of generating machine code directly from the DFG IR, the DFG IR is lowered to a C-like SSA IR.  The IR is abstracted by the FTL.  We refer to it as "FTL output".  FTL output can be configured to abstract over either LLVM IR or B3 IR.  When configured to use LLVM, the FTL invokes the LLVM optimization pipeline and backend to generate machine code.  That machine code is then managed by the JSC executable memory manager no differently than if it were generated by our own backends.  When configured to use B3, the FTL tells B3 to optimize and generate the code using WebKit's MacroAssembler API.  This leads to a natural integration between B3 and JSC executable memory management.
     17- Instead of generating machine code directly from the DFG IR, the DFG IR is lowered to a C-like SSA IR.  The IR is abstracted by the FTL.  We refer to it as "FTL output".  FTL output can be configured to abstract over either LLVM IR or [wiki:B3IntermediateRepresentation B3 IR].  When configured to use LLVM, the FTL invokes the LLVM optimization pipeline and backend to generate machine code.  That machine code is then managed by the JSC executable memory manager no differently than if it were generated by our own backends.  When configured to use B3, the FTL tells B3 to optimize and generate the code using WebKit's MacroAssembler API.  This leads to a natural integration between B3 and JSC executable memory management.
    1818- Additional DFG phases are used.  Running in FTL mode causes the DFG to lower to SSA even before lowering to LLVM IR.  Additional optimizations like LICM are performed on the DFG-SSA IR.
    1919