projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b5a7358
)
Tiny optimisation to mkInlineMe
author
simonpj@microsoft.com
<unknown>
Fri, 24 Apr 2009 07:47:33 +0000
(07:47 +0000)
committer
simonpj@microsoft.com
<unknown>
Fri, 24 Apr 2009 07:47:33 +0000
(07:47 +0000)
compiler/coreSyn/CoreUtils.lhs
patch
|
blob
|
history
diff --git
a/compiler/coreSyn/CoreUtils.lhs
b/compiler/coreSyn/CoreUtils.lhs
index
0708d7a
..
d92b6d1
100644
(file)
--- 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
-- | 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}
\end{code}
\begin{code}