Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : newcg
http://hackage.haskell.org/trac/ghc/changeset/4d3d5a521ffc7a658a4444e5c358b3e833f18a99 >--------------------------------------------------------------- commit 4d3d5a521ffc7a658a4444e5c358b3e833f18a99 Author: Simon Marlow <marlo...@gmail.com> Date: Fri Mar 9 10:59:08 2012 +0000 fix another bug in CmmOpt >--------------------------------------------------------------- compiler/cmm/CmmOpt.hs | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/compiler/cmm/CmmOpt.hs b/compiler/cmm/CmmOpt.hs index 8abf54e..c16a295 100644 --- a/compiler/cmm/CmmOpt.hs +++ b/compiler/cmm/CmmOpt.hs @@ -202,9 +202,13 @@ lookForInlineMany' :: Unique -> CmmExpr -> RegSet -> [CmmStmt] -> (Int, [CmmStmt lookForInlineMany' _ _ _ [] = (0, []) lookForInlineMany' u expr regset stmts@(stmt : rest) | Just n <- lookupUFM (countUses stmt) u, okToInline expr stmt - = case lookForInlineMany' u expr regset rest of - (m, stmts) -> let z = n + m - in z `seq` (z, inlineStmt u expr stmt : stmts) + = let stmt' = inlineStmt u expr stmt in + if okToSkip stmt' u expr regset + then case lookForInlineMany' u expr regset rest of + (m, stmts) -> let z = n + m + in z `seq` (z, stmt' : stmts) + else (n, stmt' : rest) + | okToSkip stmt u expr regset = case lookForInlineMany' u expr regset rest of _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc