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/Simplify.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/Simplify.hs')
-rw-r--r-- | compiler/simplCore/Simplify.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs index 1e1b6ee27e..cf5c9c1afe 100644 --- a/compiler/simplCore/Simplify.hs +++ b/compiler/simplCore/Simplify.hs @@ -3236,7 +3236,8 @@ simplLetUnfolding :: SimplEnv-> TopLevelFlag simplLetUnfolding env top_lvl cont_mb id new_rhs unf | isStableUnfolding unf = simplStableUnfolding env top_lvl cont_mb id unf - | isExitJoinId id + | sm_preserve_exit_joins (getMode env) + , isExitJoinId id = return noUnfolding -- see Note [Do not inline exit join points] | otherwise = mkLetUnfolding (seDynFlags env) top_lvl InlineRhs id new_rhs |