From 2204f68543ab807d91070f7af4a88f0c80be353b Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 9 Sep 1997 17:56:30 +0000 Subject: [PATCH] [project @ 1997-09-09 17:56:30 by sof] --- ghc/compiler/simplCore/SimplVar.lhs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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] -- 1.7.10.4