Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
f4fb94f3
Commit
f4fb94f3
authored
Jan 24, 2014
by
Joachim Breitner
Browse files
In CoreSubst, optimize Coercible values aggressively
just like boxed type equalities.
parent
b4715d67
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/coreSyn/CoreSubst.lhs
View file @
f4fb94f3
...
...
@@ -61,7 +61,7 @@ import Coercion hiding ( substTy, substCo, extendTvSubst, substTyVarBndr, substC
import TyCon ( tyConArity )
import DataCon
import PrelNames ( eqBoxDataConKey )
import PrelNames ( eqBoxDataConKey
, coercibleDataConKey
)
import OptCoercion ( optCoercion )
import PprCore ( pprCoreBindings, pprRules )
import Module ( Module )
...
...
@@ -1039,7 +1039,7 @@ maybe_substitute subst b r
trivial | exprIsTrivial r = True
| (Var fun, args) <- collectArgs r
, Just dc <- isDataConWorkId_maybe fun
, dc `hasKey` eqBoxDataConKey
, dc `hasKey` eqBoxDataConKey
|| dc `hasKey` coercibleDataConKey
, all exprIsTrivial args = True -- See Note [Optimise coercion boxes agressively]
| otherwise = False
...
...
testsuite/tests/ghci.debugger/scripts/print018.stdout
View file @
f4fb94f3
...
...
@@ -3,9 +3,9 @@ Stopped at ../Test.hs:40:1-17
_result :: () = _
Stopped at ../Test.hs:40:10-17
_result :: () = _
x :: a = _
x = (_t1::a)
x :: a
x :: a
17
= _
x = (_t1::a
17
)
x :: a
17
()
x = Unary
x :: Unary
...
...
testsuite/tests/perf/compiler/all.T
View file @
f4fb94f3
...
...
@@ -222,13 +222,14 @@ test('T3064',
# 2012-10-30: 111189536 (x86/Windows)
# 2013-11-13: 146626504 (x86/Windows, 64bit machine)
# 2014-01-22: 162457940 (x86/Linux)
(
wordsize
(
64
),
3
29795912
,
5
)]),
(
wordsize
(
64
),
3
08422280
,
5
)]),
# (amd64/Linux) (28/06/2011): 73259544
# (amd64/Linux) (07/02/2013): 224798696
# (amd64/Linux) (02/08/2013): 236404384, increase from roles
# (amd64/Linux) (11/09/2013): 290165632, increase from AMP warnings
# (amd64/Linux) (22/11/2013): 308300448, GND via Coercible and counters for constraints solving
# (amd64/Linux) (02/12/2013): 329795912, Coercible refactor
# (amd64/Linux) (02/12/2013): 329795912, Coercible refactor
# (amd64/Linux) (11/02/2014): 308422280, optimize Coercions in simpleOptExpr
compiler_stats_num_field
('
max_bytes_used
',
[(
wordsize
(
32
),
7218200
,
20
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment