projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add ASSERTs to all calls of nameModule
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
CoreUnfold.lhs
diff --git
a/compiler/coreSyn/CoreUnfold.lhs
b/compiler/coreSyn/CoreUnfold.lhs
index
4e8e5ef
..
b6706c1
100644
(file)
--- a/
compiler/coreSyn/CoreUnfold.lhs
+++ b/
compiler/coreSyn/CoreUnfold.lhs
@@
-586,10
+586,13
@@
callSiteInline dflags active_inline id lone_variable arg_infos cont_info
-> True
| otherwise
-> True
| otherwise
- -> some_benefit && small_enough
+ -> some_benefit && small_enough && inline_enough_args
where
enough_args = n_val_args >= n_vals_wanted
where
enough_args = n_val_args >= n_vals_wanted
+ inline_enough_args =
+ not (dopt Opt_InlineIfEnoughArgs dflags) || enough_args
+
some_benefit = or arg_infos || really_interesting_cont
-- There must be something interesting
some_benefit = or arg_infos || really_interesting_cont
-- There must be something interesting
@@
-799,8
+802,9
@@
simpleOptExpr subst expr
----------------------
go_nonrec subst b (Type ty') body
| isTyVar b = go (extendTvSubst subst b ty') body
----------------------
go_nonrec subst b (Type ty') body
| isTyVar b = go (extendTvSubst subst b ty') body
+ -- let a::* = TYPE ty in <body>
go_nonrec subst b r' body
go_nonrec subst b r' body
- | isId b
+ | isId b -- let x = e in <body>
, exprIsTrivial r' || safe_to_inline (idOccInfo b)
= go (extendIdSubst subst b r') body
go_nonrec subst b r' body
, exprIsTrivial r' || safe_to_inline (idOccInfo b)
= go (extendIdSubst subst b r') body
go_nonrec subst b r' body