summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-optimisation.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/users_guide/using-optimisation.rst')
-rw-r--r--docs/users_guide/using-optimisation.rst18
1 files changed, 17 insertions, 1 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 3566462eeb..e0251d3454 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -45,7 +45,7 @@ optimisation to be performed, which can have an impact on how much of
your program needs to be recompiled when you change something. This is
one reason to stick to no-optimisation when developing code.
-**No ``-O*``-type option specified:** This is taken to mean “Please
+**No ``-O*``-type option specified:** This is taken to mean “Please
compile quickly; I'm not over-bothered about compiled-code quality.”
So, for example, ``ghc -c Foo.hs``
@@ -666,6 +666,22 @@ by saying ``-fno-wombat``.
a case expression, which is good for performance, but bad if you are
using ``seq`` on partial applications.
+.. ghc-flag:: -funlikely-bottoms
+ :shortdesc: Marks bottom expressions as unlikely in the backend.
+ Implied by :ghc-flag:`-O`.
+ :type: dynamic
+ :reverse: -fno-unlikely-bottoms
+ :category:
+
+ :default: off
+
+ This information is used by some backends to generate faster code by
+ taking the hot path into account.
+
+ It recognizes functions like `error`, `undefined` and some functions
+ which are guaranteed to raise an exception. This includes the generated
+ failure branch on incomplete pattern matches.
+
.. ghc-flag:: -fregs-graph
:shortdesc: Use the graph colouring register allocator for register
allocation in the native code generator. Implied by :ghc-flag:`-O2`.