| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
GHC.CmmToAsm.Reg.Graph.Stats
Description
Carries interesting info for debugging / profiling of the graph coloring register allocator.
Synopsis
- data RegAllocStats statics instr- = RegAllocStatsStart { - raLiveCmm :: [LiveCmmDecl statics instr]
- raGraph :: Graph VirtualReg RegClass RealReg
- raSpillCosts :: SpillCostInfo
- raPlatform :: !Platform
 
- | RegAllocStatsSpill { - raCode :: [LiveCmmDecl statics instr]
- raGraph :: Graph VirtualReg RegClass RealReg
- raCoalesced :: UniqFM VirtualReg VirtualReg
- raSpillStats :: SpillStats
- raSpillCosts :: SpillCostInfo
- raSpilled :: [LiveCmmDecl statics instr]
- raPlatform :: !Platform
 
- | RegAllocStatsColored { - raCode :: [LiveCmmDecl statics instr]
- raGraph :: Graph VirtualReg RegClass RealReg
- raGraphColored :: Graph VirtualReg RegClass RealReg
- raCoalesced :: UniqFM VirtualReg VirtualReg
- raCodeCoalesced :: [LiveCmmDecl statics instr]
- raPatched :: [LiveCmmDecl statics instr]
- raSpillClean :: [LiveCmmDecl statics instr]
- raFinal :: [NatCmmDecl statics instr]
- raSRMs :: (Int, Int, Int)
- raPlatform :: !Platform
 
 
- = RegAllocStatsStart { 
- pprStats :: [RegAllocStats statics instr] -> Graph VirtualReg RegClass RealReg -> SDoc
- pprStatsSpills :: [RegAllocStats statics instr] -> SDoc
- pprStatsLifetimes :: [RegAllocStats statics instr] -> SDoc
- pprStatsConflict :: [RegAllocStats statics instr] -> SDoc
- pprStatsLifeConflict :: [RegAllocStats statics instr] -> Graph VirtualReg RegClass RealReg -> SDoc
- countSRMs :: Instruction instr => LiveCmmDecl statics instr -> (Int, Int, Int)
- addSRM :: (Int, Int, Int) -> (Int, Int, Int) -> (Int, Int, Int)
Documentation
data RegAllocStats statics instr #
Holds interesting statistics from the register allocator.
Constructors
| RegAllocStatsStart | |
| Fields 
 | |
| RegAllocStatsSpill | |
| Fields 
 | |
| RegAllocStatsColored | |
| Fields 
 | |
Instances
| (Outputable statics, Outputable instr) => Outputable (RegAllocStats statics instr) # | |
| Defined in GHC.CmmToAsm.Reg.Graph.Stats Methods ppr :: RegAllocStats statics instr -> SDoc # pprPrec :: Rational -> RegAllocStats statics instr -> SDoc # | |
pprStats :: [RegAllocStats statics instr] -> Graph VirtualReg RegClass RealReg -> SDoc #
Do all the different analysis on this list of RegAllocStats
pprStatsSpills :: [RegAllocStats statics instr] -> SDoc #
Dump a table of how many spill loads / stores were inserted for each vreg.
pprStatsLifetimes :: [RegAllocStats statics instr] -> SDoc #
Dump a table of how long vregs tend to live for in the initial code.
pprStatsConflict :: [RegAllocStats statics instr] -> SDoc #
Dump a table of how many conflicts vregs tend to have in the initial code.
Arguments
| :: [RegAllocStats statics instr] | |
| -> Graph VirtualReg RegClass RealReg | global register conflict graph | 
| -> SDoc | 
For every vreg, dump how many conflicts it has, and its lifetime. Good for making a scatter plot.
countSRMs :: Instruction instr => LiveCmmDecl statics instr -> (Int, Int, Int) #
Count spillreloadreg-reg moves. Lets us see how well the register allocator has done.