[commit: ghc] master: fix warnings (a211fcf)
Simon Marlow
marlowsd at gmail.com
Tue Jul 17 11:12:18 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/a211fcf6b55a3f6dbc0a58674aea581d9aa686e7
>---------------------------------------------------------------
commit a211fcf6b55a3f6dbc0a58674aea581d9aa686e7
Author: Simon Marlow <marlowsd at gmail.com>
Date: Tue Jul 17 09:43:06 2012 +0100
fix warnings
>---------------------------------------------------------------
compiler/cmm/CmmSink.hs | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/compiler/cmm/CmmSink.hs b/compiler/cmm/CmmSink.hs
index 3dd5bf7..fde34dc 100644
--- a/compiler/cmm/CmmSink.hs
+++ b/compiler/cmm/CmmSink.hs
@@ -121,6 +121,7 @@ walk (n:ns) block as
(dropped, as') = dropAssignments (`conflicts` n) as
block' = foldl blockSnoc block dropped `blockSnoc` n
+shouldSink :: CmmNode O O -> Maybe Assignment
shouldSink (CmmAssign (CmmLocal r) e) | no_local_regs = Just (r, e, exprAddr e)
where no_local_regs = foldRegsUsed (\_ _ -> False) True e
shouldSink _other = Nothing
@@ -239,7 +240,7 @@ cmmPeepholeInline graph = ofBlockList (g_entry graph) $ map do_block (toBlockLis
addUsage :: UniqFM Int -> LocalReg -> UniqFM Int
addUsage m r = addToUFM_C (+) m r 1
- tryInline stmt usages live stmts@(CmmAssign (CmmLocal l) rhs : rest)
+ tryInline stmt usages live (CmmAssign (CmmLocal l) rhs : rest)
| not (l `elemRegSet` live),
Just 1 <- lookupUFM usages l = tryInline stmt' usages' live' rest
where live' = foldRegsUsed extendRegSet live rhs
More information about the Cvs-ghc
mailing list