ghc-6.12.2: The GHC APISource codeContentsIndex
RegAlloc.Graph.Stats
Synopsis
data RegAllocStats instr
= RegAllocStatsStart {
raLiveCmm :: [LiveCmmTop instr]
raGraph :: Graph VirtualReg RegClass RealReg
raSpillCosts :: SpillCostInfo
}
| RegAllocStatsSpill {
raGraph :: Graph VirtualReg RegClass RealReg
raCoalesced :: UniqFM VirtualReg
raSpillStats :: SpillStats
raSpillCosts :: SpillCostInfo
raSpilled :: [LiveCmmTop instr]
}
| RegAllocStatsColored {
raGraph :: Graph VirtualReg RegClass RealReg
raGraphColored :: Graph VirtualReg RegClass RealReg
raCoalesced :: UniqFM VirtualReg
raPatched :: [LiveCmmTop instr]
raSpillClean :: [LiveCmmTop instr]
raFinal :: [NatCmmTop instr]
raSRMs :: (Int, Int, Int)
}
pprStats :: [RegAllocStats instr] -> Graph VirtualReg RegClass RealReg -> SDoc
pprStatsSpills :: [RegAllocStats instr] -> SDoc
pprStatsLifetimes :: [RegAllocStats instr] -> SDoc
pprStatsConflict :: [RegAllocStats instr] -> SDoc
pprStatsLifeConflict :: [RegAllocStats instr] -> Graph VirtualReg RegClass RealReg -> SDoc
countSRMs :: Instruction instr => LiveCmmTop instr -> (Int, Int, Int)
addSRM :: (Num t, Num t1, Num t2) => (t, t1, t2) -> (t, t1, t2) -> (t, t1, t2)
Documentation
data RegAllocStats instr Source
Constructors
RegAllocStatsStartinformation to help choose which regs to spill
raLiveCmm :: [LiveCmmTop instr]initial code, with liveness
raGraph :: Graph VirtualReg RegClass RealRegthe initial, uncolored graph
raSpillCosts :: SpillCostInfo
RegAllocStatsSpillcode with spill instructions added
raGraph :: Graph VirtualReg RegClass RealRegthe initial, uncolored graph
raCoalesced :: UniqFM VirtualRegthe regs that were coaleced
raSpillStats :: SpillStatsspiller stats
raSpillCosts :: SpillCostInfo
raSpilled :: [LiveCmmTop instr]
RegAllocStatsColoredspill/reload/reg-reg moves present in this code
raGraph :: Graph VirtualReg RegClass RealRegthe initial, uncolored graph
raGraphColored :: Graph VirtualReg RegClass RealRegthe coalesced and colored graph
raCoalesced :: UniqFM VirtualRegthe regs that were coaleced
raPatched :: [LiveCmmTop instr]code with vregs replaced by hregs
raSpillClean :: [LiveCmmTop instr]code with unneeded spill/reloads cleaned out
raFinal :: [NatCmmTop instr]final code
raSRMs :: (Int, Int, Int)
show/hide Instances
pprStats :: [RegAllocStats instr] -> Graph VirtualReg RegClass RealReg -> SDocSource
Do all the different analysis on this list of RegAllocStats
pprStatsSpills :: [RegAllocStats instr] -> SDocSource
Dump a table of how many spill loads / stores were inserted for each vreg.
pprStatsLifetimes :: [RegAllocStats instr] -> SDocSource
Dump a table of how long vregs tend to live for in the initial code.
pprStatsConflict :: [RegAllocStats instr] -> SDocSource
Dump a table of how many conflicts vregs tend to have in the initial code.
pprStatsLifeConflictSource
:: [RegAllocStats instr]
-> Graph VirtualReg RegClass RealRegglobal 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 :: Instruction instr => LiveCmmTop instr -> (Int, Int, Int)Source
Count spillreloadreg-reg moves. Lets us see how well the register allocator has done.
addSRM :: (Num t, Num t1, Num t2) => (t, t1, t2) -> (t, t1, t2) -> (t, t1, t2)Source
Produced by Haddock version 2.6.1