Changes between Version 3 and Version 4 of Commentary/Hpc


Ignore:
Timestamp:
Dec 8, 2006 5:00:24 AM (9 years ago)
Author:
andykam
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Hpc

    v3 v4  
    44 
    55The basic idea is this 
    6  * For each (sub)expression in the Haskell Syntax, write the (sub)expression in a HsTick 
     6 * For each (sub)expression in the Haskell Syntax, write the (sub)expression in a     
     7   `HsTick` 
    78 * Each `HsTick` has a module local index number. 
    89 * There is a table (The Mix datastructure) that maps this index number to original source location. 
     
    1718   * The do-not-remove is enforced via the ... function in .... 
    1819   * The semantics are tick if-and-when-and-as you enter the `DEFAULT` case. But a chain of consecutive ticks can be executed in any order. 
    19  * The CoreToStg Pass translates the ticks into `StgTick` 
     20 * The !CoreToStg Pass translates the ticks into `StgTick` 
    2021{{{ 
    2122  .. (case tick<m,n> of DEFAULT -> e) = .. StgTick m n (... e) 
     
    3132 if e then (tick a True) else (tick b False) 
    3233}}} 
    33 is tick<a> True is a CAF, and gets lifted to top level. This maintain the coverage information, but does not allow for entry counting. If the if/then/else is called 100 times, and no exceptions were thrown, then you would expect the binary tick count to add up to 100. We hope to use Hpc to do path optimization in the future, so real numbers are important. 
     34is that `tick<a> True` is a CAF, and gets lifted to top level. This maintain the coverage information, but does not allow for entry counting. If the if/then/else is called 100 times, and no exceptions were thrown, then you would expect the binary tick count to add up to 100. We hope to use Hpc to do path optimization in the future, so real numbers are important. 
    3435  
    35 Also, we translate the tick late to allow case-of-case to work, allowing unboxed compares to work without generating boolean intermeduates. We still need to push one optimzation into the simpifier for this to work well. 
     36Also, we translate the tick late to allow case-of-case to work, allowing unboxed compares to work without generating boolean intermediates. We still need to push one optimization into the simplifier for this to work well.