summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2017-01-23 21:58:45 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-23 22:05:53 -0500
commita8c81f3c102988e0f4216b7cb5fec7958e60b4e4 (patch)
tree497d67bf2752ae0c59cfe774dd032e07cd1ba620
parentabaa6815e6435ed29ad121b5e59fc017a1d3e836 (diff)
downloadhaskell-a8c81f3c102988e0f4216b7cb5fec7958e60b4e4.tar.gz
Document -fspecialise-aggressively
Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3007 GHC Trac Issues: #12979
-rw-r--r--docs/users_guide/using-optimisation.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index 1cad51bb1b..48c1e6f3bb 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -578,6 +578,18 @@ list.
that have an INLINABLE pragma (:ref:`inlinable-pragma`) will be
specialised as well.
+.. ghc-flag:: -fspecialise-aggressively
+
+ :default: off
+
+ By default only type class methods and methods marked ``INLINABLE`` or
+ ``INLINE`` are specialised. This flag will specialise any overloaded function
+ regardless of size if its unfolding is available. This flag is not
+ included in any optimisation level as it can massively increase code
+ size. It can be used in conjunction with :ghc-flag:`-fexpose-all-unfoldings`
+ if you want to ensure all calls are specialised.
+
+
.. ghc-flag:: -fcross-module-specialise
:default: on