ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.CmmToAsm.CFG.Weight

Synopsis

- data Weights = Weights {
  - uncondWeight :: Int
  - condBranchWeight :: Int
  - switchWeight :: Int
  - callWeight :: Int
  - likelyCondWeight :: Int
  - unlikelyCondWeight :: Int
  - infoTablePenalty :: Int
  - backEdgeBonus :: Int
  }
- defaultWeights :: Weights
- parseWeights :: String -> Weights -> Weights

# Documentation

data Weights Source #

Edge weights to use when generating a CFG from CMM

Constructors

Weights |

Fields

- uncondWeight :: Int
- condBranchWeight :: Int
- switchWeight :: Int
- callWeight :: Int
- likelyCondWeight :: Int
- unlikelyCondWeight :: Int
- infoTablePenalty :: Int
- backEdgeBonus :: Int

defaultWeights :: Weights Source #

Default edge weights

parseWeights :: String -> Weights -> Weights Source #