X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fcmm%2FOptimizationFuel.hs;h=a5d8fa3c0944271bb25ab65e856e4a5448b34044;hp=d9e83650176b749945480c4e4d15ae744d966f5c;hb=6bc92166180824bf046d31e378359e3c386150f9;hpb=176fa33f17dd78355cc572e006d2ab26898e2c69 diff --git a/compiler/cmm/OptimizationFuel.hs b/compiler/cmm/OptimizationFuel.hs index d9e8365..a5d8fa3 100644 --- a/compiler/cmm/OptimizationFuel.hs +++ b/compiler/cmm/OptimizationFuel.hs @@ -1,5 +1,5 @@ module OptimizationFuel - ( OptimizationFuel , canRewriteWithFuel, maybeRewriteWithFuel, oneLessFuel + ( OptimizationFuel, canRewriteWithFuel, maybeRewriteWithFuel, oneLessFuel , OptFuelState, initOptFuelState --, setTotalFuel , tankFilledTo, diffFuel , FuelConsumer @@ -59,7 +59,7 @@ diffFuel (OptimizationFuel f) (OptimizationFuel f') = f - f' -- type OptimizationFuel = State# () -- would like this, but it won't work data OptimizationFuel = OptimizationFuel deriving Show -tankFilledTo _ = undefined -- should be impossible to evaluate +tankFilledTo _ = panic "tankFilledTo" -- should be impossible to evaluate -- realWorld# might come in handy, too... canRewriteWithFuel OptimizationFuel = True maybeRewriteWithFuel _ ma = ma @@ -131,4 +131,5 @@ fuelDecrementState new_optimizer old new s = lGraphOfGraph :: Graph m l -> Int -> FuelMonad (LGraph m l) lGraphOfGraph (Graph tail blocks) args = do entry <- liftM BlockId $ getUniqueM - return $ LGraph entry args (insertBlock (Block entry Nothing tail) blocks) + return $ LGraph entry args + (insertBlock (Block entry emptyStackInfo tail) blocks)