Safe Haskell | None |
---|---|
Language | Haskell98 |
Put common type definitions here to break recursive module dependencies.
- type BlockAssignment freeRegs = BlockMap (freeRegs, RegMap Loc)
- data Loc
- regsOfLoc :: Loc -> [RealReg]
- data SpillReason
- data RegAllocStats = RegAllocStats {
- ra_spillInstrs :: UniqFM [Int]
- 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
Documentation
type BlockAssignment freeRegs = BlockMap (freeRegs, RegMap Loc)Source
Used to store the register assignment on entry to a basic block. We use this to handle join points, where multiple branch instructions target a particular label. We have to insert fixup code to make the register assignments from the different sources match up.
Where a vreg is currently stored A temporary can be marked as living in both a register and memory (InBoth), for example if it was recently loaded from a spill location. This makes it cheap to spill (no save instruction required), but we have to be careful to turn this into InReg if the value in the register is changed.
data SpillReasonSource
Reasons why instructions might be inserted by the spiller. Used when generating stats for -ddrop-asm-stats.
SpillAlloc !Unique | vreg was spilled to a slot so we could use its current hreg for another vreg |
SpillClobber !Unique | vreg was moved because its hreg was clobbered |
SpillLoad !Unique | vreg was loaded from a spill slot |
SpillJoinRR !Unique | reg-reg move inserted during join to targets |
SpillJoinRM !Unique | reg-mem move inserted during join to targets |
data RegAllocStatsSource
Used to carry interesting stats out of the register allocator.
The register allocator state
RA_State | |
|