Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
03ec7927
Commit
03ec7927
authored
Apr 26, 2017
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments only
parent
4d5ab1f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
compiler/coreSyn/CoreOpt.hs
compiler/coreSyn/CoreOpt.hs
+1
-1
compiler/coreSyn/CoreUnfold.hs
compiler/coreSyn/CoreUnfold.hs
+6
-6
testsuite/tests/perf/should_run/T7257.hs
testsuite/tests/perf/should_run/T7257.hs
+1
-1
No files found.
compiler/coreSyn/CoreOpt.hs
View file @
03ec7927
...
...
@@ -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
...
...
compiler/coreSyn/CoreUnfold.hs
View file @
03ec7927
...
...
@@ -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
--
...
...
testsuite/tests/perf/should_run/T7257.hs
View file @
03ec7927
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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