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:
b3f24cf
)
[project @ 2005-01-13 16:32:34 by simonmar]
author
simonmar
<unknown>
Thu, 13 Jan 2005 16:32:34 +0000
(16:32 +0000)
committer
simonmar
<unknown>
Thu, 13 Jan 2005 16:32:34 +0000
(16:32 +0000)
Small optimisation: allow lookForInline to skip over CmmNop too
ghc/compiler/nativeGen/AsmCodeGen.lhs
patch
|
blob
|
history
diff --git
a/ghc/compiler/nativeGen/AsmCodeGen.lhs
b/ghc/compiler/nativeGen/AsmCodeGen.lhs
index
7f0bd45
..
95a5b6c
100644
(file)
--- a/
ghc/compiler/nativeGen/AsmCodeGen.lhs
+++ b/
ghc/compiler/nativeGen/AsmCodeGen.lhs
@@
-803,6
+803,9
@@
lookForInline u expr (stmt@(CmmAssign (CmmLocal (LocalReg u' _)) rhs) : rest)
Nothing -> Nothing
Just stmts -> Just (stmt:stmts)
+lookForInline u expr (CmmNop : rest)
+ = lookForInline u expr rest
+
lookForInline u expr (stmt:stmts)
= case lookupUFM (getStmtUses stmt) u of
Just 1 -> Just (inlineStmt u expr stmt : stmts)