Changes between Initial Version and Version 1 of Ticket #5000


Ignore:
Timestamp:
Mar 7, 2011 10:48:51 AM (3 years ago)
Author:
batterseapower
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5000 – Description

    initial v1  
    1 One of my programs has this is the output of GHC -O2: 
     1One of my programs has this is the output of the post-worker/wrapper simplification: 
    22 
    33{{{ 
     
    88[LclId, 
    99 Arity=4, 
     10 Str=DmdType LLLL, 
    1011 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, 
    1112         ConLike=True, Cheap=True, Expandable=True, 
     
    3233[LclId, 
    3334 Arity=4, 
     35 Str=DmdType LLLS, 
    3436 Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=4, Value=True, 
    3537         ConLike=True, Cheap=True, Expandable=True, 
    36          Guidance=IF_ARGS [0 0 0 5] 9 0}] 
     38         Guidance=IF_ARGS [0 0 0 3] 7 0}] 
    3739h29_s14O = 
    3840  \ (@ t_aMK) 
     
    4345    (x_u590_amp :: Main.Nat) -> 
    4446    case x_u590_amp of _ { 
    45       Main.Z -> h21'_al8 @ Main.Nat az94z94z941_u439_amm; 
    46       Main.S x_u595_amq -> 
     47      Main.Z -> az94z94z941_u439_amm; 
     48      Main.S x_u595_amq [Dmd=Just L] -> 
    4749        h28_s14N 
    4850          @ t_aMK 
     
    5860This is ridiculous because the two awS1 arguments are totally dead. This greatly increases allocations made by the program. 
    5961 
    60 I speculate that this occurs because the recursive call to h29 is guarded by a use of the S constructor, making it non-strict. 
     62These absent arguments should be removed by the strictness analyser, However I speculate that this occurs because the recursive call to h29 is guarded by a use of the S constructor, making it non-strict.