diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2017-09-01 15:02:34 +0100 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2017-10-29 00:00:57 -0400 |
commit | 7ba1b5b3af6b0264dbee36e85357d8cab079d1a2 (patch) | |
tree | 102cbd85b3ef8fa8b974fdaa0b27de0e9589027c /compiler/simplCore/CoreMonad.hs | |
parent | 0e953da147c405648356f75ee67eda044fffad49 (diff) | |
download | haskell-wip/T14152.tar.gz |
Inline exit join points in the "final" simplifier iterationwip/T14152
because the extra jump is a bit pointless there.
It still increases the number of instructions of `compress2` by 3.82%,
`fem` by 2.2% and so that needs to be investiaged.
Diffstat (limited to 'compiler/simplCore/CoreMonad.hs')
-rw-r--r-- | compiler/simplCore/CoreMonad.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/simplCore/CoreMonad.hs b/compiler/simplCore/CoreMonad.hs index 107440a768..33d1820579 100644 --- a/compiler/simplCore/CoreMonad.hs +++ b/compiler/simplCore/CoreMonad.hs @@ -174,19 +174,22 @@ data SimplMode -- See comments in SimplMonad , sm_inline :: Bool -- Whether inlining is enabled , sm_case_case :: Bool -- Whether case-of-case is enabled , sm_eta_expand :: Bool -- Whether eta-expansion is enabled + , sm_preserve_exit_joins :: Bool -- Whether exit join points must be preserved } instance Outputable SimplMode where ppr (SimplMode { sm_phase = p, sm_names = ss , sm_rules = r, sm_inline = i - , sm_eta_expand = eta, sm_case_case = cc }) + , sm_eta_expand = eta, sm_case_case = cc + , sm_preserve_exit_joins = pej }) = text "SimplMode" <+> braces ( sep [ text "Phase =" <+> ppr p <+> brackets (text (concat $ intersperse "," ss)) <> comma , pp_flag i (sLit "inline") <> comma , pp_flag r (sLit "rules") <> comma , pp_flag eta (sLit "eta-expand") <> comma - , pp_flag cc (sLit "case-of-case") ]) + , pp_flag cc (sLit "case-of-case") <> comma + , pp_flag pej (sLit "preserve-exit-joins") ]) where pp_flag f s = ppUnless f (text "no") <+> ptext s |