| ghc-6.10.4: The GHC API | Contents | Index

RegAllocStats

Synopsis

data RegAllocStats

= RegAllocStatsStart {

raLiveCmm :: [LiveCmmTop]
raGraph :: Graph Reg RegClass Reg
raSpillCosts :: SpillCostInfo

}

| RegAllocStatsSpill {

raGraph :: Graph Reg RegClass Reg
raCoalesced :: UniqFM Reg
raSpillStats :: SpillStats
raSpillCosts :: SpillCostInfo
raSpilled :: [LiveCmmTop]

}

| RegAllocStatsColored {

raGraph :: Graph Reg RegClass Reg
raGraphColored :: Graph Reg RegClass Reg
raCoalesced :: UniqFM Reg
raPatched :: [LiveCmmTop]
raSpillClean :: [LiveCmmTop]
raFinal :: [NatCmmTop]
raSRMs :: (Int, Int, Int)

}

regDotColor :: Reg -> SDoc
pprStats :: [RegAllocStats] -> Graph Reg RegClass Reg -> SDoc
pprStatsSpills :: [RegAllocStats] -> SDoc
pprStatsLifetimes :: [RegAllocStats] -> SDoc
pprStatsConflict :: [RegAllocStats] -> SDoc
pprStatsLifeConflict :: [RegAllocStats] -> Graph Reg RegClass Reg -> SDoc
countSRMs :: LiveCmmTop -> (Int, Int, Int)
addSRM

Documentation
data RegAllocStats

Constructors

RegAllocStatsStart | information to help choose which regs to spill

raLiveCmm :: [LiveCmmTop] | initial code, with liveness
raGraph :: Graph Reg RegClass Reg | the initial, uncolored graph
raSpillCosts :: SpillCostInfo |

RegAllocStatsSpill | code with spill instructions added

raGraph :: Graph Reg RegClass Reg | the partially colored graph
raCoalesced :: UniqFM Reg | the regs that were coaleced
raSpillStats :: SpillStats | spiller stats
raSpillCosts :: SpillCostInfo | number of instrs each reg lives for
raSpilled :: [LiveCmmTop] |

RegAllocStatsColored | spill/reload/reg-reg moves present in this code

raGraph :: Graph Reg RegClass Reg | the uncolored graph
raGraphColored :: Graph Reg RegClass Reg | the coalesced and colored graph
raCoalesced :: UniqFM Reg | the regs that were coaleced
raPatched :: [LiveCmmTop] | code with vregs replaced by hregs
raSpillClean :: [LiveCmmTop] | code with unneeded spill/reloads cleaned out
raFinal :: [NatCmmTop] | final code
raSRMs :: (Int, Int, Int) |

Instances

Outputable RegAllocStats

regDotColor :: Reg -> SDoc
pprStats :: [RegAllocStats] -> Graph Reg RegClass Reg -> SDoc
Do all the different analysis on this list of RegAllocStats
pprStatsSpills :: [RegAllocStats] -> SDoc
Dump a table of how many spill loads / stores were inserted for each vreg.
pprStatsLifetimes :: [RegAllocStats] -> SDoc
Dump a table of how long vregs tend to live for in the initial code.
pprStatsConflict :: [RegAllocStats] -> SDoc
Dump a table of how many conflicts vregs tend to have in the initial code.
pprStatsLifeConflict

:: [RegAllocStats] |
-> Graph Reg RegClass Reg | global register conflict graph
-> SDoc |
For every vreg, dump it's how many conflicts it has and its lifetime good for making a scatter plot.

countSRMs :: LiveCmmTop -> (Int, Int, Int)
Count spillreloadreg-reg moves. Lets us see how well the register allocator has done.
addSRM
Produced by Haddock version 2.4.2