Safe Haskell | None |
---|---|
Language | Haskell98 |
State monad for the linear register allocator.
- 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
The register allocator state
RA_State | |
|
The register allocator monad type.
Monad (RegM freeRegs) | |
Functor (RegM freeRegs) | |
Applicative (RegM freeRegs) | |
HasDynFlags (RegM a) |
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.