From 6b46a9846976ac8a4259dff36c043372decf8730 Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 13 Jan 2005 16:32:34 +0000 Subject: [PATCH] [project @ 2005-01-13 16:32:34 by simonmar] Small optimisation: allow lookForInline to skip over CmmNop too --- ghc/compiler/nativeGen/AsmCodeGen.lhs | 3 +++ 1 file changed, 3 insertions(+) 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) -- 1.7.10.4