[commit: ghc] wip/use-O2: Change `OPTIONS_GHC -O` to `OPTIONS_GHC -O2` (fc6f584)
git at git.haskell.org
git at git.haskell.org
Mon Nov 6 21:51:19 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/use-O2
Link : http://ghc.haskell.org/trac/ghc/changeset/fc6f58477fe0ecdc5ede3d6b7e6590caacb926ef/ghc
>---------------------------------------------------------------
commit fc6f58477fe0ecdc5ede3d6b7e6590caacb926ef
Author: Douglas Wilson <douglas.wilson at gmail.com>
Date: Mon Nov 6 16:50:39 2017 -0500
Change `OPTIONS_GHC -O` to `OPTIONS_GHC -O2`
These pragmas were having the perverse effect of having these
performance
critical modules be LESS optimized in builds with -O2.
Test Plan: Check on gipedia whether this is worthwhile.
Reviewers: austin, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4156
>---------------------------------------------------------------
fc6f58477fe0ecdc5ede3d6b7e6590caacb926ef
compiler/iface/BinIface.hs | 2 +-
compiler/utils/Binary.hs | 2 +-
compiler/utils/Encoding.hs | 2 +-
compiler/utils/FastMutInt.hs | 2 +-
compiler/utils/FastString.hs | 2 +-
compiler/utils/StringBuffer.hs | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/compiler/iface/BinIface.hs b/compiler/iface/BinIface.hs
index 8ab2310..31b5af0 100644
--- a/compiler/iface/BinIface.hs
+++ b/compiler/iface/BinIface.hs
@@ -4,7 +4,7 @@
-- (c) The University of Glasgow 2002-2006
--
-{-# OPTIONS_GHC -O #-}
+{-# OPTIONS_GHC -O2 #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
diff --git a/compiler/utils/Binary.hs b/compiler/utils/Binary.hs
index a7bbfd5..c3c8ae3 100644
--- a/compiler/utils/Binary.hs
+++ b/compiler/utils/Binary.hs
@@ -5,7 +5,7 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiWayIf #-}
-{-# OPTIONS_GHC -O -funbox-strict-fields #-}
+{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
diff --git a/compiler/utils/Encoding.hs b/compiler/utils/Encoding.hs
index f809ba9..b4af686 100644
--- a/compiler/utils/Encoding.hs
+++ b/compiler/utils/Encoding.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-}
-{-# OPTIONS_GHC -O #-}
+{-# OPTIONS_GHC -O2 #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
diff --git a/compiler/utils/FastMutInt.hs b/compiler/utils/FastMutInt.hs
index 6ba139a..20206f8 100644
--- a/compiler/utils/FastMutInt.hs
+++ b/compiler/utils/FastMutInt.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples #-}
-{-# OPTIONS_GHC -O #-}
+{-# OPTIONS_GHC -O2 #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
--
diff --git a/compiler/utils/FastString.hs b/compiler/utils/FastString.hs
index fde4ff0..f16b327 100644
--- a/compiler/utils/FastString.hs
+++ b/compiler/utils/FastString.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE BangPatterns, CPP, MagicHash, UnboxedTuples,
GeneralizedNewtypeDeriving #-}
-{-# OPTIONS_GHC -O -funbox-strict-fields #-}
+{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
diff --git a/compiler/utils/StringBuffer.hs b/compiler/utils/StringBuffer.hs
index 0840210..39941e2 100644
--- a/compiler/utils/StringBuffer.hs
+++ b/compiler/utils/StringBuffer.hs
@@ -7,7 +7,7 @@ Buffers for scanning string input stored in external arrays.
-}
{-# LANGUAGE BangPatterns, CPP, MagicHash, UnboxedTuples #-}
-{-# OPTIONS_GHC -O #-}
+{-# OPTIONS_GHC -O2 #-}
-- We always optimise this, otherwise performance of a non-optimised
-- compiler is severely affected
More information about the ghc-commits
mailing list