summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-04-26 16:56:33 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2017-04-28 09:55:07 +0100
commit03ec7927f050c203a43843d95938ededf6d2c8f9 (patch)
treebf8cee2a7ced578b65a54e1b297526f2526a6fe7
parent4d5ab1f89ab4c082c10f67616ca4308d67923486 (diff)
downloadhaskell-03ec7927f050c203a43843d95938ededf6d2c8f9.tar.gz
Comments only
-rw-r--r--compiler/coreSyn/CoreOpt.hs2
-rw-r--r--compiler/coreSyn/CoreUnfold.hs12
-rw-r--r--testsuite/tests/perf/should_run/T7257.hs2
3 files changed, 8 insertions, 8 deletions
diff --git a/compiler/coreSyn/CoreOpt.hs b/compiler/coreSyn/CoreOpt.hs
index da58a4b500..4a196057b1 100644
--- a/compiler/coreSyn/CoreOpt.hs
+++ b/compiler/coreSyn/CoreOpt.hs
@@ -479,7 +479,7 @@ subst_opt_id_bndr (SOE { soe_subst = subst, soe_inl = inl }) old_id
id1 = uniqAway in_scope old_id
id2 = setIdType id1 (substTy subst (idType old_id))
new_id = zapFragileIdInfo id2
- -- Zaps rules, worker-info, unfolding, and fragile OccInfo
+ -- Zaps rules, unfolding, and fragile OccInfo
-- The unfolding and rules will get added back later, by add_info
new_in_scope = in_scope `extendInScopeSet` new_id
diff --git a/compiler/coreSyn/CoreUnfold.hs b/compiler/coreSyn/CoreUnfold.hs
index e629467d07..811ddad00e 100644
--- a/compiler/coreSyn/CoreUnfold.hs
+++ b/compiler/coreSyn/CoreUnfold.hs
@@ -1472,15 +1472,15 @@ computeDiscount dflags arg_discounts res_discount arg_infos cont_info
= res_discount -- Over-saturated
| otherwise
= case cont_info of
- BoringCtxt -> 0
- CaseCtxt -> res_discount -- Presumably a constructor
- ValAppCtxt -> res_discount -- Presumably a function
- _ -> 40 `min` res_discount
+ BoringCtxt -> 0
+ CaseCtxt -> res_discount -- Presumably a constructor
+ ValAppCtxt -> res_discount -- Presumably a function
+ _ -> 40 `min` res_discount
-- ToDo: this 40 `min` res_discount doesn't seem right
-- for DiscArgCtxt it shouldn't matter because the function will
- -- get the arg discount for any non-triv arg
+ -- get the arg discount for any non-triv arg
-- for RuleArgCtxt we do want to be keener to inline; but not only
- -- constructor results
+ -- constructor results
-- for RhsCtxt I suppose that exposing a data con is good in general
-- And 40 seems very arbitrary
--
diff --git a/testsuite/tests/perf/should_run/T7257.hs b/testsuite/tests/perf/should_run/T7257.hs
index ef65db3a56..8907c3c918 100644
--- a/testsuite/tests/perf/should_run/T7257.hs
+++ b/testsuite/tests/perf/should_run/T7257.hs
@@ -24,7 +24,7 @@ main = do
let fn n = do
doStuff ref n
when (rem 5 n /= 0 ) $ undo ref
-
+
mapM_ fn (take 5000000 $ cycle [1..100])
var <- readIORef ref
print $ length var