summaryrefslogtreecommitdiff
path: root/compiler/simplCore/CoreMonad.lhs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-05-13 10:00:45 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-08-28 11:14:10 +0100
commit949ad67e2f475864a405d214c3e02f2918931eb8 (patch)
tree32f611ae31767fb2422bfe83c63de2cf9f94de4e /compiler/simplCore/CoreMonad.lhs
parent343633307f5a24c741b80bbbc952919d9947f56c (diff)
downloadhaskell-949ad67e2f475864a405d214c3e02f2918931eb8.tar.gz
Don't float out (classop dict e1 e2)
A class op applied to a dictionary doesn't do much work, so it's not a great idea to float it out (except possibly to the top level. See Note [Floating over-saturated applications] in SetLevels I also renamed "floatOutPartialApplications" to "floatOutOverSatApps"; the former is deeply confusing, since there is no partial application involved -- quite the reverse, it is *over* saturated.
Diffstat (limited to 'compiler/simplCore/CoreMonad.lhs')
-rw-r--r--compiler/simplCore/CoreMonad.lhs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/simplCore/CoreMonad.lhs b/compiler/simplCore/CoreMonad.lhs
index c06036044d..faec02e9c6 100644
--- a/compiler/simplCore/CoreMonad.lhs
+++ b/compiler/simplCore/CoreMonad.lhs
@@ -418,8 +418,10 @@ data FloatOutSwitches = FloatOutSwitches {
floatOutConstants :: Bool, -- ^ True <=> float constants to top level,
-- even if they do not escape a lambda
- floatOutPartialApplications :: Bool -- ^ True <=> float out partial applications
- -- based on arity information.
+ floatOutOverSatApps :: Bool -- ^ True <=> float out over-saturated applications
+ -- based on arity information.
+ -- See Note [Floating over-saturated applications]
+ -- in SetLevels
}
instance Outputable FloatOutSwitches where
ppr = pprFloatOutSwitches
@@ -430,7 +432,7 @@ pprFloatOutSwitches sw
sep $ punctuate comma $
[ ptext (sLit "Lam =") <+> ppr (floatOutLambdas sw)
, ptext (sLit "Consts =") <+> ppr (floatOutConstants sw)
- , ptext (sLit "PAPs =") <+> ppr (floatOutPartialApplications sw) ])
+ , ptext (sLit "OverSatApps =") <+> ppr (floatOutOverSatApps sw) ])
-- The core-to-core pass ordering is derived from the DynFlags:
runWhen :: Bool -> CoreToDo -> CoreToDo