From: sof Date: Tue, 9 Sep 1997 17:56:30 +0000 (+0000) Subject: [project @ 1997-09-09 17:56:30 by sof] X-Git-Tag: Approx_2487_patches~1507 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2204f68543ab807d91070f7af4a88f0c80be353b;p=ghc-hetmet.git [project @ 1997-09-09 17:56:30 by sof] --- diff --git a/ghc/compiler/simplCore/SimplVar.lhs b/ghc/compiler/simplCore/SimplVar.lhs index b0fa23c..2a2f4ab 100644 --- a/ghc/compiler/simplCore/SimplVar.lhs +++ b/ghc/compiler/simplCore/SimplVar.lhs @@ -22,10 +22,11 @@ import Constants ( uNFOLDING_USE_THRESHOLD, ) import CmdLineOpts ( switchIsOn, SimplifierSwitch(..) ) import CoreSyn -import CoreUnfold ( Unfolding(..), UfExpr, RdrName, UnfoldingGuidance(..), SimpleUnfolding(..), - FormSummary, - okToInline, smallEnoughToInline ) -import BinderInfo ( BinderInfo, noBinderInfo ) +import CoreUnfold ( Unfolding(..), UfExpr, RdrName, UnfoldingGuidance(..), + SimpleUnfolding(..), + FormSummary, whnfOrBottom, + smallEnoughToInline ) +import BinderInfo ( BinderInfo, noBinderInfo, okToInline ) import CostCentre ( CostCentre, isCurrentCostCentre ) import Id ( idType, getIdInfo, getIdUnfolding, getIdSpecialisation, @@ -132,7 +133,7 @@ completeVar env var args result_ty sw_chkr = getSwitchChecker env essential_unfoldings_only = switchIsOn sw_chkr EssentialUnfoldingsOnly is_case_scrutinee = switchIsOn sw_chkr SimplCaseScrutinee - ok_to_inline = okToInline form occ_info small_enough + ok_to_inline = okToInline (whnfOrBottom form) small_enough occ_info small_enough = smallEnoughToInline arg_evals is_case_scrutinee guidance arg_evals = [is_evald arg | arg <- args, isValArg arg]