ghc-9.2.0.20210821: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.CmmToAsm.Reg.Graph

Description

Graph coloring register allocator.

Synopsis

Documentation

regAlloc Source #

Arguments

:: (OutputableP Platform statics, Instruction instr) 
=> NCGConfig 
-> UniqFM RegClass (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.