From 4a6f2bc7c3da7e74192339502704877bfc12ccc1 Mon Sep 17 00:00:00 2001 From: Thomas Schilling Date: Sun, 20 Jul 2008 17:06:01 +0000 Subject: [PATCH] Fix Haddock errors. --- compiler/cmm/CmmZipUtil.hs | 2 +- compiler/cmm/MkZipCfgCmm.hs | 5 +++-- compiler/cmm/ZipCfg.hs | 4 +++- compiler/cmm/ZipDataflow.hs | 16 ++++++++-------- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/compiler/cmm/CmmZipUtil.hs b/compiler/cmm/CmmZipUtil.hs index aa547e9..c414d49 100644 --- a/compiler/cmm/CmmZipUtil.hs +++ b/compiler/cmm/CmmZipUtil.hs @@ -25,7 +25,7 @@ zipPreds g = foldl add emptyBlockEnv (postorder_dfs g) givesUniquePredecessorTo :: LastNode l => LGraph m l -> BlockId -> Bool givesUniquePredecessorTo g = \id -> elemBlockSet id singlePreds - -- | accumulates a pair of sets: the set of all blocks containing a single + -- accumulates a pair of sets: the set of all blocks containing a single -- predecessor, and the set of all blocks containing at least two predecessors where (singlePreds, _) = fold_blocks add (emptyBlockSet, emptyBlockSet) g add b (single, multi) = foldl add_pred (single, multi) (succs b) diff --git a/compiler/cmm/MkZipCfgCmm.hs b/compiler/cmm/MkZipCfgCmm.hs index e623c30..dd29aa8 100644 --- a/compiler/cmm/MkZipCfgCmm.hs +++ b/compiler/cmm/MkZipCfgCmm.hs @@ -27,7 +27,8 @@ import Cmm ( GenCmm(..), GenCmmTop(..), CmmStatic, CmmInfo ) import MachOp (MachHint(..), wordRep) import ZipCfgCmmRep hiding (CmmGraph, CmmAGraph, CmmBlock, CmmZ, CmmTopZ) - -- ^ to make this module more self-contained, these definitions are duplicated below + -- to make this module more self-contained, the above definitions are + -- duplicated below import PprCmm() import ClosureInfo @@ -58,7 +59,7 @@ mkUnsafeCall :: CmmCallTarget -> CmmFormals -> CmmActuals -> CmmAGraph mkFinalCall :: CmmExpr -> CCallConv -> CmmActuals -> CmmAGraph -- Never returns; like exit() or barf() ----------- Context manipulation ('return via') +---------- Context manipulation ("return via") mkAddToContext :: CmmExpr -> [CmmExpr] -> CmmAGraph ---------- Control transfer diff --git a/compiler/cmm/ZipCfg.hs b/compiler/cmm/ZipCfg.hs index 3285b5b..5681694 100644 --- a/compiler/cmm/ZipCfg.hs +++ b/compiler/cmm/ZipCfg.hs @@ -379,7 +379,7 @@ lastTail :: ZTail m l -> ZLast l lastTail (ZLast l) = l lastTail (ZTail _ t) = lastTail t -tailOfLast l = ZLast (LastOther l) -- ^ tedious to write in every client +tailOfLast l = ZLast (LastOther l) -- tedious to write in every client ------------------ simple graph manipulations @@ -443,9 +443,11 @@ single_exitg (Graph tail blocks) = foldUFM add (exit_count (lastTail tail)) bloc -- more mathematically elegant (but results in more complicated code). -- -- Here's an easy way to go wrong! Consider +-- @ -- A -> [B,C] -- B -> D -- C -> D +-- @ -- Then ordinary dfs would give [A,B,D,C] which has a back ref from C to D. -- Better to geot [A,B,C,D] diff --git a/compiler/cmm/ZipDataflow.hs b/compiler/cmm/ZipDataflow.hs index b9d791f..97b146c 100644 --- a/compiler/cmm/ZipDataflow.hs +++ b/compiler/cmm/ZipDataflow.hs @@ -232,7 +232,7 @@ data ForwardFixedPoint m l fact a = FFP type PassName = String --- | zdfSolveFrom is an overloaded name that resolves to a pure +-- | 'zdfSolveFrom' is an overloaded name that resolves to a pure -- analysis with no rewriting. It has only two instances: forward and -- backward. Since it needs no rewrites, the type parameters of the -- class are transfer functions and the fixed point. @@ -252,17 +252,17 @@ type PassName = String -- -- The intent of the rest of the type signature should be obvious. -- If not, place a skype call to norman-ramsey or complain bitterly --- to norman-ramsey@acm.org. +-- to . class DataflowSolverDirection transfers fixedpt where zdfSolveFrom :: (DebugNodes m l, Outputable a) - => BlockEnv a -- Initial facts (unbound == bottom) + => BlockEnv a -- ^ Initial facts (unbound == bottom) -> PassName - -> DataflowLattice a -- Lattice - -> transfers m l a -- Dataflow transfer functions - -> a -- Fact flowing in (at entry or exit) - -> Graph m l -- Graph to be analyzed - -> FuelMonad (fixedpt m l a ()) -- Answers + -> DataflowLattice a -- ^ Lattice + -> transfers m l a -- ^ Dataflow transfer functions + -> a -- ^ Fact flowing in (at entry or exit) + -> Graph m l -- ^ Graph to be analyzed + -> FuelMonad (fixedpt m l a ()) -- ^ Answers -- There are exactly two instances: forward and backward instance DataflowSolverDirection ForwardTransfers ForwardFixedPoint -- 1.7.10.4