diff options
author | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
---|---|---|
committer | Kavon Farvardin <kavon@farvard.in> | 2018-09-23 15:29:37 -0500 |
commit | 84c2ad99582391005b5e873198b15e9e9eb4f78d (patch) | |
tree | caa8c2f2ec7e97fbb4977263c6817c9af5025cf4 /compiler/nativeGen/RegAlloc/Graph/Spill.hs | |
parent | 8ddb47cfcf5776e9a3c55fd37947c8a95e00fa12 (diff) | |
parent | e68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff) | |
download | haskell-wip/T13904.tar.gz |
update to current master againwip/T13904
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph/Spill.hs')
-rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/Spill.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Spill.hs b/compiler/nativeGen/RegAlloc/Graph/Spill.hs index 0014ab6fed..bce24bdd3c 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Spill.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Spill.hs @@ -7,6 +7,8 @@ module RegAlloc.Graph.Spill ( SpillStats(..), accSpillSL ) where +import GhcPrelude + import RegAlloc.Liveness import Instruction import Reg @@ -34,7 +36,7 @@ import qualified Data.IntSet as IntSet -- TODO: See if we can split some of the live ranges instead of just globally -- spilling the virtual reg. This might make the spill cleaner's job easier. -- --- TODO: On CISCy x86 and x86_64 we don't nessesarally have to add a mov instruction +-- TODO: On CISCy x86 and x86_64 we don't necessarily have to add a mov instruction -- when making spills. If an instr is using a spilled virtual we may be able to -- address the spill slot directly. -- @@ -111,8 +113,8 @@ regSpill_top platform regSlotMap cmm -- after we've done a successful allocation. let liveSlotsOnEntry' :: BlockMap IntSet liveSlotsOnEntry' - = mapFoldWithKey patchLiveSlot - liveSlotsOnEntry liveVRegsOnEntry + = mapFoldlWithKey patchLiveSlot + liveSlotsOnEntry liveVRegsOnEntry let info' = LiveInfo static firstId @@ -129,10 +131,9 @@ regSpill_top platform regSlotMap cmm -- then record the fact that these slots are now live in those blocks -- in the given slotmap. patchLiveSlot - :: BlockId -> RegSet - -> BlockMap IntSet -> BlockMap IntSet + :: BlockMap IntSet -> BlockId -> RegSet -> BlockMap IntSet - patchLiveSlot blockId regsLive slotMap + patchLiveSlot slotMap blockId regsLive = let -- Slots that are already recorded as being live. curSlotsLive = fromMaybe IntSet.empty |