From: simonmar Date: Thu, 13 Jan 2005 16:32:34 +0000 (+0000) Subject: [project @ 2005-01-13 16:32:34 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1240 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6b46a9846976ac8a4259dff36c043372decf8730;p=ghc-hetmet.git [project @ 2005-01-13 16:32:34 by simonmar] Small optimisation: allow lookForInline to skip over CmmNop too --- diff --git a/ghc/compiler/nativeGen/AsmCodeGen.lhs b/ghc/compiler/nativeGen/AsmCodeGen.lhs index 7f0bd45..95a5b6c 100644 --- 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)