summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorNicolas Frisby <nicolas.frisby@gmail.com>2013-04-11 12:48:11 +0100
committerNicolas Frisby <nicolas.frisby@gmail.com>2013-04-11 18:47:57 +0100
commitaf12cf66d1a416a135cb98b86717aba2cd247e1a (patch)
tree8e17ace160216f6aab960132c8bd3629dbaf1849 /compiler/main
parent155d943cbbe0ee8c3443bb76c74dff99355b55aa (diff)
downloadhaskell-af12cf66d1a416a135cb98b86717aba2cd247e1a.tar.gz
ignore RealWorld in size_expr; flag to keep w/w from creating sharing
size_expr now ignores RealWorld lambdas, arguments, and applications. Worker-wrapper previously removed all lambdas from a function, if they were all unused. Removing *all* value lambdas is no longer allowed. Instead (\_ -> E) will become (\_void -> E), where it used to become E. The previous behavior can be recovered via the new -ffun-to-thunk flag. Nofib notables: ---------------------------------------------------------------- Program O2 O2 newly ignoring RealWorld and not turning function closures into thunks ---------------------------------------------------------------- Allocations comp_lab_zift 333090392% -5.0% reverse-complem 155188304% -3.2% rewrite 15380888% +4.0% boyer2 3901064% +7.5% rewrite previously benefited from fortunate LoopBreaker choice that is now disrupted. A function in boyer2 goes from $wonewayunify1 size 700 to size 650, thus gets inlined into rewritelemmas, thus exposing a parameter scrutinisation, thus allowing SpecConstr, which unfortunately involves reboxing. Run Time fannkuch-redux 7.89% -15.9% hpg 0.25% +5.6% wang 0.21% +5.8% /shrug
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/DynFlags.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index ba860622ed..24c573b366 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -299,6 +299,7 @@ data GeneralFlag
| Opt_CmmElimCommonBlocks
| Opt_OmitYields
| Opt_SimpleListLiterals
+ | Opt_FunToThunk -- allow WwLib.mkWorkerArgs to remove all value lambdas
-- Interface files
| Opt_IgnoreInterfacePragmas
@@ -2487,6 +2488,7 @@ fFlags = [
( "cmm-elim-common-blocks", Opt_CmmElimCommonBlocks, nop ),
( "omit-yields", Opt_OmitYields, nop ),
( "simple-list-literals", Opt_SimpleListLiterals, nop ),
+ ( "fun-to-thunk", Opt_FunToThunk, nop ),
( "gen-manifest", Opt_GenManifest, nop ),
( "embed-manifest", Opt_EmbedManifest, nop ),
( "ext-core", Opt_EmitExternalCore, nop ),