[commit: ghc] wip/T10137: CmmSwitch: Choose maxJumpTableHole more systematically (e2733bc)
git at git.haskell.org
git at git.haskell.org
Thu Mar 19 09:47:30 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T10137
Link : http://ghc.haskell.org/trac/ghc/changeset/e2733bcd54afd9edc2329f57f4ead6734b4f71da/ghc
>---------------------------------------------------------------
commit e2733bcd54afd9edc2329f57f4ead6734b4f71da
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Mar 19 10:47:25 2015 +0100
CmmSwitch: Choose maxJumpTableHole more systematically
>---------------------------------------------------------------
e2733bcd54afd9edc2329f57f4ead6734b4f71da
compiler/cmm/CmmSwitch.hs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/compiler/cmm/CmmSwitch.hs b/compiler/cmm/CmmSwitch.hs
index edb2087..e58b049 100644
--- a/compiler/cmm/CmmSwitch.hs
+++ b/compiler/cmm/CmmSwitch.hs
@@ -56,9 +56,11 @@ import qualified Data.Map as M
-- | Number of consecutive default values allowed in a jump table. If there are
-- more of them, the jump tables are split.
--- Currently 10, for no particular good reason.
+--
+-- Currently 7, as it costs 7 words of additional code when a jump table is
+-- split (at least on x64, determined experimentally).
maxJumpTableHole :: Integer
-maxJumpTableHole = 10
+maxJumpTableHole = 7
-- | Minimum size of a jump table. If the number is smaller, the switch is
-- implemented using conditionals.
More information about the ghc-commits
mailing list