X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FRegSpillClean.hs;h=2ecd4503a7e7a8015dae1f6057bb470e837e17d4;hb=2922c9ae951271a60db6fd6b2488f9d8111e442e;hp=8cfeb1818ff669b9212596b405bbc49e1a0f1022;hpb=982c1f494de8a691294a95aee108e765c3f592a0;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegSpillClean.hs b/compiler/nativeGen/RegSpillClean.hs index 8cfeb18..2ecd450 100644 --- a/compiler/nativeGen/RegSpillClean.hs +++ b/compiler/nativeGen/RegSpillClean.hs @@ -1,5 +1,5 @@ {-# OPTIONS -fno-warn-missing-signatures #-} --- | Clean out unneeded spill/reload instrs +-- | Clean out unneeded spill\/reload instrs -- -- * Handling of join points -- @@ -20,7 +20,7 @@ -- What we really care about here is that on the entry to B3, %r1 will always -- have the same value that is in SLOT(0) (ie, %r1 is _valid_) -- --- This also works if the reloads in B1/B2 were spills instead, because +-- This also works if the reloads in B1\/B2 were spills instead, because -- spilling %r1 to a slot makes that slot have the same value as %r1. -- @@ -29,6 +29,7 @@ module RegSpillClean ( ) where +import BlockId import RegLiveness import RegAllocInfo import MachRegs @@ -49,7 +50,7 @@ import Data.List ( find, nub ) type Slot = Int --- | Clean out unneeded spill/reloads from this top level thing. +-- | Clean out unneeded spill\/reloads from this top level thing. cleanSpills :: LiveCmmTop -> LiveCmmTop cleanSpills cmm = evalState (cleanSpin 0 cmm) initCleanS @@ -71,7 +72,7 @@ cleanSpin spinCount code cleanSpin spinCount code = do - -- init count of cleaned spills/reloads + -- init count of cleaned spills\/reloads modify $ \s -> s { sCleanedSpillsAcc = 0 , sCleanedReloadsAcc = 0 @@ -85,7 +86,7 @@ cleanSpin spinCount code -- safe to erase reloads after join points for the next pass. collateJoinPoints - -- remember how many spills/reloads we cleaned in this pass + -- remember how many spills\/reloads we cleaned in this pass spills <- gets sCleanedSpillsAcc reloads <- gets sCleanedReloadsAcc modify $ \s -> s @@ -350,10 +351,10 @@ data CleanS -- reloaded from on this path. , sReloadedBy :: UniqFM [BlockId] - -- spills/reloads cleaned each pass (latest at front) + -- spills\/reloads cleaned each pass (latest at front) , sCleanedCount :: [(Int, Int)] - -- spills/reloads that have been cleaned in this pass so far. + -- spills\/reloads that have been cleaned in this pass so far. , sCleanedSpillsAcc :: Int , sCleanedReloadsAcc :: Int }