ghc-9.4.0.20220623: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.CmmToAsm.Reg.Graph.Stats

Description

Carries interesting info for debugging / profiling of the graph coloring register allocator.

Synopsis

Documentation

data RegAllocStats statics instr Source #

Holds interesting statistics from the register allocator.

Constructors

RegAllocStatsStart 

Fields

RegAllocStatsSpill 

Fields

RegAllocStatsColored 

Fields

Instances

Instances details
Functor (RegAllocStats statics) Source # 
Instance details

Defined in GHC.CmmToAsm.Reg.Graph.Stats

Methods

fmap :: (a -> b) -> RegAllocStats statics a -> RegAllocStats statics b Source #

(<$) :: a -> RegAllocStats statics b -> RegAllocStats statics a Source #

(OutputableP Platform statics, OutputableP Platform instr) => Outputable (RegAllocStats statics instr) Source # 
Instance details

Defined in GHC.CmmToAsm.Reg.Graph.Stats

Methods

ppr :: RegAllocStats statics instr -> SDoc Source #

pprStats :: [RegAllocStats statics instr] -> Graph VirtualReg RegClass RealReg -> SDoc Source #

Do all the different analysis on this list of RegAllocStats

pprStatsSpills :: [RegAllocStats statics instr] -> SDoc Source #

Dump a table of how many spill loads / stores were inserted for each vreg.

pprStatsLifetimes :: [RegAllocStats statics instr] -> SDoc Source #

Dump a table of how long vregs tend to live for in the initial code.

pprStatsConflict :: [RegAllocStats statics instr] -> SDoc Source #

Dump a table of how many conflicts vregs tend to have in the initial code.

pprStatsLifeConflict Source #

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) Source #

Count spillreloadreg-reg moves. Lets us see how well the register allocator has done.

addSRM :: (Int, Int, Int) -> (Int, Int, Int) -> (Int, Int, Int) Source #