summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiles Anderson <agander@gmail.com>2019-04-09 21:51:21 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-04-15 06:20:29 -0400
commitb024e2891d06a81b3fd824f33fc72fb805e03c8f (patch)
tree912ae486aa530d33b2550e232cca4f6f08be3ea8
parent1825f50d1736401724ef644e4d481cc26e8f47e5 (diff)
downloadhaskell-b024e2891d06a81b3fd824f33fc72fb805e03c8f.tar.gz
Document how -O3 is handled by GHC
-O2 is the highest value of optimization. -O3 will be reverted to -O2.
-rw-r--r--docs/users_guide/using-optimisation.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 95adb22a11..990c3960af 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -88,6 +88,17 @@ So, for example, ``ghc -c Foo.hs``
runtime or space *worse* if you're unlucky. They are normally turned
on or off individually.
+.. ghc-flag:: -On
+ :shortdesc: Any -On where n > 2 is the same as -O2.
+ :type: dynamic
+ :reverse: -O0
+ :category: optimization-levels
+
+ .. index::
+ single: optimise; aggressively
+
+ Any -On where n > 2 is the same as -O2.
+
We don't use a ``-O*`` flag for day-to-day work. We use ``-O`` to get
respectable speed; e.g., when we want to measure something. When we want
to go for broke, we tend to use ``-O2`` (and we go for lots of coffee