
Zubin pushed to branch wip/9.12.3-backports at Glasgow Haskell Compiler / GHC Commits: 357867fc by Luite Stegeman at 2025-09-12T17:02:08+05:30 Add flags for switching off speculative evaluation. We found that speculative evaluation can increase the amount of allocations in some circumstances. This patch adds new flags for selectively disabling speculative evaluation, allowing us to test the effect of the optimization. The new flags are: -fspec-eval globally enable speculative evaluation -fspec-eval-dictfun enable speculative evaluation for dictionary functions (no effect if speculative evaluation is globally disabled) The new flags are on by default for all optimisation levels. See #25284 (cherry picked from commit 2309975247543a4f77009ea5c3c7a8ebe06dc60b) - - - - - 1 changed file: - compiler/GHC/CoreToStg/Prep.hs Changes: ===================================== compiler/GHC/CoreToStg/Prep.hs ===================================== @@ -2218,6 +2218,7 @@ mkNonRecFloat env is_unlifted bndr rhs is_hnf = exprIsHNF rhs dmd = idDemandInfo bndr is_strict = isStrUsedDmd dmd + ok_for_spec = exprOkForSpecEval call_ok_for_spec rhs -- See Note [Controlling Speculative Evaluation] call_ok_for_spec x View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/357867fce5057667a522fed003a6b7f4... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/357867fce5057667a522fed003a6b7f4... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Zubin (@wz1000)