[GHC] #2598: Avoid excessive specialisation in SpecConstr
GHC
cvs-ghc at haskell.org
Thu Mar 7 17:51:46 CET 2013
#2598: Avoid excessive specialisation in SpecConstr
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: feature request | Status: new
Priority: lowest | Milestone: 7.6.2
Component: Compiler | Version: 6.8.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by morabbin):
* failure: => None/Unknown
Comment:
Is this moot now? With GHC 7.6.2:
{{{
ghc --make -fforce-recomp -c -ddverbose-core2core -dshow-passes -O2
DropComment.hs
}}}
on the attached `DropComment.hs` produces (among other things):
{{{
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 70, types: 50, coercions: 0}
Rec {
lvl_rid :: [GHC.Types.Char]
[GblId]
lvl_rid = DropComment.dropComment (GHC.Types.[] @ GHC.Types.Char)
DropComment.dropComment [Occ=LoopBreaker]
:: [GHC.Types.Char] -> [GHC.Types.Char]
[GblId, Arity=1, Str=DmdType S]
DropComment.dropComment =
\ (ds_deO :: [GHC.Types.Char]) ->
case ds_deO of _ {
[] -> GHC.Types.[] @ GHC.Types.Char;
: ds1_deP ds2_deQ ->
case ds1_deP of wild1_X7 { GHC.Types.C# ds3_deR ->
case ds3_deR of _ {
__DEFAULT ->
GHC.Types.:
@ GHC.Types.Char wild1_X7 (DropComment.dropComment ds2_deQ);
' ' ->
case ds2_deQ of wild2_Xa {
[] -> GHC.Types.: @ GHC.Types.Char wild1_X7 lvl_rid;
: ds5_deS ds6_deT ->
case ds5_deS of _ { GHC.Types.C# ds7_deU ->
case ds7_deU of _ {
__DEFAULT ->
GHC.Types.:
@ GHC.Types.Char wild1_X7 (DropComment.dropComment
wild2_Xa);
'-' ->
case ds6_deT of _ {
[] ->
GHC.Types.:
@ GHC.Types.Char wild1_X7
(DropComment.dropComment wild2_Xa);
: ds9_deV ds10_deW ->
case ds9_deV of _ { GHC.Types.C# ds11_deX ->
case ds11_deX of _ {
__DEFAULT ->
GHC.Types.:
@ GHC.Types.Char wild1_X7
(DropComment.dropComment wild2_Xa);
'-' ->
case ds10_deW of _ {
[] ->
GHC.Types.:
@ GHC.Types.Char wild1_X7
(DropComment.dropComment wild2_Xa);
: ds13_deY ds14_deZ ->
case ds13_deY of _ { GHC.Types.C# ds15_df0
->
case ds15_df0 of _ {
__DEFAULT ->
GHC.Types.:
@ GHC.Types.Char wild1_X7
(DropComment.dropComment wild2_Xa);
' ' -> GHC.Types.[] @ GHC.Types.Char
}
}
}
}
}
}
}
}
}
}
}
}
end Rec }
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2598#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list