summaryrefslogtreecommitdiff
path: root/compiler/simplCore
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2017-01-15 17:33:30 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2017-01-15 17:33:30 +0000
commit1f48fbc9cda8c61ff0c032b683377dc23697079d (patch)
tree0bbd2b4a6342e09e26fe743e8c3553def0f36abc /compiler/simplCore
parentc13151e5ac774d38d7c5a807692851022c18fe6b (diff)
downloadhaskell-1f48fbc9cda8c61ff0c032b683377dc23697079d.tar.gz
Revert "Record evaluated-ness on workers and wrappers"
This reverts commit 6b976eb89fe72827f226506d16d3721ba4e28bab. Ben, Ryan and I decided to revert this for now due to T12234 failing and causing all harbormaster builds to fail.
Diffstat (limited to 'compiler/simplCore')
-rw-r--r--compiler/simplCore/Simplify.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index 72593e9ead..aaeb997b54 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -25,7 +25,8 @@ import Name ( Name, mkSystemVarName, isExternalName, getOccFS )
import Coercion hiding ( substCo, substCoVar )
import OptCoercion ( optCoercion )
import FamInstEnv ( topNormaliseType_maybe )
-import DataCon ( DataCon, dataConWorkId, dataConRepStrictness, dataConRepArgTys )
+import DataCon ( DataCon, dataConWorkId, dataConRepStrictness
+ , isMarkedStrict, dataConRepArgTys ) --, dataConTyCon, dataConTag, fIRST_TAG )
--import TyCon ( isEnumerationTyCon ) -- temporalily commented out. See #8326
import CoreMonad ( Tick(..), SimplifierMode(..) )
import CoreSyn
@@ -2127,7 +2128,9 @@ simplAlt env scrut' _ case_bndr' cont' (DataAlt con, vs, rhs)
where
go [] [] = []
go (v:vs') strs | isTyVar v = v : go vs' strs
- go (v:vs') (str:strs) = zap str v : go vs' strs
+ go (v:vs') (str:strs)
+ | isMarkedStrict str = eval v : go vs' strs
+ | otherwise = zap v : go vs' strs
go _ _ = pprPanic "cat_evals"
(ppr con $$
ppr vs $$
@@ -2140,9 +2143,8 @@ simplAlt env scrut' _ case_bndr' cont' (DataAlt con, vs, rhs)
-- NB: If this panic triggers, note that
-- NoStrictnessMark doesn't print!
- zap str v = setCaseBndrEvald str $ -- Add eval'dness info
- zapIdOccInfo v -- And kill occ info;
- -- see Note [Case alternative occ info]
+ zap v = zapIdOccInfo v -- See Note [Case alternative occ info]
+ eval v = zap v `setIdUnfolding` evaldUnfolding
addAltUnfoldings :: SimplEnv -> Maybe OutExpr -> OutId -> OutExpr -> SimplM SimplEnv
addAltUnfoldings env scrut case_bndr con_app