summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc/Graph/Main.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-10-02 01:31:05 +0100
committerIan Lynagh <igloo@earth.li>2011-10-02 16:39:08 +0100
commitac7a7eb93397a2343402f77f1a8a8b4a0e0298df (patch)
tree86fae1d7598b2ddb94b1c00906468eb54af9a48e /compiler/nativeGen/RegAlloc/Graph/Main.hs
parentd8d161749c8b13c3db802f348761cff662741c53 (diff)
downloadhaskell-ac7a7eb93397a2343402f77f1a8a8b4a0e0298df.tar.gz
More CPP removal: pprDynamicLinkerAsmLabel in CLabel
And some knock-on changes
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph/Main.hs')
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Main.hs26
1 files changed, 16 insertions, 10 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index 19497145f2..efc04930cd 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs
@@ -45,7 +45,7 @@ maxSpinCount = 10
-- | The top level of the graph coloring register allocator.
regAlloc
- :: (Outputable statics, PlatformOutputable instr, Instruction instr)
+ :: (PlatformOutputable statics, PlatformOutputable instr, Instruction instr)
=> DynFlags
-> UniqFM (UniqSet RealReg) -- ^ the registers we can use for allocation
-> UniqSet Int -- ^ the set of available spill slots.
@@ -72,14 +72,20 @@ regAlloc dflags regsFree slotsFree code
return ( code_final
, reverse debug_codeGraphs )
-regAlloc_spin
- dflags
- spinCount
- (triv :: Color.Triv VirtualReg RegClass RealReg)
- (regsFree :: UniqFM (UniqSet RealReg))
- slotsFree
- debug_codeGraphs
- code
+regAlloc_spin :: (Instruction instr,
+ PlatformOutputable instr,
+ PlatformOutputable statics)
+ => DynFlags
+ -> Int
+ -> Color.Triv VirtualReg RegClass RealReg
+ -> UniqFM (UniqSet RealReg)
+ -> UniqSet Int
+ -> [RegAllocStats statics instr]
+ -> [LiveCmmDecl statics instr]
+ -> UniqSM ([NatCmmDecl statics instr],
+ [RegAllocStats statics instr],
+ Color.Graph VirtualReg RegClass RealReg)
+regAlloc_spin dflags spinCount triv regsFree slotsFree debug_codeGraphs code
= do
let platform = targetPlatform dflags
-- if any of these dump flags are turned on we want to hang on to
@@ -323,7 +329,7 @@ graphAddCoalesce _ _
-- | Patch registers in code using the reg -> reg mapping in this graph.
patchRegsFromGraph
- :: (Outputable statics, PlatformOutputable instr, Instruction instr)
+ :: (PlatformOutputable statics, PlatformOutputable instr, Instruction instr)
=> Platform -> Color.Graph VirtualReg RegClass RealReg
-> LiveCmmDecl statics instr -> LiveCmmDecl statics instr