diff options
| author | simonpj@microsoft.com <unknown> | 2009-04-24 07:47:33 +0000 |
|---|---|---|
| committer | simonpj@microsoft.com <unknown> | 2009-04-24 07:47:33 +0000 |
| commit | 980a3e89be93e2d40cc26ca626c8cbf293abb78c (patch) | |
| tree | 4d4a37c5aa8fc3759812437a9b6305010afd687d | |
| parent | b5a73581d0c03b9d44a77706b5973d74074aa6c1 (diff) | |
| download | haskell-980a3e89be93e2d40cc26ca626c8cbf293abb78c.tar.gz | |
Tiny optimisation to mkInlineMe
| -rw-r--r-- | compiler/coreSyn/CoreUtils.lhs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/coreSyn/CoreUtils.lhs b/compiler/coreSyn/CoreUtils.lhs index 0708d7aa75..d92b6d1fec 100644 --- a/compiler/coreSyn/CoreUtils.lhs +++ b/compiler/coreSyn/CoreUtils.lhs @@ -200,8 +200,9 @@ But it hardly seems worth it, so I don't bother. -- | Wraps the given expression in an inlining hint unless the expression -- is trivial in some sense, so that doing so would usually hurt us mkInlineMe :: CoreExpr -> CoreExpr -mkInlineMe (Var v) = Var v -mkInlineMe e = Note InlineMe e +mkInlineMe e@(Var _) = e +mkInlineMe e@(Note InlineMe _) = e +mkInlineMe e = Note InlineMe e \end{code} \begin{code} |
