Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/133552cc71165c595cbb8812bde573b555571c24 >--------------------------------------------------------------- commit 133552cc71165c595cbb8812bde573b555571c24 Author: Simon Marlow <[email protected]> Date: Mon Jul 9 16:23:21 2012 +0100 Don't duplicate arbitrary CmmCalls >--------------------------------------------------------------- compiler/cmm/CmmContFlowOpt.hs | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/compiler/cmm/CmmContFlowOpt.hs b/compiler/cmm/CmmContFlowOpt.hs index 6b6ecc8..f9fa680 100644 --- a/compiler/cmm/CmmContFlowOpt.hs +++ b/compiler/cmm/CmmContFlowOpt.hs @@ -157,9 +157,13 @@ callContinuation_maybe _ = Nothing okToDuplicate :: CmmBlock -> Bool okToDuplicate block - = case blockSplit block of (_, m, _) -> isEmptyBlock m - -- cheap and cheerful; we might expand this in the future to - -- e.g. spot blocks that represent a single instruction or two + = case blockSplit block of + (_, m, CmmBranch _) -> isEmptyBlock m + -- cheap and cheerful; we might expand this in the future to + -- e.g. spot blocks that represent a single instruction or two. + -- Be careful: a CmmCall can be more than one instruction, it + -- has a CmmExpr inside it. + _otherwise -> False ------------------------------------------------------------------------ -- Map over the CmmGraph, replacing each label with its mapping in the _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
