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
- ra_fixups :: [(BlockId, BlockId, BlockId)]
- 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 ()
- recordFixupBlock :: BlockId -> BlockId -> BlockId -> RegM freeRegs ()
Documentation
data RA_State freeRegs Source #
The register allocator state
RA_State | |
|
The register allocator monad type.
Instances
Monad (RegM freeRegs) Source # | |
Functor (RegM freeRegs) Source # | |
Applicative (RegM freeRegs) Source # | |
Defined in RegAlloc.Linear.State pure :: a -> RegM freeRegs a # (<*>) :: RegM freeRegs (a -> b) -> RegM freeRegs a -> RegM freeRegs b # liftA2 :: (a -> b -> c) -> RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs c # (*>) :: RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs b # (<*) :: RegM freeRegs a -> RegM freeRegs b -> RegM freeRegs a # | |
HasDynFlags (RegM a) Source # | |
Defined in RegAlloc.Linear.State getDynFlags :: RegM a DynFlags # |
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.