Commit 5b986a4d authored by Simon Peyton Jones's avatar Simon Peyton Jones Committed by Joachim Breitner

CSE code cleanup and improvement

Triggered by an observation by Joachim, Simon felt the urge to clean up
the CSE code a bit. This is the result.

(Code by Simon, commit message and other leg-work by Joachim)

Differential Revision: https://phabricator.haskell.org/D2074
parent 2265c849
This diff is collapsed.
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 32, types: 17, coercions: 0}
Result size of Tidy Core = {terms: 46, types: 23, coercions: 0}
-- RHS size: {terms: 2, types: 0, coercions: 0}
T7116.$trModule2 :: GHC.Types.TrName
......@@ -47,7 +47,7 @@ dr =
\ (x :: Double) ->
case x of { GHC.Types.D# x1 -> GHC.Types.D# (GHC.Prim.+## x1 x1) }
-- RHS size: {terms: 1, types: 0, coercions: 0}
-- RHS size: {terms: 8, types: 3, coercions: 0}
dl :: Double -> Double
[GblId,
Arity=1,
......@@ -58,7 +58,9 @@ dl :: Double -> Double
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (x [Occ=Once!] :: Double) ->
case x of { GHC.Types.D# y -> GHC.Types.D# (GHC.Prim.+## y y) }}]
dl = dr
dl =
\ (x :: Double) ->
case x of { GHC.Types.D# y -> GHC.Types.D# (GHC.Prim.+## y y) }
-- RHS size: {terms: 8, types: 3, coercions: 0}
fr :: Float -> Float
......@@ -79,7 +81,7 @@ fr =
GHC.Types.F# (GHC.Prim.plusFloat# x1 x1)
}
-- RHS size: {terms: 1, types: 0, coercions: 0}
-- RHS size: {terms: 8, types: 3, coercions: 0}
fl :: Float -> Float
[GblId,
Arity=1,
......@@ -92,7 +94,11 @@ fl :: Float -> Float
case x of { GHC.Types.F# y ->
GHC.Types.F# (GHC.Prim.plusFloat# y y)
}}]
fl = fr
fl =
\ (x :: Float) ->
case x of { GHC.Types.F# y ->
GHC.Types.F# (GHC.Prim.plusFloat# y y)
}
......@@ -624,13 +624,14 @@ test('T9020',
[(wordsize(32), 343005716, 10),
# Original: 381360728
# 2014-07-31: 343005716 (Windows) (general round of updates)
(wordsize(64), 698401736, 10)])
(wordsize(64), 852298336, 10)])
# prev: 795469104
# 2014-07-17: 728263536 (general round of updates)
# 2014-09-10: 785871680 post-AMP-cleanup
# 2014-11-03: 680162056 Further Applicative and Monad adjustments
# 2015-10-21: 786189008 Make stronglyConnCompFromEdgedVertices deterministic
# 2016-01-26: 698401736 improvement from using ExpTypes instead of ReturnTvs
# 2016-04-06: 852298336 Refactoring of CSE #11781
],
compile,[''])
......@@ -695,12 +696,13 @@ test('T9872a',
test('T9872b',
[ only_ways(['normal']),
compiler_stats_num_field('bytes allocated',
[(wordsize(64), 4918990352, 5),
[(wordsize(64), 4600233488, 5),
# 2014-12-10 6483306280 Initally created
# 2014-12-16 6892251912 Flattener parameterized over roles
# 2014-12-18 3480212048 Reduce type families even more eagerly
# 2015-12-11 5199926080 TypeInType (see #11196)
# 2016-02-08 4918990352 Improved a bit by tyConRolesRepresentational
# 2016-04-06: 4600233488 Refactoring of CSE #11781
(wordsize(32), 2422750696, 5)
# was 1700000000
# 2016-04-06 2422750696 x86/Linux
......@@ -711,12 +713,13 @@ test('T9872b',
test('T9872c',
[ only_ways(['normal']),
compiler_stats_num_field('bytes allocated',
[(wordsize(64), 4454071184, 5),
[(wordsize(64), 4306667256, 5),
# 2014-12-10 5495850096 Initally created
# 2014-12-16 5842024784 Flattener parameterized over roles
# 2014-12-18 2963554096 Reduce type families even more eagerly
# 2015-12-11 4723613784 TypeInType (see #11196)
# 2016-02-08 4454071184 Improved a bit by tyConRolesRepresentational
# 2016-04-06: 4306667256 Refactoring of CSE #11781
(wordsize(32), 2257242896, 5)
# was 1500000000
# 2016-04-06 2257242896
......
......@@ -51,7 +51,7 @@ test('haddock.base',
test('haddock.Cabal',
[unless(in_tree_compiler(), skip), req_haddock
,stats_num_field('bytes allocated',
[(wordsize(64), 10941742184, 5)
[(wordsize(64), 11542374816, 5)
# 2012-08-14: 3255435248 (amd64/Linux)
# 2012-08-29: 3324606664 (amd64/Linux, new codegen)
# 2012-10-08: 3373401360 (amd64/Linux)
......@@ -77,6 +77,7 @@ test('haddock.Cabal',
# 2015-12-22: 10519532424 (amd64/Linux) - Lots of new Semigroup instances in Cabal
# 2016-03-29: 11517963232 (amd64/Linux) - not yet investigated
# 2016-03-30: 10941742184 (amd64/Linux) - defer inlining of Int* Ord methods
# 2016-04-06: 11542374816 (amd64/Linux) - CSE improvements and others
,(platform('i386-unknown-mingw32'), 3293415576, 5)
# 2012-10-30: 1733638168 (x86/Windows)
......
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