From: simonmar Date: Tue, 1 May 2001 09:06:59 +0000 (+0000) Subject: [project @ 2001-05-01 09:06:59 by simonmar] X-Git-Tag: Approximately_9120_patches~2048 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7ff3643c9a0ed7e1662ebfec10e56a0bbfb8ab81;p=ghc-hetmet.git [project @ 2001-05-01 09:06:59 by simonmar] SCC notes move inside other notes. --- diff --git a/ghc/compiler/coreSyn/CoreUtils.lhs b/ghc/compiler/coreSyn/CoreUtils.lhs index 696793e..4b172e3 100644 --- a/ghc/compiler/coreSyn/CoreUtils.lhs +++ b/ghc/compiler/coreSyn/CoreUtils.lhs @@ -199,11 +199,12 @@ mkCoerce to_ty from_ty expr \begin{code} mkSCC :: CostCentre -> Expr b -> Expr b -- Note: Nested SCC's *are* preserved for the benefit of - -- cost centre stack profiling (Durham) - -mkSCC cc (Lit lit) = Lit lit -mkSCC cc (Lam x e) = Lam x (mkSCC cc e) -- Move _scc_ inside lambda -mkSCC cc expr = Note (SCC cc) expr + -- cost centre stack profiling +mkSCC cc (Lit lit) = Lit lit +mkSCC cc (Lam x e) = Lam x (mkSCC cc e) -- Move _scc_ inside lambda +mkSCC cc (Note (SCC cc') e) = Note (SCC cc) (Note (SCC cc') e) +mkSCC cc (Note n e) = Note n (mkSCC cc e) -- Move _scc_ inside notes +mkSCC cc expr = Note (SCC cc) expr \end{code}