Changes between Version 12 and Version 13 of Commentary/Compiler/CodeGen


Ignore:
Timestamp:
May 24, 2007 1:53:14 PM (7 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/CodeGen

    v12 v13  
    7171 
    7272== Modules == 
     73=== Primary Modules === 
    7374  {{{CodeGen}}}:: Top level. Called by the {{{HscMain}}} module. 
     75  {{{CgClosure}}}:: Called by {{{CodeGen}}} for top level bindings. 
     76  {{{CgCon}}}:: Called by {{{CodeGen}}} for data types. 
     77 
     78  {{{CgExpr}}}:: Called by {{{CgClosure}}} and {{{CgCon}}}. 
     79    Since everything in STG is an expression, almost everything branches off from here. 
    7480 
    7581  {{{CgMonad}}}:: The monad that most of codeGen operates inside 
     
    8086   * flatten 
    8187 
    82   {{{CgExpr}}}:: Seems to be the core function since everything in STG is an expression 
    83  
    8488=== Memory and Register Management === 
    85  CgBindery:: 
     89 {{{CgBindery}}}:: 
    8690   Module for {{{CgBindings}}} which maps variable names 
    8791   to all the volitile or stable locations where they are stored 
     
    9094   for adding, modifying and looking up bindings. 
    9195 
    92  CgStackery:: 
     96 {{{CgStackery}}}:: 
    9397   Mostly utility functions for allocating and freeing stack slots. 
    9498   But also has things on setting up update frames. 
    9599 
    96  CgHeapery:: 
     100 {{{CgHeapery}}}:: 
    97101   Functions for allocating objects that appear on the heap such as closures and constructors. 
    98102   Also includes code for stack and heap checks and {{{emitSetDynHdr}}}. 
    99103 
    100104=== Misc utilities === 
    101  Bitmap:: 
     105 {{{Bitmap}}}:: 
    102106   Utility functions for making bitmaps (e.g. {{{mkBitmap}}} with type {{{[Bool] -> Bitmap}}}) 
    103  ClosureInfo:: 
    104    Stores info about the memory layouts of closures 
    105  SMRep:: 
     107 {{{ClosureInfo}}}:: 
     108   Stores info about closures and bindings. 
     109   Includes information about memory layout, how to call a binding ({{{LambdaFormInfo}}}) 
     110   and information used to build the info table ({{{ClosureInfo}}}). 
     111 {{{SMRep}}}:: 
    106112   Storage manager representation of closures. 
    107113   Part of ClosureInfo but kept separate to "keep nhc happy." 
    108  CgUtils:: TODO 
     114 {{{CgUtils}}}:: TODO 
    109115 
    110116=== Special runtime support === 
    111  CgTicky:: Ticky-ticky profiling 
    112  CgProf:: Cost-centre profiling 
    113  CgHpc:: Support for the Haskell Program Coverage (hpc) toolkit, inside GHC. 
    114  CgParallel:: 
     117 {{{CgTicky}}}:: Ticky-ticky profiling 
     118 {{{CgProf}}}:: Cost-centre profiling 
     119 {{{CgHpc}}}:: Support for the Haskell Program Coverage (hpc) toolkit, inside GHC. 
     120 {{{CgParallel}}}:: 
    115121   Code generation for GranSim (GRAN) and parallel (PAR). 
    116122   All the functions are dead stubs except {{{granYield}}} and {{{granFetchAndReschedule}}}. 
     
    119125Please help classify these if you know what they are. 
    120126 
    121  Maybe top-level:: It seems that codeGen calls these two which in turn call CgExpr 
    122   * CgClosure 
    123   * CgCon 
     127 CgInfoTbls 
     128 CgCallConv 
    124129 
    125130 CgCase 
    126131 CgLetNoEscape 
    127132 
    128  CgInfoTbls 
    129  CgCallConv 
    130  
    131133 CgPrimOp 
    132134 CgTailCall