X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FAsmCodeGen.lhs;h=a99d60ac9db036030353f0693e8a589faad5e466;hb=388e3356f71daffa62f1d4157e1e07e4c68f218a;hp=b7e4797720cb4ed2ae4c1972a0dd37fbdde06f49;hpb=1e50fd4185479a62e02d987bdfcb1c62712859ca;p=ghc-hetmet.git diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index b7e4797..a99d60a 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -236,19 +236,19 @@ cmmNativeGens dflags h us (cmm : cmms) impAcc profAcc count Pretty.bufLeftRender h $ {-# SCC "pprNativeCode" #-} Pretty.vcat $ map pprNatCmmTop native - let lsPprNative = + -- carefully evaluate this strictly. Binding it with 'let' + -- and then using 'seq' doesn't work, because the let + -- apparently gets inlined first. + lsPprNative <- return $! if dopt Opt_D_dump_asm dflags || dopt Opt_D_dump_asm_stats dflags then native else [] - let count' = count + 1; - + count' <- return $! count + 1; -- force evaulation all this stuff to avoid space leaks seqString (showSDoc $ vcat $ map ppr imports) `seq` return () - lsPprNative `seq` return () - count' `seq` return () cmmNativeGens dflags h us' cmms (imports : impAcc)