Commit 742978f4 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Follow output wibbles

T3064 has better residency than before, but slightly
worse allocation because the simplifier does one more
iteration.  That's as a result of the eta-expansion, which
leads to a knock-on inlining -- it's a good thing.
parent 7f697628
......@@ -110,15 +110,15 @@ test('T3064',
compiler_stats_num_field('peak_megabytes_allocated', 8, 11)),
# expected value: 18 (amd64/Linux):
if_wordsize(64,
compiler_stats_num_field('peak_megabytes_allocated', 11, 16)),
compiler_stats_num_field('peak_megabytes_allocated', 9, 13)),
# expected value: 56380288 (x86/Linux) (28/6/2011)
if_wordsize(32,
compiler_stats_num_field('bytes allocated', 50000000,
60000000)),
62000000)),
# expected value: 108937496 (amd64/Linux) (28/6/2011):
if_wordsize(64,
compiler_stats_num_field('bytes allocated', 100000000,
120000000)),
122000000)),
# expected value: 2247016 (x86/Linux) (28/6/2011):
if_wordsize(32,
compiler_stats_num_field('max_bytes_used', 2000000,
......
==================== Tidy Core ====================
Result size = 22
Rec {
T3717.$wfoo [Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType L]
......
==================== Tidy Core ====================
Result size = 26
Rec {
xs :: GHC.Prim.Int# -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType L]
......
==================== Tidy Core ====================
Result size = 54
Rec {
T4908.f_$s$wf [Occ=LoopBreaker]
:: GHC.Types.Int
-> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Types.Bool
:: GHC.Prim.Int#
-> GHC.Types.Int -> GHC.Prim.Int# -> GHC.Types.Bool
[GblId, Arity=3, Caf=NoCafRefs, Str=DmdType LLL]
T4908.f_$s$wf =
\ (sc :: GHC.Types.Int)
(sc1 :: GHC.Prim.Int#)
\ (sc :: GHC.Prim.Int#)
(sc1 :: GHC.Types.Int)
(sc2 :: GHC.Prim.Int#) ->
case sc2 of ds {
case sc of ds {
__DEFAULT ->
case sc1 of ds1 {
__DEFAULT -> T4908.f_$s$wf sc ds1 (GHC.Prim.-# ds 1);
case sc2 of ds1 {
__DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) sc1 ds1;
0 -> GHC.Types.True
};
0 -> GHC.Types.True
......@@ -36,7 +38,7 @@ T4908.$wf =
case w of _ { (a, b) ->
case b of _ { GHC.Types.I# ds1 ->
case ds1 of ds2 {
__DEFAULT -> T4908.f_$s$wf a ds2 (GHC.Prim.-# ds 1);
__DEFAULT -> T4908.f_$s$wf (GHC.Prim.-# ds 1) a ds2;
0 -> GHC.Types.True
}
}
......@@ -64,10 +66,10 @@ T4908.f =
------ Local rules for imported ids --------
"SC:$wf0" [ALWAYS]
forall (sc :: GHC.Types.Int)
(sc1 :: GHC.Prim.Int#)
forall (sc :: GHC.Prim.Int#)
(sc1 :: GHC.Types.Int)
(sc2 :: GHC.Prim.Int#).
T4908.$wf sc2 (sc, GHC.Types.I# sc1)
T4908.$wf sc (sc1, GHC.Types.I# sc2)
= T4908.f_$s$wf sc sc1 sc2
==================== Tidy Core ====================
Result size = 23
lvl :: [GHC.Types.Char]
[GblId]
lvl = GHC.CString.unpackCString# "Too small"
......
==================== Tidy Core ====================
Result size = 155
Roman.foo2 :: GHC.Types.Int
[GblId,
Caf=NoCafRefs,
......@@ -37,19 +39,19 @@ Roman.foo_$s$wgo =
GHC.Prim.+#
(GHC.Prim.+#
(GHC.Prim.+#
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc)
sc)
sc } in
case GHC.Prim.<=# sc1 0 of _ {
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc1 sc1) sc1) sc1) sc1)
sc1)
sc1 } in
case GHC.Prim.<=# sc 0 of _ {
GHC.Types.False ->
case GHC.Prim.<# sc1 100 of _ {
case GHC.Prim.<# sc 100 of _ {
GHC.Types.False ->
case GHC.Prim.<# sc1 500 of _ {
case GHC.Prim.<# sc 500 of _ {
GHC.Types.False ->
Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1);
GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3)
Roman.foo_$s$wgo (GHC.Prim.-# sc 1) (GHC.Prim.+# a a);
GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 3) a
};
GHC.Types.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2)
GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# sc 2) sc1
};
GHC.Types.True -> 0
}
......@@ -85,7 +87,7 @@ Roman.$wgo =
ipv)
ipv } in
case w of _ {
Data.Maybe.Nothing -> Roman.foo_$s$wgo a 10;
Data.Maybe.Nothing -> Roman.foo_$s$wgo 10 a;
Data.Maybe.Just n ->
case n of _ { GHC.Types.I# x2 ->
case GHC.Prim.<=# x2 0 of _ {
......@@ -94,10 +96,10 @@ Roman.$wgo =
GHC.Types.False ->
case GHC.Prim.<# x2 500 of _ {
GHC.Types.False ->
Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# x2 1);
GHC.Types.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3)
Roman.foo_$s$wgo (GHC.Prim.-# x2 1) (GHC.Prim.+# a a);
GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 3) a
};
GHC.Types.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2)
GHC.Types.True -> Roman.foo_$s$wgo (GHC.Prim.-# x2 2) ipv
};
GHC.Types.True -> 0
}
......@@ -138,15 +140,15 @@ Roman.foo :: GHC.Types.Int -> GHC.Types.Int
Roman.foo =
\ (n :: GHC.Types.Int) ->
case n of _ { GHC.Types.I# ipv ->
case Roman.foo_$s$wgo 6 ipv of ww { __DEFAULT -> GHC.Types.I# ww }
case Roman.foo_$s$wgo ipv 6 of ww { __DEFAULT -> GHC.Types.I# ww }
}
------ Local rules for imported ids --------
"SC:$wgo0" [ALWAYS]
forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#).
Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1))
(Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc))
Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc))
(Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1))
= Roman.foo_$s$wgo sc sc1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment