[commit: ghc] master: Change `OPTIONS_GHC -O` to `OPTIONS_GHC -O2` (75291ab)
git at git.haskell.org
git at git.haskell.org
Thu Nov 9 23:35:19 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/75291abaf6db7befbde5b4dadaea0b8047a75e06/ghc
>---------------------------------------------------------------
commit 75291abaf6db7befbde5b4dadaea0b8047a75e06
Author: Douglas Wilson <douglas.wilson at gmail.com>
Date: Thu Nov 9 17:54:45 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
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4156
>---------------------------------------------------------------
75291abaf6db7befbde5b4dadaea0b8047a75e06
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