summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2022-04-20 11:50:48 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2022-05-23 17:09:34 +0100
commitbc723ac2cf2cfc329de4b8523bf891965075879b (patch)
tree30b6402a103a7d794a4eb0613e7714dfa0154311 /testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr
parentffbe28e56aa382164525300fbc32d78eefd95e7d (diff)
downloadhaskell-bc723ac2cf2cfc329de4b8523bf891965075879b.tar.gz
Improve FloatOut and SpecConstrwip/T21386
This patch addresses a relatively obscure situation that arose when chasing perf regressions in !7847, which itself is fixing It does two things: * SpecConstr can specialise on ($df d1 d2) dictionary arguments * FloatOut no longer checks argument strictness See Note [Specialising on dictionaries] in GHC.Core.Opt.SpecConstr. A test case is difficult to construct, but it makes a big difference in nofib/real/eff/VSM, at least when we have the patch for #21286 installed. (The latter stops worker/wrapper for dictionary arguments). There is a spectacular, but slightly illusory, improvement in runtime perf on T15426. I have documented the specifics in T15426 itself. Metric Decrease: T15426
Diffstat (limited to 'testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr')
-rw-r--r--testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr26
1 files changed, 17 insertions, 9 deletions
diff --git a/testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr b/testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr
index a74980ed99..3f01f42d2d 100644
--- a/testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr
+++ b/testsuite/tests/simplCore/should_compile/OpaqueNoRebox3.stderr
@@ -1,7 +1,7 @@
==================== Tidy Core ====================
Result size of Tidy Core
- = {terms: 120, types: 47, coercions: 4, joins: 1/1}
+ = {terms: 122, types: 49, coercions: 4, joins: 1/1}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
OpaqueNoRebox3.$trModule4 :: GHC.Prim.Addr#
@@ -45,7 +45,7 @@ OpaqueNoRebox3.$trModule
-- RHS size: {terms: 8, types: 3, coercions: 0, joins: 0/0}
f [InlPrag=OPAQUE] :: Int -> Int
[GblId, Arity=1, Str=<1L>, Unf=OtherCon []]
-f = / (x :: Int) ->
+f = \ (x :: Int) ->
case x of { GHC.Types.I# ipv -> GHC.Types.I# (GHC.Prim.+# ipv 1#) }
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
@@ -110,10 +110,15 @@ lvl11 :: GHC.Prim.Addr#
[GblId, Unf=OtherCon []]
lvl11 = "patError"#
--- RHS size: {terms: 4, types: 2, coercions: 4, joins: 0/0}
-lvl12 :: Int
+-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
+lvl12 :: [Char]
+[GblId]
+lvl12 = GHC.CString.unpackCString# lvl11
+
+-- RHS size: {terms: 3, types: 2, coercions: 4, joins: 0/0}
+lvl13 :: Int
[GblId, Str=b, Cpr=b]
-lvl12
+lvl13
= error
@GHC.Types.LiftedRep
@Int
@@ -122,13 +127,13 @@ lvl12
<"callStack">_N <GHC.Stack.Types.CallStack>_N)
:: GHC.Stack.Types.CallStack
~R# (?callStack::GHC.Stack.Types.CallStack)))
- (GHC.CString.unpackCString# lvl11)
+ lvl12
Rec {
-- RHS size: {terms: 50, types: 13, coercions: 0, joins: 1/1}
g [Occ=LoopBreaker] :: Bool -> Bool -> Bool -> Int -> Int
[GblId, Arity=4, Str=<SL><SL><L><1L>, Unf=OtherCon []]
-g = / (w :: Bool) (w1 :: Bool) (w2 :: Bool) (p :: Int) ->
+g = \ (w :: Bool) (w1 :: Bool) (w2 :: Bool) (p :: Int) ->
join {
fail_ [Dmd=M!P(L)] :: Int
[LclId[JoinId(0)(Nothing)]]
@@ -139,7 +144,7 @@ g = / (w :: Bool) (w1 :: Bool) (w2 :: Bool) (p :: Int) ->
False -> g w GHC.Types.True GHC.Types.False p;
True -> f (f p)
};
- True -> lvl12
+ True -> lvl13
} } in
case w of {
False ->
@@ -158,4 +163,7 @@ g = / (w :: Bool) (w1 :: Bool) (w2 :: Bool) (p :: Int) ->
True -> f p
}
}
-end Rec } \ No newline at end of file
+end Rec }
+
+
+