diff options
author | Gergo ERDI <gergo@erdi.hu> | 2021-11-15 16:59:27 +0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-09 22:14:24 -0500 |
commit | 6d0319220ebc63a29b941483a6c40ed4f972dc24 (patch) | |
tree | 6903084e761ff12c92f57604f45fbeadab1bb0d8 /docs | |
parent | 2fca50d42b14a8f51e9805cdd2ef8fbc4a67259d (diff) | |
download | haskell-6d0319220ebc63a29b941483a6c40ed4f972dc24.tar.gz |
Add `Opt_CoreConstantFolding` to turn on constant folding (#20500)
Previously, `-O1` and `-O2`, by way of their effect on the compilation
pipeline, they implicitly turned on constant folding
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/using-optimisation.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst index 5fa9a81a5e..36fc057890 100644 --- a/docs/users_guide/using-optimisation.rst +++ b/docs/users_guide/using-optimisation.rst @@ -121,6 +121,17 @@ on by default are enabled by ``-O``, and as such you shouldn't need to set any of them explicitly. A flag ``-fwombat`` can be negated by saying ``-fno-wombat``. +.. ghc-flag:: -fcore-constant-folding + :shortdesc: Enable constant folding in Core. Implied by :ghc-flag:`-O`. + :type: dynamic + :reverse: -fno-core-constant-folding + :category: + + :default: on + + Enables Core-level constant folding, i.e. propagation of values + that can be computed at compile time. + .. ghc-flag:: -fcase-merge :shortdesc: Enable case-merging. Implied by :ghc-flag:`-O`. :type: dynamic |