Changes between Version 6 and Version 7 of Commentary/Compiler/Backends/LLVM/Design


Ignore:
Timestamp:
Jun 25, 2010 1:47:38 PM (5 years ago)
Author:
dterei
Comment:

Remove llvm-as stage since we don't use it

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/Backends/LLVM/Design

    v6 v7  
    348348After code generation there are three more stages, they are simply calls to the LLVM tools though:
    349349
    350   * '''LLVM Asssembler''': This is a very simple stage in which the human readable text version of LLVM assembly code is translated to the binary bitcode format. This is done by simply invoking the LLVM llvm-as tool on the stage input file.
    351   * '''LLVM Optimisation''': In this section a range of LLVM’s optimisations are applied to the bitcode file, resulting in a new optimised bitcode file. This is done by simply invoking the LLVM opt tool on the stage input file. The optimisations are selected using the standard optimisation groups of ’-O1’, ’-O2’, ’-O3’ provided by opt, depending on the level of optimisation requested by the user when they invoked GHC.
     350  * '''LLVM Optimisation''': In this section a range of LLVM’s optimisations are applied to the llvm file, resulting in a new optimised bitcode file. This is done by simply invoking the LLVM opt tool on the stage input file. The optimisations are selected using the standard optimisation groups of '-mem2reg' (O0), '-O1', '-O2' provided by opt, depending on the level of optimisation requested by the user when they invoked GHC. LLVM also supports '-O3' but that needs to be set by the user through -opt-lo-O3.
    352351  * '''LLVM Compiler''': This is the final stage in which the input LLVM bitcode file is compiled to native assembly for the target machine. This is done by simply invoking the LLVM llc tool on the stage input file.