ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

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 #