Safe Haskell | None |
---|---|
Language | Haskell2010 |
State monad for the linear register allocator.
Synopsis
- data RA_State freeRegs = RA_State {
- ra_blockassig :: BlockAssignment freeRegs
- ra_freeregs :: !freeRegs
- ra_assig :: RegMap Loc
- ra_delta :: Int
- ra_stack :: StackMap
- ra_us :: UniqSupply
- ra_spills :: [SpillReason]
- ra_DynFlags :: DynFlags
- data RegM freeRegs a
- runR :: DynFlags -> BlockAssignment freeRegs -> freeRegs -> RegMap Loc -> StackMap -> UniqSupply -> RegM freeRegs a -> (BlockAssignment freeRegs, StackMap, RegAllocStats, a)
- spillR :: Instruction instr => Reg -> Unique -> RegM freeRegs (instr, Int)
- loadR :: Instruction instr => Reg -> Int -> RegM freeRegs instr
- getFreeRegsR :: RegM freeRegs freeRegs
- setFreeRegsR :: freeRegs -> RegM freeRegs ()
- getAssigR :: RegM freeRegs (RegMap Loc)
- setAssigR :: RegMap Loc -> RegM freeRegs ()
- getBlockAssigR :: RegM freeRegs (BlockAssignment freeRegs)
- setBlockAssigR :: BlockAssignment freeRegs -> RegM freeRegs ()
- setDeltaR :: Int -> RegM freeRegs ()
- getDeltaR :: RegM freeRegs Int
- getUniqueR :: RegM freeRegs Unique
- recordSpill :: SpillReason -> RegM freeRegs ()
Documentation
data RA_State freeRegs Source #
The register allocator state
RA_State | |
|
The register allocator monad type.
Instances
Monad (RegM freeRegs) # | |
Functor (RegM freeRegs) # | |
Applicative (RegM freeRegs) # | |
Defined in RegAlloc.Linear.State 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 # | |
HasDynFlags (RegM a) # | |
Defined in RegAlloc.Linear.State getDynFlags :: RegM a DynFlags Source # |
runR :: DynFlags -> 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.
getFreeRegsR :: RegM freeRegs freeRegs Source #
setFreeRegsR :: freeRegs -> RegM freeRegs () Source #
getBlockAssigR :: RegM freeRegs (BlockAssignment freeRegs) Source #
setBlockAssigR :: BlockAssignment freeRegs -> RegM freeRegs () Source #
getUniqueR :: RegM freeRegs Unique Source #
recordSpill :: SpillReason -> RegM freeRegs () Source #
Record that a spill instruction was inserted, for profiling.