Commit 3c9dc06b authored by Brian Wignall's avatar Brian Wignall Committed by Marge Bot

Fix typos, via a Levenshtein-style corrector

parent b2e0323f
Pipeline #14214 failed with stages
in 378 minutes and 51 seconds
...@@ -2572,7 +2572,7 @@ data ArithSeqInfo id ...@@ -2572,7 +2572,7 @@ data ArithSeqInfo id
| FromThenTo (LHsExpr id) | FromThenTo (LHsExpr id)
(LHsExpr id) (LHsExpr id)
(LHsExpr id) (LHsExpr id)
-- AZ: Sould ArithSeqInfo have a TTG extension? -- AZ: Should ArithSeqInfo have a TTG extension?
instance OutputableBndrId p instance OutputableBndrId p
=> Outputable (ArithSeqInfo (GhcPass p)) where => Outputable (ArithSeqInfo (GhcPass p)) where
......
...@@ -686,7 +686,7 @@ isIrrefutableHsPat :: (OutputableBndrId p) => LPat (GhcPass p) -> Bool ...@@ -686,7 +686,7 @@ isIrrefutableHsPat :: (OutputableBndrId p) => LPat (GhcPass p) -> Bool
-- Specifically on a ConPatIn, which is what it sees for a -- Specifically on a ConPatIn, which is what it sees for a
-- (LPat Name) in the renamer, it doesn't know the size of the -- (LPat Name) in the renamer, it doesn't know the size of the
-- constructor family, so it returns False. Result: only -- constructor family, so it returns False. Result: only
-- tuple patterns are considered irrefuable at the renamer stage. -- tuple patterns are considered irrefutable at the renamer stage.
-- --
-- But if it returns True, the pattern is definitely irrefutable -- But if it returns True, the pattern is definitely irrefutable
isIrrefutableHsPat isIrrefutableHsPat
......
...@@ -42,7 +42,7 @@ callerSaves platform ...@@ -42,7 +42,7 @@ callerSaves platform
-- The order matters (for the llvm backend anyway)! We must make sure to -- The order matters (for the llvm backend anyway)! We must make sure to
-- maintain the order here with the order used in the LLVM calling conventions. -- maintain the order here with the order used in the LLVM calling conventions.
-- Note that also, this isn't all registers, just the ones that are currently -- Note that also, this isn't all registers, just the ones that are currently
-- possbily mapped to real registers. -- possibly mapped to real registers.
activeStgRegs :: Platform -> [GlobalReg] activeStgRegs :: Platform -> [GlobalReg]
activeStgRegs platform activeStgRegs platform
| platformUnregisterised platform = NoRegs.activeStgRegs | platformUnregisterised platform = NoRegs.activeStgRegs
......
...@@ -198,7 +198,7 @@ cgRhs :: Id ...@@ -198,7 +198,7 @@ cgRhs :: Id
CgIdInfo -- The info for this binding CgIdInfo -- The info for this binding
, FCode CmmAGraph -- A computation which will generate the , FCode CmmAGraph -- A computation which will generate the
-- code for the binding, and return an -- code for the binding, and return an
-- assignent of the form "x = Hp - n" -- assignment of the form "x = Hp - n"
-- (see above) -- (see above)
) )
......
...@@ -102,7 +102,7 @@ instance HasDynFlags CmmParse where ...@@ -102,7 +102,7 @@ instance HasDynFlags CmmParse where
return (d, dflags)) return (d, dflags))
-- | Takes the variable decarations and imports from the monad -- | Takes the variable declarations and imports from the monad
-- and makes an environment, which is looped back into the computation. -- and makes an environment, which is looped back into the computation.
-- In this way, we can have embedded declarations that scope over the whole -- In this way, we can have embedded declarations that scope over the whole
-- procedure, and imports that scope over the entire module. -- procedure, and imports that scope over the entire module.
......
...@@ -2159,7 +2159,7 @@ vecElemProjectCast _ _ _ = Nothing ...@@ -2159,7 +2159,7 @@ vecElemProjectCast _ _ _ = Nothing
-- values! -- values!
-- The current design with respect to register mapping of scalars could -- The current design with respect to register mapping of scalars could
-- very well be the best,but exploring the design space and doing careful -- very well be the best,but exploring the design space and doing careful
-- measurments is the only only way to validate that. -- measurements is the only only way to validate that.
-- In some next generation CPU ISAs, notably RISC V, the SIMD extension -- In some next generation CPU ISAs, notably RISC V, the SIMD extension
-- includes support for a sort of run time CPU dependent vectorization parameter, -- includes support for a sort of run time CPU dependent vectorization parameter,
-- where a loop may act upon a single scalar each iteration OR some 2,4,8 ... -- where a loop may act upon a single scalar each iteration OR some 2,4,8 ...
......
...@@ -582,7 +582,7 @@ mk_deriv occ_sp sys_prefix str = ...@@ -582,7 +582,7 @@ mk_deriv occ_sp sys_prefix str =
mkOccNameFS occ_sp (concatFS $ sys_prefix : str) mkOccNameFS occ_sp (concatFS $ sys_prefix : str)
isDerivedOccName :: OccName -> Bool isDerivedOccName :: OccName -> Bool
-- ^ Test for definitions internally generated by GHC. This predicte -- ^ Test for definitions internally generated by GHC. This predicate
-- is used to suppress printing of internal definitions in some debug prints -- is used to suppress printing of internal definitions in some debug prints
isDerivedOccName occ = isDerivedOccName occ =
case occNameString occ of case occNameString occ of
......
...@@ -319,7 +319,7 @@ seqDVarSet s = sizeDVarSet s `seq` () ...@@ -319,7 +319,7 @@ seqDVarSet s = sizeDVarSet s `seq` ()
extendDVarSetList :: DVarSet -> [Var] -> DVarSet extendDVarSetList :: DVarSet -> [Var] -> DVarSet
extendDVarSetList = addListToUniqDSet extendDVarSetList = addListToUniqDSet
-- | Convert a DVarSet to a VarSet by forgeting the order of insertion -- | Convert a DVarSet to a VarSet by forgetting the order of insertion
dVarSetToVarSet :: DVarSet -> VarSet dVarSetToVarSet :: DVarSet -> VarSet
dVarSetToVarSet = unsafeUFMToUniqSet . udfmToUfm . getUniqDSet dVarSetToVarSet = unsafeUFMToUniqSet . udfmToUfm . getUniqDSet
......
...@@ -227,7 +227,7 @@ implemented. ...@@ -227,7 +227,7 @@ implemented.
case, if the closure is not locally defined then we can't point to case, if the closure is not locally defined then we can't point to
it directly from the info table, because this is the text section it directly from the info table, because this is the text section
which cannot contain runtime relocations. In this case we skip this which cannot contain runtime relocations. In this case we skip this
optimisation and generate the singleton SRT, becase SRTs are in the optimisation and generate the singleton SRT, because SRTs are in the
data section and *can* have relocatable references. data section and *can* have relocatable references.
2. [FUN] A static function closure can also be an SRT, we simply put 2. [FUN] A static function closure can also be an SRT, we simply put
......
...@@ -135,7 +135,7 @@ data MachOp ...@@ -135,7 +135,7 @@ data MachOp
| MO_VU_Quot Length Width | MO_VU_Quot Length Width
| MO_VU_Rem Length Width | MO_VU_Rem Length Width
-- Floting point vector element insertion and extraction operations -- Floating point vector element insertion and extraction operations
| MO_VF_Insert Length Width -- Insert scalar into vector | MO_VF_Insert Length Width -- Insert scalar into vector
| MO_VF_Extract Length Width -- Extract scalar from vector | MO_VF_Extract Length Width -- Extract scalar from vector
......
...@@ -715,7 +715,7 @@ isTickSubScope = cmp ...@@ -715,7 +715,7 @@ isTickSubScope = cmp
cmp (SubScope u s) s'@(SubScope u' _) = u == u' || cmp s s' cmp (SubScope u s) s'@(SubScope u' _) = u == u' || cmp s s'
-- | Combine two tick scopes. The new scope should be sub-scope of -- | Combine two tick scopes. The new scope should be sub-scope of
-- both parameters. We simplfy automatically if one tick scope is a -- both parameters. We simplify automatically if one tick scope is a
-- sub-scope of the other already. -- sub-scope of the other already.
combineTickScopes :: CmmTickScope -> CmmTickScope -> CmmTickScope combineTickScopes :: CmmTickScope -> CmmTickScope -> CmmTickScope
combineTickScopes s1 s2 combineTickScopes s1 s2
......
...@@ -297,7 +297,7 @@ cpsTop hsc_env proc = ...@@ -297,7 +297,7 @@ cpsTop hsc_env proc =
-- Sp = Sp + 16 -- Sp = Sp + 16
-- ...y...y... -- ...y...y...
-- --
-- But since we don't see any benefits from running sinking befroe stack -- But since we don't see any benefits from running sinking before stack
-- layout, this situation probably doesn't arise too often in practice. -- layout, this situation probably doesn't arise too often in practice.
-- --
......
...@@ -15,7 +15,7 @@ module SMRep ( ...@@ -15,7 +15,7 @@ module SMRep (
StgHalfWord, fromStgHalfWord, toStgHalfWord, StgHalfWord, fromStgHalfWord, toStgHalfWord,
halfWordSize, halfWordSizeInBits, halfWordSize, halfWordSizeInBits,
-- * Closure repesentation -- * Closure representation
SMRep(..), -- CmmInfo sees the rep; no one else does SMRep(..), -- CmmInfo sees the rep; no one else does
IsStatic, IsStatic,
ClosureTypeInfo(..), ArgDescr(..), Liveness, ClosureTypeInfo(..), ArgDescr(..), Liveness,
......
This diff is collapsed.
...@@ -496,7 +496,7 @@ ruleLhsFreeIds = fvVarSet . ruleLhsFVIds ...@@ -496,7 +496,7 @@ ruleLhsFreeIds = fvVarSet . ruleLhsFVIds
ruleLhsFreeIdsList :: CoreRule -> [Var] ruleLhsFreeIdsList :: CoreRule -> [Var]
-- ^ This finds all locally-defined free Ids on the left hand side of a rule -- ^ This finds all locally-defined free Ids on the left hand side of a rule
-- and returns them as a deterministically ordered list
ruleLhsFreeIdsList = fvVarList . ruleLhsFVIds ruleLhsFreeIdsList = fvVarList . ruleLhsFVIds
ruleLhsFVIds :: CoreRule -> FV ruleLhsFVIds :: CoreRule -> FV
......
...@@ -166,7 +166,7 @@ That is, use a type let. See Note [Type let] in CoreSyn. ...@@ -166,7 +166,7 @@ That is, use a type let. See Note [Type let] in CoreSyn.
However, when linting <body> we need to remember that a=Int, else we might However, when linting <body> we need to remember that a=Int, else we might
reject a correct program. So we carry a type substitution (in this example reject a correct program. So we carry a type substitution (in this example
[a -> Int]) and apply this substitution before comparing types. The functin [a -> Int]) and apply this substitution before comparing types. The function
lintInTy :: Type -> LintM (Type, Kind) lintInTy :: Type -> LintM (Type, Kind)
returns a substituted type. returns a substituted type.
......
...@@ -745,7 +745,7 @@ Breakpoints can't handle free variables with unlifted types anyway. ...@@ -745,7 +745,7 @@ Breakpoints can't handle free variables with unlifted types anyway.
{- {-
Note [Worker inlining] Note [Worker inlining]
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
A worker can get sustituted away entirely. A worker can get substituted away entirely.
- it might be trivial - it might be trivial
- it might simply be very small - it might simply be very small
We do not treat an InlWrapper as an 'occurrence' in the occurrence We do not treat an InlWrapper as an 'occurrence' in the occurrence
......
...@@ -196,7 +196,7 @@ tidyLetBndr rec_tidy_env env@(tidy_env, var_env) id ...@@ -196,7 +196,7 @@ tidyLetBndr rec_tidy_env env@(tidy_env, var_env) id
-- Don't attempt to recompute arity here; this is just tidying! -- Don't attempt to recompute arity here; this is just tidying!
-- Trying to do so led to #17294 -- Trying to do so led to #17294
-- --
-- Set inline-prag info so that we preseve it across -- Set inline-prag info so that we preserve it across
-- separate compilation boundaries -- separate compilation boundaries
old_info = idInfo id old_info = idInfo id
new_info = vanillaIdInfo new_info = vanillaIdInfo
......
...@@ -886,7 +886,7 @@ After doing case-of-known-constructor, and expanding $WMkT we get ...@@ -886,7 +886,7 @@ After doing case-of-known-constructor, and expanding $WMkT we get
Yikes! That bogusly appears to evaluate the absentError! Yikes! That bogusly appears to evaluate the absentError!
This is extremely tiresome. Another way to think of this is that, in This is extremely tiresome. Another way to think of this is that, in
Core, it is an invariant that a strict data contructor, like MkT, must Core, it is an invariant that a strict data constructor, like MkT, must
be applied only to an argument in HNF. So (absentError "blah") had be applied only to an argument in HNF. So (absentError "blah") had
better be non-bottom. better be non-bottom.
......
...@@ -380,7 +380,7 @@ dfBindComp c_id n_id (pat, core_list1) quals = do ...@@ -380,7 +380,7 @@ dfBindComp c_id n_id (pat, core_list1) quals = do
b <- newSysLocalDs b_ty b <- newSysLocalDs b_ty
x <- newSysLocalDs x_ty x <- newSysLocalDs x_ty
-- build rest of the comprehesion -- build rest of the comprehension
core_rest <- dfListComp c_id b quals core_rest <- dfListComp c_id b quals
-- build the pattern match -- build the pattern match
......
...@@ -253,7 +253,7 @@ Now consider: ...@@ -253,7 +253,7 @@ Now consider:
In the first we must test y first; in the second we must test x In the first we must test y first; in the second we must test x
first. So we must divide even the equations for a single constructor first. So we must divide even the equations for a single constructor
T into sub-goups, based on whether they match the same field in the T into sub-groups, based on whether they match the same field in the
same order. That's what the (groupBy compatible_pats) grouping. same order. That's what the (groupBy compatible_pats) grouping.
All non-record patterns are "compatible" in this sense, because the All non-record patterns are "compatible" in this sense, because the
......
...@@ -68,7 +68,7 @@ data BCInstr ...@@ -68,7 +68,7 @@ data BCInstr
| PUSH32 !Word16 | PUSH32 !Word16
-- Push the specifiec local as a 8, 16, 32 bit value onto the stack, but the -- Push the specifiec local as a 8, 16, 32 bit value onto the stack, but the
-- value will take the whole word on the stack (i.e., the stack will gorw by -- value will take the whole word on the stack (i.e., the stack will grow by
-- a word) -- a word)
-- This is useful when extracting a packed constructor field for further use. -- This is useful when extracting a packed constructor field for further use.
-- Currently we expect all values on the stack to take full words, except for -- Currently we expect all values on the stack to take full words, except for
......
...@@ -48,7 +48,7 @@ instance Ord HieName where ...@@ -48,7 +48,7 @@ instance Ord HieName where
compare (ExternalName a b c) (ExternalName d e f) = compare (a,b,c) (d,e,f) compare (ExternalName a b c) (ExternalName d e f) = compare (a,b,c) (d,e,f)
compare (LocalName a b) (LocalName c d) = compare (a,b) (c,d) compare (LocalName a b) (LocalName c d) = compare (a,b) (c,d)
compare (KnownKeyName a) (KnownKeyName b) = nonDetCmpUnique a b compare (KnownKeyName a) (KnownKeyName b) = nonDetCmpUnique a b
-- Not actually non determinstic as it is a KnownKey -- Not actually non deterministic as it is a KnownKey
compare ExternalName{} _ = LT compare ExternalName{} _ = LT
compare LocalName{} ExternalName{} = GT compare LocalName{} ExternalName{} = GT
compare LocalName{} _ = LT compare LocalName{} _ = LT
......
...@@ -1320,7 +1320,7 @@ pprTyTcApp' ctxt_prec tc tys dflags style ...@@ -1320,7 +1320,7 @@ pprTyTcApp' ctxt_prec tc tys dflags style
| otherwise | otherwise
= getPprDebug $ \dbg -> = getPprDebug $ \dbg ->
if | not dbg && tc `ifaceTyConHasKey` errorMessageTypeErrorFamKey if | not dbg && tc `ifaceTyConHasKey` errorMessageTypeErrorFamKey
-- Suppress detail unles you _really_ want to see -- Suppress detail unless you _really_ want to see
-> text "(TypeError ...)" -> text "(TypeError ...)"
| Just doc <- ppr_equality ctxt_prec tc (appArgsIfaceTypes tys) | Just doc <- ppr_equality ctxt_prec tc (appArgsIfaceTypes tys)
......
...@@ -495,7 +495,7 @@ tcHiBootIface hsc_src mod ...@@ -495,7 +495,7 @@ tcHiBootIface hsc_src mod
-- In --make and interactive mode, if this module has an hs-boot file -- In --make and interactive mode, if this module has an hs-boot file
-- we'll have compiled it already, and it'll be in the HPT -- we'll have compiled it already, and it'll be in the HPT
-- --
-- We check wheher the interface is a *boot* interface. -- We check whether the interface is a *boot* interface.
-- It can happen (when using GHC from Visual Studio) that we -- It can happen (when using GHC from Visual Studio) that we
-- compile a module in TypecheckOnly mode, with a stable, -- compile a module in TypecheckOnly mode, with a stable,
-- fully-populated HPT. In that case the boot interface isn't there -- fully-populated HPT. In that case the boot interface isn't there
......
...@@ -582,7 +582,7 @@ aliasify (LMGlobal var val) = do ...@@ -582,7 +582,7 @@ aliasify (LMGlobal var val) = do
-- point of definition instead of the point of usage, as was previously -- point of definition instead of the point of usage, as was previously
-- done. See #9142 for details. -- done. See #9142 for details.
-- --
-- Finally, case (1) is trival. As we already have a definition for -- Finally, case (1) is trivial. As we already have a definition for
-- and therefore know the type of the referenced symbol, we can do -- and therefore know the type of the referenced symbol, we can do
-- away with casting the alias to the desired type in @getSymbolPtr@ -- away with casting the alias to the desired type in @getSymbolPtr@
-- and instead just emit a reference to the definition symbol directly. -- and instead just emit a reference to the definition symbol directly.
......
...@@ -13,7 +13,7 @@ the same name.) ...@@ -13,7 +13,7 @@ the same name.)
As Archives are rather simple structurally, we can just build the archives As Archives are rather simple structurally, we can just build the archives
with Haskell directly and use ranlib on the final result to get the symbol with Haskell directly and use ranlib on the final result to get the symbol
index. This should allow us to work around with the differences/abailability index. This should allow us to work around with the differences/abailability
of libtool across differet platforms. of libtool across different platforms.
-} -}
module Ar module Ar
(ArchiveEntry(..) (ArchiveEntry(..)
......
...@@ -383,7 +383,7 @@ pprCycle summaries = pp_group (CyclicSCC summaries) ...@@ -383,7 +383,7 @@ pprCycle summaries = pp_group (CyclicSCC summaries)
pp_group (CyclicSCC mss) pp_group (CyclicSCC mss)
= ASSERT( not (null boot_only) ) = ASSERT( not (null boot_only) )
-- The boot-only list must be non-empty, else there would -- The boot-only list must be non-empty, else there would
-- be an infinite chain of non-boot imoprts, and we've -- be an infinite chain of non-boot imports, and we've
-- already checked for that in processModDeps -- already checked for that in processModDeps
pp_ms loop_breaker $$ vcat (map pp_group groups) pp_ms loop_breaker $$ vcat (map pp_group groups)
where where
......
...@@ -638,7 +638,7 @@ setProgramDynFlags_ invalidate_needed dflags = do ...@@ -638,7 +638,7 @@ setProgramDynFlags_ invalidate_needed dflags = do
-- that the next downsweep will think that all the files have changed -- that the next downsweep will think that all the files have changed
-- and preprocess them again. This won't necessarily cause everything -- and preprocess them again. This won't necessarily cause everything
-- to be recompiled, because by the time we check whether we need to -- to be recompiled, because by the time we check whether we need to
-- recopmile a module, we'll have re-summarised the module and have a -- recompile a module, we'll have re-summarised the module and have a
-- correct ModSummary. -- correct ModSummary.
-- --
invalidateModSummaryCache :: GhcMonad m => m () invalidateModSummaryCache :: GhcMonad m => m ()
......
...@@ -1651,7 +1651,7 @@ It's exactly the same for type-family instances. See #7102 ...@@ -1651,7 +1651,7 @@ It's exactly the same for type-family instances. See #7102
data InteractiveContext data InteractiveContext
= InteractiveContext { = InteractiveContext {
ic_dflags :: DynFlags, ic_dflags :: DynFlags,
-- ^ The 'DynFlags' used to evaluate interative expressions -- ^ The 'DynFlags' used to evaluate interactive expressions
-- and statements. -- and statements.
ic_mod_index :: Int, ic_mod_index :: Int,
......
...@@ -38,7 +38,7 @@ import Outputable ...@@ -38,7 +38,7 @@ import Outputable
{- Note [Pretty printing via IfaceSyn] {- Note [Pretty printing via IfaceSyn]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Our general plan for prett-printing Our general plan for pretty-printing
- Types - Types
- TyCons - TyCons
- Classes - Classes
......
...@@ -374,7 +374,7 @@ combineNeighbourhood :: [CfgEdge] -- ^ Edges to consider ...@@ -374,7 +374,7 @@ combineNeighbourhood :: [CfgEdge] -- ^ Edges to consider
-- were used to fuse chains and as such no longer need to be -- were used to fuse chains and as such no longer need to be
-- considered. -- considered.
combineNeighbourhood edges chains combineNeighbourhood edges chains
= -- pprTraceIt "Neigbours" $ = -- pprTraceIt "Neighbours" $
-- pprTrace "combineNeighbours" (ppr edges) $ -- pprTrace "combineNeighbours" (ppr edges) $
applyEdges edges endFrontier startFrontier (Set.empty) applyEdges edges endFrontier startFrontier (Set.empty)
where where
......
...@@ -226,7 +226,7 @@ addNodeBetweenNat from between to ...@@ -226,7 +226,7 @@ addNodeBetweenNat from between to
addWeightEdge between old weight . addWeightEdge between old weight .
delEdge from old $ m delEdge from old $ m
| otherwise | otherwise
= pprPanic "Faild to update cfg: Untracked edge" (ppr (from,to)) = pprPanic "Failed to update cfg: Untracked edge" (ppr (from,to))
-- | Place `succ` after `block` and change any edges -- | Place `succ` after `block` and change any edges
......
...@@ -217,7 +217,7 @@ howToAccessLabel ...@@ -217,7 +217,7 @@ howToAccessLabel
-- Windows -- Windows
-- In Windows speak, a "module" is a set of objects linked into the -- In Windows speak, a "module" is a set of objects linked into the
-- same Portable Exectuable (PE) file. (both .exe and .dll files are PEs). -- same Portable Executable (PE) file. (both .exe and .dll files are PEs).
-- --
-- If we're compiling a multi-module program then symbols from other modules -- If we're compiling a multi-module program then symbols from other modules
-- are accessed by a symbol pointer named __imp_SYMBOL. At runtime we have the -- are accessed by a symbol pointer named __imp_SYMBOL. At runtime we have the
......
...@@ -425,7 +425,7 @@ getRegister' dflags (CmmReg reg) ...@@ -425,7 +425,7 @@ getRegister' dflags (CmmReg reg)
getRegister' dflags tree@(CmmRegOff _ _) getRegister' dflags tree@(CmmRegOff _ _)
= getRegister' dflags (mangleIndexTree dflags tree) = getRegister' dflags (mangleIndexTree dflags tree)
-- for 32-bit architectuers, support some 64 -> 32 bit conversions: -- for 32-bit architectures, support some 64 -> 32 bit conversions:
-- TO_W_(x), TO_W_(x >> 32) -- TO_W_(x), TO_W_(x >> 32)
getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32) getRegister' dflags (CmmMachOp (MO_UU_Conv W64 W32)
......
...@@ -83,7 +83,7 @@ regAlloc dflags regsFree slotsFree slotsCount code cfg ...@@ -83,7 +83,7 @@ regAlloc dflags regsFree slotsFree slotsCount code cfg
-- | Perform solver iterations for the graph coloring allocator. -- | Perform solver iterations for the graph coloring allocator.
-- --
-- We extract a register confict graph from the provided cmm code, -- We extract a register conflict graph from the provided cmm code,
-- and try to colour it. If that works then we use the solution rewrite -- and try to colour it. If that works then we use the solution rewrite
-- the code with real hregs. If coloring doesn't work we add spill code -- the code with real hregs. If coloring doesn't work we add spill code
-- and try to colour it again. After `maxSpinCount` iterations we give up. -- and try to colour it again. After `maxSpinCount` iterations we give up.
......
...@@ -38,7 +38,7 @@ import Data.Maybe ...@@ -38,7 +38,7 @@ import Data.Maybe
import Control.Monad (join) import Control.Monad (join)
-- | Records the expected cost to spill some regster. -- | Records the expected cost to spill some register.
type SpillCostRecord type SpillCostRecord
= ( VirtualReg -- register name = ( VirtualReg -- register name
, Int -- number of writes to this reg , Int -- number of writes to this reg
......
...@@ -26,7 +26,7 @@ import Panic ...@@ -26,7 +26,7 @@ import Panic
-- This gets hammered by scanGraph during register allocation, -- This gets hammered by scanGraph during register allocation,
-- so needs to be fairly efficient. -- so needs to be fairly efficient.
-- --
-- NOTE: This only works for arcitectures with just RcInteger and RcDouble -- NOTE: This only works for architectures with just RcInteger and RcDouble
-- (which are disjoint) ie. x86, x86_64 and ppc -- (which are disjoint) ie. x86, x86_64 and ppc
-- --
-- The number of allocatable regs is hard coded in here so we can do -- The number of allocatable regs is hard coded in here so we can do
......
...@@ -1042,7 +1042,7 @@ checkImportDecl mPre mPost = do ...@@ -1042,7 +1042,7 @@ checkImportDecl mPre mPost = do
importQualifiedPostEnabled <- getBit ImportQualifiedPostBit importQualifiedPostEnabled <- getBit ImportQualifiedPostBit
-- Error if 'qualified' found in postpostive position and -- Error if 'qualified' found in postpositive position and
-- 'ImportQualifiedPost' is not in effect. -- 'ImportQualifiedPost' is not in effect.
whenJust mPost $ \post -> whenJust mPost $ \post ->
when (not importQualifiedPostEnabled) $ when (not importQualifiedPostEnabled) $
......
...@@ -442,7 +442,7 @@ So for example: ...@@ -442,7 +442,7 @@ So for example:
We abbreviate '*' specially: We abbreviate '*' specially:
type * = TYPE 'LiftedRep type * = TYPE 'LiftedRep
The 'rr' parameter tells us how the value is represented at runime. The 'rr' parameter tells us how the value is represented at runtime.
Generally speaking, you can't be polymorphic in 'rr'. E.g Generally speaking, you can't be polymorphic in 'rr'. E.g
f :: forall (rr:RuntimeRep) (a:TYPE rr). a -> [a] f :: forall (rr:RuntimeRep) (a:TYPE rr). a -> [a]
......
...@@ -415,7 +415,7 @@ pprTickCounts :: Map Tick Int -> SDoc ...@@ -415,7 +415,7 @@ pprTickCounts :: Map Tick Int -> SDoc
pprTickCounts counts pprTickCounts counts
= vcat (map pprTickGroup groups) = vcat (map pprTickGroup groups)
where where
groups :: [[(Tick,Int)]] -- Each group shares a comon tag groups :: [[(Tick,Int)]] -- Each group shares a common tag
-- toList returns common tags adjacent -- toList returns common tags adjacent
groups = groupBy same_tag (Map.toList counts) groups = groupBy same_tag (Map.toList counts)
same_tag (tick1,_) (tick2,_) = tickToTag tick1 == tickToTag tick2 same_tag (tick1,_) (tick2,_) = tickToTag tick1 == tickToTag tick2
......
...@@ -529,7 +529,7 @@ from the body of the let that depend on the staying-put bindings. ...@@ -529,7 +529,7 @@ from the body of the let that depend on the staying-put bindings.
We used instead to do the partitionByMajorLevel on the RHS of an '=', We used instead to do the partitionByMajorLevel on the RHS of an '=',
in floatRhs. But that was quite tiresome. We needed to test for in floatRhs. But that was quite tiresome. We needed to test for
values or trival rhss, because (in particular) we don't want to insert values or trivial rhss, because (in particular) we don't want to insert
new bindings between the "=" and the "\". E.g. new bindings between the "=" and the "\". E.g.
f = \x -> let <bind> in <body> f = \x -> let <bind> in <body>
We do not want We do not want
......
...@@ -164,7 +164,7 @@ libCaseBind env (Rec pairs) ...@@ -164,7 +164,7 @@ libCaseBind env (Rec pairs)
{- Note [Not bottoming Ids] {- Note [Not bottoming Ids]
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do not specialise error-functions (this is unusual, but I once saw it, Do not specialise error-functions (this is unusual, but I once saw it,
(acually in Data.Typable.Internal) (actually in Data.Typable.Internal)
Note [Only functions!] Note [Only functions!]
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
......
...@@ -881,7 +881,7 @@ Hence,there's a possibility of leaving unchanged something like this: ...@@ -881,7 +881,7 @@ Hence,there's a possibility of leaving unchanged something like this:
By the time we've thrown away the types in STG land this By the time we've thrown away the types in STG land this
could be eliminated. But I don't think it's very common could be eliminated. But I don't think it's very common
and it's dangerous to do this fiddling in STG land and it's dangerous to do this fiddling in STG land
because we might elminate a binding that's mentioned in the because we might eliminate a binding that's mentioned in the
unfolding for something. unfolding for something.
Note [Indirection zapping and ticks] Note [Indirection zapping and ticks]
......
...@@ -372,7 +372,7 @@ where the let shadows the lambda. Really this means something like ...@@ -372,7 +372,7 @@ where the let shadows the lambda. Really this means something like
- Then that continuation gets pushed under the let - Then that continuation gets pushed under the let
- Finally we simplify 'arg'. We want - Finally we simplify 'arg'. We want
- the static, lexical environment bindig x :-> x1 - the static, lexical environment binding x :-> x1
- the in-scopeset from "here", under the 'let' which includes - the in-scopeset from "here", under the 'let' which includes
both x1 and x2 both x1 and x2
......
...@@ -199,7 +199,7 @@ the two instances of +.sel weren't originally at the same type. ...@@ -199,7 +199,7 @@ the two instances of +.sel weren't originally at the same type.
Further notes on (b) Further notes on (b)
* There are quite a few variations here. For example, the defn of * There are quite a few variations here. For example, the defn of