X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FCoreUnfold.lhs;h=b6706c14cd71318682b3e8dfaee2bdb0a3b300f4;hb=66579ff945831c5fc9a17c58c722ff01f2268d76;hp=4e8e5ef9825a1a953d576027a16e1515e1bce8f2;hpb=112ad1978f8c03d26a7df9ac892915dc93724b66;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreUnfold.lhs b/compiler/coreSyn/CoreUnfold.lhs index 4e8e5ef..b6706c1 100644 --- 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 - -> some_benefit && small_enough + -> some_benefit && small_enough && inline_enough_args 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 @@ -799,8 +802,9 @@ simpleOptExpr subst expr ---------------------- go_nonrec subst b (Type ty') body | isTyVar b = go (extendTvSubst subst b ty') body + -- let a::* = TYPE ty in go_nonrec subst b r' body - | isId b + | isId b -- let x = e in , exprIsTrivial r' || safe_to_inline (idOccInfo b) = go (extendIdSubst subst b r') body go_nonrec subst b r' body