summaryrefslogtreecommitdiff
path: root/testsuite/tests/roles/should_compile/Roles2.stderr
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-03-03 14:39:00 -0500
committerBen Gamari <ben@smart-cactus.org>2017-03-03 14:39:01 -0500
commita694cee77b64235b42029fea248453ddf6b17d17 (patch)
tree1177b386761a624a9db9f2e41753e8061381ff81 /testsuite/tests/roles/should_compile/Roles2.stderr
parentfa360eabe5a01815f27a09df4a245546ede9210a (diff)
downloadhaskell-a694cee77b64235b42029fea248453ddf6b17d17.tar.gz
TcTypeable: Try to reuse KindReps
Here we rework the TcTypeable implementation to reuse KindRep bindings when possible. This is an attempt at minimizing the impact of Typeable binding generation by reducing the number of bindings that we produce. It turns out that this produces some pretty reasonable compiler allocations improvements. It seems to erase most of the increases initially introduced by TTypeable in the testsuite. Moreover, nofib shows, ``` -1 s.d. ----- -3.555% +1 s.d. ----- +1.937% Average ----- -0.847% ``` Here are a few of the high-scorers (ignore last column, which is for D3219), ``` veritas Types 88800920 -18.945% -21.480% veritas Tactics 540766744 -27.256% -27.338% sched Main 567013384 -4.947% -5.358% listcompr Main 532300000 -4.273% -4.572% listcopy Main 537785392 -4.382% -4.635% anna BaseDefs 1984225032 -10.639% -10.832% ``` as expected, these tend to be modules with either very many or very large types. Test Plan: Validate Reviewers: austin, dfeuer Subscribers: simonmar, dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D3166
Diffstat (limited to 'testsuite/tests/roles/should_compile/Roles2.stderr')
-rw-r--r--testsuite/tests/roles/should_compile/Roles2.stderr31
1 files changed, 12 insertions, 19 deletions
diff --git a/testsuite/tests/roles/should_compile/Roles2.stderr b/testsuite/tests/roles/should_compile/Roles2.stderr
index 39ca1ea0a8..b96d17330a 100644
--- a/testsuite/tests/roles/should_compile/Roles2.stderr
+++ b/testsuite/tests/roles/should_compile/Roles2.stderr
@@ -19,10 +19,6 @@ Roles2.$tcT2
(GHC.Types.TrNameS "T2"#)
0
$krep
-$krep [InlPrag=[~]]
- = GHC.Types.KindRepFun
- (GHC.Types.KindRepTYPE GHC.Types.LiftedRep)
- (GHC.Types.KindRepTYPE GHC.Types.LiftedRep)
Roles2.$tc'K2
= GHC.Types.TyCon
17395957229042313563##
@@ -31,12 +27,6 @@ Roles2.$tc'K2
(GHC.Types.TrNameS "'K2"#)
1
$krep
-$krep [InlPrag=[~]]
- = GHC.Types.KindRepFun
- (GHC.Types.KindRepTyConApp
- GHC.Ptr.$tcFunPtr ((:) (GHC.Types.KindRepVar 0) []))
- (GHC.Types.KindRepTyConApp
- Roles2.$tcT2 ((:) (GHC.Types.KindRepVar 0) []))
Roles2.$tcT1
= GHC.Types.TyCon
10310640733256438505##
@@ -45,10 +35,6 @@ Roles2.$tcT1
(GHC.Types.TrNameS "T1"#)
0
$krep
-$krep [InlPrag=[~]]
- = GHC.Types.KindRepFun
- (GHC.Types.KindRepTYPE GHC.Types.LiftedRep)
- (GHC.Types.KindRepTYPE GHC.Types.LiftedRep)
Roles2.$tc'K1
= GHC.Types.TyCon
16530009231990968394##
@@ -57,12 +43,19 @@ Roles2.$tc'K1
(GHC.Types.TrNameS "'K1"#)
1
$krep
+$krep [InlPrag=[~]] = GHC.Types.KindRepVar 0
+$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep
+$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep
+$krep [InlPrag=[~]] = GHC.Types.KindRepFun $krep $krep
+$krep [InlPrag=[~]] = GHC.Types.KindRepTYPE GHC.Types.LiftedRep
+$krep [InlPrag=[~]]
+ = GHC.Types.KindRepTyConApp GHC.Ptr.$tcFunPtr ((:) $krep [])
+$krep [InlPrag=[~]]
+ = GHC.Types.KindRepTyConApp Roles2.$tcT2 ((:) $krep [])
+$krep [InlPrag=[~]]
+ = GHC.Types.KindRepTyConApp GHC.Types.$tcIO ((:) $krep [])
$krep [InlPrag=[~]]
- = GHC.Types.KindRepFun
- (GHC.Types.KindRepTyConApp
- GHC.Types.$tcIO ((:) (GHC.Types.KindRepVar 0) []))
- (GHC.Types.KindRepTyConApp
- Roles2.$tcT1 ((:) (GHC.Types.KindRepVar 0) []))
+ = GHC.Types.KindRepTyConApp Roles2.$tcT1 ((:) $krep [])
Roles2.$trModule
= GHC.Types.Module
(GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "Roles2"#)