summaryrefslogtreecommitdiff
path: root/compiler/prelude
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2019-01-28 16:49:04 +0100
committerSebastian Graf <sebastian.graf@kit.edu>2020-02-12 11:00:58 +0100
commit059c3c9d7c84fc37c69e9f414ff736d47081e72c (patch)
treeda3c17ac002b9c6d31542af78553769fd40d5d65 /compiler/prelude
parentf0c0ee7d9a942a19361e72553cd08f42cc12b04a (diff)
downloadhaskell-059c3c9d7c84fc37c69e9f414ff736d47081e72c.tar.gz
Separate CPR analysis from the Demand analyserwip/sep-cpr
The reasons for that can be found in the wiki: https://gitlab.haskell.org/ghc/ghc/wikis/nested-cpr/split-off-cpr We now run CPR after demand analysis (except for after the final demand analysis run just before code gen). CPR got its own dump flags (`-ddump-cpr-anal`, `-ddump-cpr-signatures`), but not its own flag to activate/deactivate. It will run with `-fstrictness`/`-fworker-wrapper`. As explained on the wiki page, this step is necessary for a sane Nested CPR analysis. And it has quite positive impact on compiler performance: Metric Decrease: T9233 T9675 T9961 T15263
Diffstat (limited to 'compiler/prelude')
-rw-r--r--compiler/prelude/primops.txt.pp38
1 files changed, 19 insertions, 19 deletions
diff --git a/compiler/prelude/primops.txt.pp b/compiler/prelude/primops.txt.pp
index f86a222daa..7361c4bea8 100644
--- a/compiler/prelude/primops.txt.pp
+++ b/compiler/prelude/primops.txt.pp
@@ -72,7 +72,7 @@ defaults
can_fail = False -- See Note [PrimOp can_fail and has_side_effects] in PrimOp
commutable = False
code_size = { primOpCodeSizeDefault }
- strictness = { \ arity -> mkClosedStrictSig (replicate arity topDmd) topRes }
+ strictness = { \ arity -> mkClosedStrictSig (replicate arity topDmd) topDiv }
fixity = Nothing
llvm_only = False
vector = []
@@ -2584,7 +2584,7 @@ primop CatchOp "catch#" GenPrimOp
with
strictness = { \ _arity -> mkClosedStrictSig [ lazyApply1Dmd
, lazyApply2Dmd
- , topDmd] topRes }
+ , topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
out_of_line = True
has_side_effects = True
@@ -2593,7 +2593,7 @@ primop RaiseOp "raise#" GenPrimOp
b -> o
-- NB: the type variable "o" is "a", but with OpenKind
with
- strictness = { \ _arity -> mkClosedStrictSig [topDmd] botRes }
+ strictness = { \ _arity -> mkClosedStrictSig [topDmd] botDiv }
out_of_line = True
has_side_effects = True
-- raise# certainly throws a Haskell exception and hence has_side_effects
@@ -2620,7 +2620,7 @@ primop RaiseDivZeroOp "raiseDivZero#" GenPrimOp
-- NB: the type variable "o" is "a", but with OpenKind
-- See Note [Arithmetic exception primops]
with
- strictness = { \ _arity -> mkClosedStrictSig [topDmd] botRes }
+ strictness = { \ _arity -> mkClosedStrictSig [topDmd] botDiv }
out_of_line = True
has_side_effects = True
@@ -2630,7 +2630,7 @@ primop RaiseUnderflowOp "raiseUnderflow#" GenPrimOp
-- NB: the type variable "o" is "a", but with OpenKind
-- See Note [Arithmetic exception primops]
with
- strictness = { \ _arity -> mkClosedStrictSig [topDmd] botRes }
+ strictness = { \ _arity -> mkClosedStrictSig [topDmd] botDiv }
out_of_line = True
has_side_effects = True
@@ -2640,7 +2640,7 @@ primop RaiseOverflowOp "raiseOverflow#" GenPrimOp
-- NB: the type variable "o" is "a", but with OpenKind
-- See Note [Arithmetic exception primops]
with
- strictness = { \ _arity -> mkClosedStrictSig [topDmd] botRes }
+ strictness = { \ _arity -> mkClosedStrictSig [topDmd] botDiv }
out_of_line = True
has_side_effects = True
@@ -2664,7 +2664,7 @@ primop RaiseOverflowOp "raiseOverflow#" GenPrimOp
primop RaiseIOOp "raiseIO#" GenPrimOp
a -> State# RealWorld -> (# State# RealWorld, b #)
with
- strictness = { \ _arity -> mkClosedStrictSig [topDmd, topDmd] botRes }
+ strictness = { \ _arity -> mkClosedStrictSig [topDmd, topDmd] botDiv }
out_of_line = True
has_side_effects = True
@@ -2672,7 +2672,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp
(State# RealWorld -> (# State# RealWorld, a #))
-> (State# RealWorld -> (# State# RealWorld, a #))
with
- strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes }
+ strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
out_of_line = True
has_side_effects = True
@@ -2681,7 +2681,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp
(State# RealWorld -> (# State# RealWorld, a #))
-> (State# RealWorld -> (# State# RealWorld, a #))
with
- strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes }
+ strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topDiv }
out_of_line = True
has_side_effects = True
@@ -2689,7 +2689,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp
(State# RealWorld -> (# State# RealWorld, a #))
-> (State# RealWorld -> (# State# RealWorld, a #))
with
- strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes }
+ strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
out_of_line = True
has_side_effects = True
@@ -2710,7 +2710,7 @@ primop AtomicallyOp "atomically#" GenPrimOp
(State# RealWorld -> (# State# RealWorld, a #) )
-> State# RealWorld -> (# State# RealWorld, a #)
with
- strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes }
+ strictness = { \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
out_of_line = True
has_side_effects = True
@@ -2728,7 +2728,7 @@ primop AtomicallyOp "atomically#" GenPrimOp
primop RetryOp "retry#" GenPrimOp
State# RealWorld -> (# State# RealWorld, a #)
with
- strictness = { \ _arity -> mkClosedStrictSig [topDmd] botRes }
+ strictness = { \ _arity -> mkClosedStrictSig [topDmd] botDiv }
out_of_line = True
has_side_effects = True
@@ -2739,7 +2739,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp
with
strictness = { \ _arity -> mkClosedStrictSig [ lazyApply1Dmd
, lazyApply1Dmd
- , topDmd ] topRes }
+ , topDmd ] topDiv }
-- See Note [Strictness for mask/unmask/catch]
out_of_line = True
has_side_effects = True
@@ -2751,7 +2751,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp
with
strictness = { \ _arity -> mkClosedStrictSig [ lazyApply1Dmd
, lazyApply2Dmd
- , topDmd ] topRes }
+ , topDmd ] topDiv }
-- See Note [Strictness for mask/unmask/catch]
out_of_line = True
has_side_effects = True
@@ -3276,7 +3276,7 @@ section "Tag to enum stuff"
primop DataToTagOp "dataToTag#" GenPrimOp
a -> Int# -- Zero-indexed; the first constructor has tag zero
with
- strictness = { \ _arity -> mkClosedStrictSig [evalDmd] topRes }
+ strictness = { \ _arity -> mkClosedStrictSig [evalDmd] topDiv }
-- See Note [dataToTag# magic] in PrelRules
primop TagToEnumOp "tagToEnum#" GenPrimOp
@@ -3792,7 +3792,7 @@ primop PrefetchAddrOp3 "prefetchAddr3#" GenPrimOp
primop PrefetchValueOp3 "prefetchValue3#" GenPrimOp
a -> State# s -> State# s
- with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topRes }
+ with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
has_side_effects = True
----
@@ -3810,7 +3810,7 @@ primop PrefetchAddrOp2 "prefetchAddr2#" GenPrimOp
primop PrefetchValueOp2 "prefetchValue2#" GenPrimOp
a -> State# s -> State# s
- with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topRes }
+ with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
has_side_effects = True
----
@@ -3828,7 +3828,7 @@ primop PrefetchAddrOp1 "prefetchAddr1#" GenPrimOp
primop PrefetchValueOp1 "prefetchValue1#" GenPrimOp
a -> State# s -> State# s
- with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topRes }
+ with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
has_side_effects = True
----
@@ -3846,7 +3846,7 @@ primop PrefetchAddrOp0 "prefetchAddr0#" GenPrimOp
primop PrefetchValueOp0 "prefetchValue0#" GenPrimOp
a -> State# s -> State# s
- with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topRes }
+ with strictness = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
has_side_effects = True
------------------------------------------------------------------------