Skip to content

Make GHC.Cmm.Switch magic constants tunable

Currently we have some magic constants at https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Cmm/Switch.hs#L53. I propose making them tunable via GHC options, or at the very least, platform-dependent.

The current jump table size looks too small for wasm. Most engines have a much higher max br_table size limit, so bumping this for wasm would allow more compact code to be generated for big Cmm switches.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information