From 64a906607f61efc8e31175bbafde463787eec402 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 25 Aug 1998 11:56:10 +0000 Subject: [PATCH] [project @ 1998-08-25 11:56:10 by sof] dumpRealC: Don't drag around cost argument if we're not GranSim'ing (cf. new-rts fix) --- ghc/compiler/absCSyn/PprAbsC.lhs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/absCSyn/PprAbsC.lhs b/ghc/compiler/absCSyn/PprAbsC.lhs index e835dca..fe78a3d 100644 --- a/ghc/compiler/absCSyn/PprAbsC.lhs +++ b/ghc/compiler/absCSyn/PprAbsC.lhs @@ -31,7 +31,7 @@ import CLabel ( externallyVisibleCLabel, mkErrorStdEntryLabel, isReadOnly, needsCDecl, pprCLabel, CLabel{-instance Ord-} ) -import CmdLineOpts ( opt_SccProfilingOn, opt_EmitCExternDecls ) +import CmdLineOpts ( opt_SccProfilingOn, opt_EmitCExternDecls, opt_GranMacros ) import CostCentre ( uppCostCentre, uppCostCentreDecl ) import Costs ( costs, addrModeCosts, CostRes(..), Side(..) ) import CStrings ( stringToC ) @@ -69,7 +69,9 @@ writeRealC handle absC postlude = printForC handle (pprAbsC absC (costs absC) $$ postlude) dumpRealC :: AbstractC -> SDoc -> SDoc -dumpRealC absC postlude = pprCode CStyle (pprAbsC absC (costs absC) $$ postlude) +dumpRealC absC postlude + | opt_GranMacros = pprCode CStyle (pprAbsC absC (costs absC) $$ postlude) + | otherwise = pprCode CStyle (pprAbsC absC (panic "costs") $$ postlude) \end{code} This emits the macro, which is used in GrAnSim to compute the total costs -- 1.7.10.4