RegAlloc.Graph.Main

ghc-8.10.7: The GHC API

Safe Haskell | None
Language | Haskell2010

RegAlloc.Graph.Main

Description

Graph coloring register allocator.

Synopsis

- regAlloc :: (Outputable statics, Outputable instr, Instruction instr) => DynFlags -> UniqFM (UniqSet RealReg) -> UniqSet Int -> Int -> [LiveCmmDecl statics instr] -> Maybe CFG -> UniqSM ([NatCmmDecl statics instr], Maybe Int, [RegAllocStats statics instr])

# Documentation

regAlloc #

Arguments

:: (Outputable statics, Outputable instr, Instruction instr) |
=> DynFlags |
-> UniqFM (UniqSet RealReg) | registers we can use for allocation
-> UniqSet Int | set of available spill slots.
-> Int | current number of spill slots
-> [LiveCmmDecl statics instr] | code annotated with liveness information.
-> Maybe CFG | CFG of basic blocks if available
-> UniqSM ([NatCmmDecl statics instr], Maybe Int, [RegAllocStats statics instr]) | code with registers allocated, additional stacks required and stats for each stage of allocation

The top level of the graph coloring register allocator.