Changes between Version 3 and Version 4 of Commentary/Hpc
 Timestamp:
 Dec 8, 2006 5:00:24 AM (10 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Commentary/Hpc
v3 v4 4 4 5 5 The 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` 7 8 * Each `HsTick` has a module local index number. 8 9 * There is a table (The Mix datastructure) that maps this index number to original source location. … … 17 18 * The donotremove is enforced via the ... function in .... 18 19 * The semantics are tick ifandwhenandas 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` 20 21 {{{ 21 22 .. (case tick<m,n> of DEFAULT > e) = .. StgTick m n (... e) … … 31 32 if e then (tick a True) else (tick b False) 32 33 }}} 33 is t ick<a> Trueis 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.34 is 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. 34 35 35 Also, we translate the tick late to allow caseofcase to work, allowing unboxed compares to work without generating boolean intermed uates. We still need to push one optimzation into the simpifier for this to work well.36 Also, we translate the tick late to allow caseofcase 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.