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

GHC.CmmToAsm.Reg.Linear.State

Description

State monad for the linear register allocator.

Synopsis

Documentation

data RA_State freeRegs Source #

The register allocator state

Constructors

RA_State 

Fields

data RegM freeRegs a Source #

The register allocator monad type.

Instances

Instances details
Applicative (RegM freeRegs) Source # 
Instance details

Defined in GHC.CmmToAsm.Reg.Linear.State

Methods

pure :: a -> RegM freeRegs a Source #

(<*>) :: RegM freeRegs (a -> b) -> RegM freeRegs a -> RegM freeRegs b Source #

liftA2 :: (a -> b -> c) -> RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs c Source #

(*>) :: RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs b Source #

(<*) :: RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs a Source #

Functor (RegM freeRegs) Source # 
Instance details

Defined in GHC.CmmToAsm.Reg.Linear.State

Methods

fmap :: (a -> b) -> RegM freeRegs a -> RegM freeRegs b Source #

(<$) :: a -> RegM freeRegs b -> RegM freeRegs a Source #

Monad (RegM freeRegs) Source # 
Instance details

Defined in GHC.CmmToAsm.Reg.Linear.State

Methods

(>>=) :: RegM freeRegs a -> (a -> RegM freeRegs b) -> RegM freeRegs b Source #

(>>) :: RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs b Source #

return :: a -> RegM freeRegs a Source #

runR :: NCGConfig -> BlockAssignment freeRegs -> freeRegs -> RegMap Loc -> StackMap -> UniqSupply -> RegM freeRegs a -> (BlockAssignment freeRegs, StackMap, RegAllocStats, a) Source #

Run a computation in the RegM register allocator monad.

spillR :: Instruction instr => Reg -> Unique -> RegM freeRegs ([instr], Int) Source #

loadR :: Instruction instr => Reg -> Int -> RegM freeRegs [instr] Source #

getFreeRegsR :: RegM freeRegs freeRegs Source #

setFreeRegsR :: freeRegs -> RegM freeRegs () Source #

setAssigR :: RegMap Loc -> RegM freeRegs () Source #

getBlockAssigR :: RegM freeRegs (BlockAssignment freeRegs) Source #

setBlockAssigR :: BlockAssignment freeRegs -> RegM freeRegs () Source #

setDeltaR :: Int -> RegM freeRegs () Source #

getDeltaR :: RegM freeRegs Int Source #

getConfig :: RegM a NCGConfig Source #

Get native code generator configuration

getPlatform :: RegM a Platform Source #

Get target platform from native code generator configuration

recordSpill :: SpillReason -> RegM freeRegs () Source #

Record that a spill instruction was inserted, for profiling.

recordFixupBlock :: BlockId -> BlockId -> BlockId -> RegM freeRegs () Source #

Record a created fixup block