Safe Haskell | None |
---|
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]
- data RegM freeRegs a
- runR :: BlockAssignment freeRegs -> freeRegs -> RegMap Loc -> StackMap -> UniqSupply -> RegM freeRegs a -> (BlockAssignment freeRegs, StackMap, RegAllocStats, a)
- spillR :: Instruction instr => Platform -> Reg -> Unique -> RegM freeRegs (instr, Int)
- loadR :: Instruction instr => Platform -> 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 alloctor state
RA_State | |
|
runR :: 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 freeRegsSource
setFreeRegsR :: freeRegs -> RegM freeRegs ()Source
getBlockAssigR :: RegM freeRegs (BlockAssignment freeRegs)Source
setBlockAssigR :: BlockAssignment freeRegs -> RegM freeRegs ()Source
getUniqueR :: RegM freeRegs UniqueSource
recordSpill :: SpillReason -> RegM freeRegs ()Source
Record that a spill instruction was inserted, for profiling.