diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-03-03 15:47:47 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-03 15:47:48 -0500 |
commit | c1dacb8a9c18677495bbe7e41391f8ca7a573070 (patch) | |
tree | 9f3e33766337e42511b75795b264bc4393c08ade /testsuite/tests/simplCore/should_compile | |
parent | a694cee77b64235b42029fea248453ddf6b17d17 (diff) | |
download | haskell-c1dacb8a9c18677495bbe7e41391f8ca7a573070.tar.gz |
Produce KindReps for common kinds in GHC.Types
Unfortunately this comes with a fair bit of implementation cost. Perhaps
some refactoring would help, but in the interest of getting 8.2 out the
door I'm pushing as-is.
While this doesn't have nearly the effect on compiler allocations
that D3166 has, it's still nothing to sneeze at. nofib shows,
```
------------------------------------------------------------------------
Program master D3166 D3219
------------------------------------------------------------------------
-1 s.d. ----- -3.555% -4.081%
+1 s.d. ----- +1.937% +1.593%
Average ----- -0.847% -1.285%
```
Test Plan: Validate
Reviewers: austin
Subscribers: thomie, simonmar
Differential Revision: https://phabricator.haskell.org/D3219
Diffstat (limited to 'testsuite/tests/simplCore/should_compile')
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T7360.stderr | 19 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T8274.stdout | 8 |
2 files changed, 11 insertions, 16 deletions
diff --git a/testsuite/tests/simplCore/should_compile/T7360.stderr b/testsuite/tests/simplCore/should_compile/T7360.stderr index 22a7a64d92..118ebbe886 100644 --- a/testsuite/tests/simplCore/should_compile/T7360.stderr +++ b/testsuite/tests/simplCore/should_compile/T7360.stderr @@ -1,7 +1,7 @@ ==================== Tidy Core ==================== Result size of Tidy Core - = {terms: 117, types: 54, coercions: 0, joins: 0/0} + = {terms: 114, types: 53, coercions: 0, joins: 0/0} -- RHS size: {terms: 6, types: 3, coercions: 0, joins: 0/0} T7360.$WFoo3 [InlPrag=INLINE[2]] :: Int -> Foo @@ -126,27 +126,22 @@ $krep = GHC.Types.KindRepTyConApp GHC.Types.$tcInt (GHC.Types.[] @ GHC.Types.KindRep) --- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} -T7360.$tcFoo1 [InlPrag=[~]] :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m5] -T7360.$tcFoo1 = GHC.Types.KindRepTYPE GHC.Types.LiftedRep - -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} -T7360.$tcFoo3 :: GHC.Prim.Addr# +T7360.$tcFoo2 :: GHC.Prim.Addr# [GblId, Caf=NoCafRefs, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] -T7360.$tcFoo3 = "Foo"# +T7360.$tcFoo2 = "Foo"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} -T7360.$tcFoo2 :: GHC.Types.TrName +T7360.$tcFoo1 :: GHC.Types.TrName [GblId, Caf=NoCafRefs, Str=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] -T7360.$tcFoo2 = GHC.Types.TrNameS T7360.$tcFoo3 +T7360.$tcFoo1 = GHC.Types.TrNameS T7360.$tcFoo2 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} T7360.$tcFoo :: GHC.Types.TyCon @@ -160,9 +155,9 @@ T7360.$tcFoo 1581370841583180512## 13291578023368289311## T7360.$trModule - T7360.$tcFoo2 - 0# T7360.$tcFoo1 + 0# + GHC.Types.krep$* -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0} T7360.$tc'Foo4 [InlPrag=[~]] :: GHC.Types.KindRep diff --git a/testsuite/tests/simplCore/should_compile/T8274.stdout b/testsuite/tests/simplCore/should_compile/T8274.stdout index a8e7954f1a..12ab2439dc 100644 --- a/testsuite/tests/simplCore/should_compile/T8274.stdout +++ b/testsuite/tests/simplCore/should_compile/T8274.stdout @@ -11,13 +11,13 @@ $krep3 = GHC.Types.KindRepTyConApp GHC.Types.$tcFloat# (GHC.Types.[] @ GHC.Types $krep4 = GHC.Types.KindRepTyConApp GHC.Types.$tcInt# (GHC.Types.[] @ GHC.Types.KindRep) T8274.$tcP2 :: Addr# T8274.$tcP2 = "P"# -T8274.$tcP = GHC.Types.TyCon 7483823267324216774## 12197132127820124256## T8274.$trModule T8274.$tcP1 0# T8274.$tcN1 +T8274.$tcP = GHC.Types.TyCon 7483823267324216774## 12197132127820124256## T8274.$trModule T8274.$tcP1 0# GHC.Types.krep$* T8274.$tc'Positives3 :: Addr# T8274.$tc'Positives3 = "'Positives"# = GHC.Types.TyCon 14886798270706315033## 15735393004803600911## T8274.$trModule T8274.$tc'Positives2 0# T8274.$tc'Positives1 -T8274.$tcN3 :: Addr# -T8274.$tcN3 = "N"# -T8274.$tcN = GHC.Types.TyCon 17387464673997143412## 16681536026493340311## T8274.$trModule T8274.$tcN2 0# T8274.$tcN1 +T8274.$tcN2 :: Addr# +T8274.$tcN2 = "N"# +T8274.$tcN = GHC.Types.TyCon 17387464673997143412## 16681536026493340311## T8274.$trModule T8274.$tcN1 0# GHC.Types.krep$* T8274.$tc'Negatives3 :: Addr# T8274.$tc'Negatives3 = "'Negatives"# = GHC.Types.TyCon 14330047746189143983## 12207513731214201811## T8274.$trModule T8274.$tc'Negatives2 0# T8274.$tc'Negatives1 |