summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-optimisation.rst
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2021-11-13 15:18:27 +0100
committerAndreas Klebinger <klebinger.andreas@gmx.at>2022-05-12 21:57:03 +0200
commitd99152db02424b50854ab5d379d6e84d3f4260af (patch)
treeb01f922780ac867b03df8365837b9ce1426b2671 /docs/users_guide/using-optimisation.rst
parenta4fbb589fd176e6c2f6648dea6c93e25668f1db8 (diff)
downloadhaskell-wip/andreask/cmm_aliasing.tar.gz
Cmm: Sink - Track hp aliasing.wip/andreask/cmm_aliasing
See Note [Heap Kinds]. We now split heap into "new" and "old" heap for the purpose of determining memory conflicts during CmmSink. With an assumption that writes to memory via [Hp] don't conflict with reads from regular heap memory. We can turn this on/off with the new flag -fcmm-sink-alias which is now enabled at -O2 by default. This fixes the issues laid out in #20679. ------------------------- Metric Increase: T9233 -------------------------
Diffstat (limited to 'docs/users_guide/using-optimisation.rst')
-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 ab49f08ade..2db1455186 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -225,6 +225,17 @@ by saying ``-fno-wombat``.
to their usage sites. It also inlines simple expressions like
literals or registers.
+.. ghc-flag:: -fcmm-sink-alias
+ :shortdesc: Enable more complex aliasing analysis to improve the sinking pass. Implied by :ghc-flag:`-O2`.
+ :type: dynamic
+ :reverse: -fno-cmm-sink
+ :category:
+
+ :default: off but enabled with :ghc-flag:`-O2`.
+
+ This allows us to remove more intermediate variables in the Cmm pass.
+ For some programs this can avoid excessive spilling.
+
.. ghc-flag:: -fcmm-static-pred
:shortdesc: Enable static control flow prediction. Implied by :ghc-flag:`-O`.
:type: dynamic