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
96cb07b5
Commit
96cb07b5
authored
Jan 31, 2007
by
simonpj@microsoft.com
Browse files
Use Id.isStrictId
parent
49d454d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
compiler/simplCore/LiberateCase.lhs
View file @
96cb07b5
...
...
@@ -90,7 +90,7 @@ Consider this:
f = \ t -> case (v `cast` co) of
V a b -> a : f t
Exactly the same optimis
t
aion (unrolling one call to f) will work here,
Exactly the same optimisa
t
ion (unrolling one call to f) will work here,
despite the cast. See mk_alt_env in the Case branch of libCase.
...
...
@@ -108,7 +108,6 @@ big.
Data types
~~~~~~~~~~
The ``level'' of a binder tells how many
recursive defns lexically enclose the binding
A recursive defn "encloses" its RHS, not its
...
...
compiler/simplCore/SimplEnv.lhs
View file @
96cb07b5
...
...
@@ -9,8 +9,6 @@ module SimplEnv (
OutId, OutTyVar, OutBind, OutExpr, OutAlt, OutArg, OutType, OutBndr,
InCoercion, OutCoercion,
isStrictBndr,
-- The simplifier mode
setMode, getMode,
...
...
@@ -92,13 +90,6 @@ type OutAlt = CoreAlt
type OutArg = CoreArg
\end{code}
\begin{code}
isStrictBndr :: Id -> Bool
isStrictBndr bndr
= ASSERT2( isId bndr, ppr bndr )
isStrictDmd (idNewDemandInfo bndr) || isStrictType (idType bndr)
\end{code}
%************************************************************************
%* *
\subsubsection{The @SimplEnv@ type}
...
...
@@ -364,7 +355,7 @@ andFF FltLifted flt = flt
classifyFF :: CoreBind -> FloatFlag
classifyFF (Rec _) = FltLifted
classifyFF (NonRec bndr rhs)
| not (isStrict
Bndr
bndr) = FltLifted
| not (isStrict
Id
bndr)
= FltLifted
| exprOkForSpeculation rhs = FltOkSpec
| otherwise = FltCareful
...
...
compiler/simplCore/SimplUtils.lhs
View file @
96cb07b5
...
...
@@ -19,7 +19,7 @@ module SimplUtils (
mkBoringStop, mkLazyArgStop, mkRhsStop, contIsRhsOrArg,
interestingCallContext, interestingArgContext,
interestingArg,
isStrictBndr,
mkArgInfo
interestingArg, mkArgInfo
) where
#include "HsVersions.h"
...
...
compiler/simplCore/Simplify.lhs
View file @
96cb07b5
...
...
@@ -359,7 +359,7 @@ simplNonRecX :: SimplEnv
simplNonRecX env bndr new_rhs
= do { (env, bndr') <- simplBinder env bndr
; completeNonRecX env NotTopLevel NonRecursive
(isStrict
Bndr
bndr) bndr bndr' new_rhs }
(isStrict
Id
bndr) bndr bndr' new_rhs }
completeNonRecX :: SimplEnv
-> TopLevelFlag -> RecFlag -> Bool
...
...
@@ -842,7 +842,7 @@ simplNonRecE env bndr (rhs, rhs_se) (bndrs, body) cont
= do { tick (PreInlineUnconditionally bndr)
; simplLam (extendIdSubst env bndr (mkContEx rhs_se rhs)) bndrs body cont }
| isStrict
Bndr
bndr
| isStrict
Id
bndr
= do { simplExprF (rhs_se `setFloats` env) rhs
(StrictBind bndr bndrs body env cont) }
...
...
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