Changes between Version 6 and Version 7 of Internships/JanStolarek


Ignore:
Timestamp:
Jul 5, 2013 11:29:23 AM (10 months ago)
Author:
jstolarek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Internships/JanStolarek

    v6 v7  
    3535When generating Cmm from STG there is some SRT information being generated (only for CAFS?). It is not used and has to be rebuilt anyway after converting to CPS Cmm. Below are some random notes and pieces of code that might related to this: 
    3636   
    37   * Cmm conversions in the compiler pipeline: `main/HscMain.hs` has `tryNewCodeGen` (l. 1300), which first calls `StgCmm.codegen` and then passes the generated Cmm to `cmmPipeline` function from `cmm/CmmPipeline.hs`. According to Austin Seipp `cpsTop` in `cmm/CmmPipeline.hs` takes care of converting to CPS: "yeah, CmmPipeline does take care of it. it's partially cpsTop that does it, and doSRTs elaborates the top-level info tables and stuff beyond that but mostly cpsTop. i think your general turning point is after the stack layout and stack pointer manifestation".  
     37  * Cmm conversions in the compiler pipeline: `main/HscMain.hs` has `tryNewCodeGen` (l. 1300), which first calls `StgCmm.codegen` and then passes the generated Cmm to `cmmPipeline` function from `cmm/CmmPipeline.hs`. According to Austin Seipp `cpsTop` in `cmm/CmmPipeline.hs` takes care of converting to CPS: "yeah, !CmmPipeline does take care of it. it's partially cpsTop that does it, and doSRTs elaborates the top-level info tables and stuff beyond that but mostly cpsTop. i think your general turning point is after the stack layout and stack pointer manifestation".  
    3838 
    3939This code in `cmm/Cmm.hs` that might be relevant (or not): 
     
    110110 
    111111= Various stuff = 
     112Tickets that I could potentially look into: 
     113 
     114  * 4101 - Primitive constant unfolding 
     115  * 3070 - floor(0/0) should not be defined 
     116  * 3676 - realToFrac doesn't sanely convert between floating types 
     117  * 3744 - Comparisons against minBound/maxBound not optimised 
     118  * 5615 - ghc produces poor code for `div` with constant powers of 2. 
     119  * 7116 - Missing optimisation: strength reduction of floating-point multiplication 
     120  * 7858 - Fix definitions of abs/signum for Floats/Doubles. 
     121 
     122Other things to do: 
     123  * improve Cmm dumping 
     124  * investigate opportunities for improving heap checks. An idea: if a worker knows its heap requirements it could pass them to the caller, thus avoiding the heap check. A question: how much time do we really spend on heap checks? 
     125 
    112126Some LLVM notes that may be useful: 
    113127  - [wiki:Commentary/Compiler/Backends/LLVM/Alias LLVM Alias Notes]