[project @ 2005-01-13 16:32:34 by simonmar]
authorsimonmar <unknown>
Thu, 13 Jan 2005 16:32:34 +0000 (16:32 +0000)
committersimonmar <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

index 7f0bd45..95a5b6c 100644 (file)
@@ -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)