From: simonpj Date: Thu, 7 Dec 2000 10:36:03 +0000 (+0000) Subject: [project @ 2000-12-07 10:36:03 by simonpj] X-Git-Tag: Approximately_9120_patches~3175 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e97b2f8aa9efb3e6d4565a8864ee72c0fa34276c;p=ghc-hetmet.git [project @ 2000-12-07 10:36:03 by simonpj] Dont drop inline-mes quite so easily. This was leading to substWorker warnings. --- diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index 729b54f..0031c6d 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -156,9 +156,16 @@ Drop trivial InlineMe's. This is somewhat important, because if we have an unfo that looks like (Note InlineMe (Var v)), the InlineMe doesn't go away because it may not be *applied* to anything. +We don't use exprIsTrivial here, though, because we sometimes generate worker/wrapper +bindings like + fw = ... + f = inline_me (coerce t fw) +As usual, the inline_me prevents the worker from getting inlined back into the wrapper. +We want the split, so that the coerces can cancel at the call site. + \begin{code} -mkInlineMe e | exprIsTrivial e = e - | otherwise = Note InlineMe e +mkInlineMe (Var v) = Var v +mkInlineMe e = Note InlineMe e \end{code}