diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2016-12-15 10:57:43 -0800 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2016-12-29 19:25:50 +0100 |
commit | aac08a0f37442a79096d7d2392f34b42ee5da2bb (patch) | |
tree | 4001ca3f68b6bb5eef8089d52633817913c47a16 /docs/users_guide | |
parent | a3704409acc3bd237d3e872f640686918fb51f5f (diff) | |
download | haskell-wip/T9291.tar.gz |
Add a CSE pass to Stg (#9291)wip/T9291
This CSE pass only targets data constructor applications. This is
probably the best we can do, as function calls and primitive operations
might have side-effects.
Introduces the flag -fstg-cse, enabled by default with -O.
Differential Revision: https://phabricator.haskell.org/D2871
Diffstat (limited to 'docs/users_guide')
-rw-r--r-- | docs/users_guide/using-optimisation.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst index 3e660c19e9..1cad51bb1b 100644 --- a/docs/users_guide/using-optimisation.rst +++ b/docs/users_guide/using-optimisation.rst @@ -186,6 +186,14 @@ list. optimisation. Switching this off can be useful if you have some ``unsafePerformIO`` expressions that you don't want commoned-up. +.. ghc-flag:: -fstg-cse + + :default: on + + Enables the common-sub-expression elimination optimisation on the STG + intermediate language, where it is able to common up some subexpressions + that differ in their types, but not their represetation. + .. ghc-flag:: -fdicts-cheap A very experimental flag that makes dictionary-valued expressions |