X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FRegAllocColor.hs;h=5c8569145f6ddaf3d79d998b8bcfd225cc390c3f;hb=f44b39926869cd9b9a33f06ee807f7c664fd20c8;hp=21d7ed1d758d81db8cd728ca2f3e4943e0be5958;hpb=fff4dee0483eda0b675057f8259a161ff16467f4;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegAllocColor.hs b/compiler/nativeGen/RegAllocColor.hs index 21d7ed1..5c85691 100644 --- a/compiler/nativeGen/RegAllocColor.hs +++ b/compiler/nativeGen/RegAllocColor.hs @@ -1,8 +1,8 @@ +{-# OPTIONS -fno-warn-missing-signatures #-} -- | Graph coloring register allocator. -- -- TODO: The colors in graphviz graphs for x86_64 and ppc could be nicer. -- -{-# OPTIONS -fno-warn-missing-signatures #-} module RegAllocColor ( regAlloc, @@ -33,7 +33,7 @@ import Data.List import Data.Maybe import Control.Monad --- | The maximum number of build/spill cycles we'll allow. +-- | The maximum number of build\/spill cycles we'll allow. -- We should only need 3 or 4 cycles tops. -- If we run for any longer than this we're probably in an infinite loop, -- It's probably better just to bail out and report a bug at this stage. @@ -48,9 +48,9 @@ regAlloc -> UniqFM (UniqSet Reg) -- ^ the registers we can use for allocation -> UniqSet Int -- ^ the set of available spill slots. -> [LiveCmmTop] -- ^ code annotated with liveness information. - -> UniqSM - ( [NatCmmTop] -- ^ code with registers allocated. - , [RegAllocStats] ) -- ^ stats for each stage of allocation + -> UniqSM ( [NatCmmTop], [RegAllocStats] ) + -- ^ code with registers allocated and stats for each stage of + -- allocation regAlloc dflags regsFree slotsFree code = do @@ -60,7 +60,7 @@ regAlloc dflags regsFree slotsFree code return ( code_final , reverse debug_codeGraphs ) -regAlloc_spin dflags (spinCount :: Int) triv regsFree slotsFree debug_codeGraphs code +regAlloc_spin dflags spinCount triv regsFree slotsFree debug_codeGraphs code = do -- if any of these dump flags are turned on we want to hang on to -- intermediate structures in the allocator - otherwise tell the