summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2021-03-22 10:11:35 +0100
committerSebastian Graf <sebastian.graf@kit.edu>2021-03-22 10:11:35 +0100
commit2f6bb45b2587b566e94cce06b94ab794e03bc143 (patch)
treed1b6456dc541c058929b0bdc67a74778ec3ebcf4 /compiler
parent449bf91cff7a6c0335eceb11f1dba40696b3163f (diff)
downloadhaskell-2f6bb45b2587b566e94cce06b94ab794e03bc143.tar.gz
Worker/wrapper: Consistent names
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Core/Make.hs2
-rw-r--r--compiler/GHC/Core/Opt/DmdAnal.hs2
-rw-r--r--compiler/GHC/Core/Opt/Simplify.hs2
-rw-r--r--compiler/GHC/Core/Opt/WorkWrap.hs16
-rw-r--r--compiler/GHC/Core/Opt/WorkWrap/Utils.hs4
-rw-r--r--compiler/GHC/Core/Unfold.hs4
-rw-r--r--compiler/GHC/Core/Unfold/Make.hs2
-rw-r--r--compiler/GHC/Iface/Tidy.hs2
-rw-r--r--compiler/GHC/Tc/Gen/Sig.hs2
9 files changed, 18 insertions, 18 deletions
diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs
index 42a1b78c0c..7ad2d07986 100644
--- a/compiler/GHC/Core/Make.hs
+++ b/compiler/GHC/Core/Make.hs
@@ -978,7 +978,7 @@ It turned out that g didn't use the second component, and hence f doesn't use
the first. But the stable-unfolding for f looks like
\x. case x of MkT a b -> g ($WMkT b a)
where $WMkT is the wrapper for MkT that evaluates its arguments. We
-apply the same w/w split to this unfolding (see Note [Worker-wrapper
+apply the same w/w split to this unfolding (see Note [Worker/wrapper
for INLINEABLE functions] in GHC.Core.Opt.WorkWrap) so the template ends up like
\b. let a = absentError "blah"
x = MkT a b
diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs
index 491b9f74ba..b36f2e4ce7 100644
--- a/compiler/GHC/Core/Opt/DmdAnal.hs
+++ b/compiler/GHC/Core/Opt/DmdAnal.hs
@@ -1281,7 +1281,7 @@ useful semantic strictness information, so now we analyse them like
any other function, and pin strictness information on them.
That in turn forces us to worker/wrapper them; see
-Note [Worker-wrapper for NOINLINE functions] in GHC.Core.Opt.WorkWrap.
+Note [Worker/wrapper for NOINLINE functions] in GHC.Core.Opt.WorkWrap.
Note [Lazy and unleashable free variables]
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs
index 701573a55d..1a0a919b12 100644
--- a/compiler/GHC/Core/Opt/Simplify.hs
+++ b/compiler/GHC/Core/Opt/Simplify.hs
@@ -517,7 +517,7 @@ cast! We want to transfer the pagma to $wf:
It's exactly like worker/wrapper for strictness analysis:
f is the wrapper and must inline like crazy
$wf is the worker and must carry f's original pragma
-See Note [Worker-wrapper for NOINLINE functions] in
+See Note [Worker/wrapper for NOINLINE functions] in
GHC.Core.Opt.WorkWrap.
See #17673, #18093, #18078.
diff --git a/compiler/GHC/Core/Opt/WorkWrap.hs b/compiler/GHC/Core/Opt/WorkWrap.hs
index df5cdb9496..4f0f9d7ed4 100644
--- a/compiler/GHC/Core/Opt/WorkWrap.hs
+++ b/compiler/GHC/Core/Opt/WorkWrap.hs
@@ -181,7 +181,7 @@ Notice that we refrain from w/w'ing an INLINE function even if it is
in a recursive group. It might not be the loop breaker. (We could
test for loop-breaker-hood, but I'm not sure that ever matters.)
-Note [Worker-wrapper for INLINABLE functions]
+Note [Worker/wrapper for INLINABLE functions]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we have
{-# INLINABLE f #-}
@@ -226,7 +226,7 @@ in advance...the logic in mkWwBodies is complex. So I've left the
super-simple test, with this Note to explain.
-Note [Worker-wrapper for NOINLINE functions]
+Note [Worker/wrapper for NOINLINE functions]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We used to disable worker/wrapper for NOINLINE things, but it turns out
this can cause unnecessary reboxing of values. Consider
@@ -300,7 +300,7 @@ splitting a NOINLINE function.
Note [Worker activation]
~~~~~~~~~~~~~~~~~~~~~~~~
-Follows on from Note [Worker-wrapper for INLINABLE functions]
+Follows on from Note [Worker/wrapper for INLINABLE functions]
It is *vital* that if the worker gets an INLINABLE pragma (from the
original function), then the worker has the same phase activation as
@@ -413,7 +413,7 @@ When should the wrapper inlining be active?
Id
2. It should be active at some point, despite (1) because of
- Note [Worker-wrapper for NOINLINE functions]
+ Note [Worker/wrapper for NOINLINE functions]
3. For ordinary functions with no pragmas we want to inline the
wrapper as early as possible (#15056). Suppose another module
@@ -469,7 +469,7 @@ Note [Wrapper NoUserInlinePrag]
~~~~~~~~~~~~~~~~~~~~~~~~~~~
We use NoUserInlinePrag on the wrapper, to say that there is no
user-specified inline pragma. (The worker inherits that; see Note
-[Worker-wrapper for INLINABLE functions].) The wrapper has no pragma
+[Worker/wrapper for INLINABLE functions].) The wrapper has no pragma
given by the user.
(Historical note: we used to give the wrapper an INLINE pragma, but
@@ -492,7 +492,7 @@ tryWW :: DynFlags
-- if two, then a worker and a
-- wrapper.
tryWW dflags fam_envs is_rec fn_id rhs
- -- See Note [Worker-wrapper for NOINLINE functions]
+ -- See Note [Worker/wrapper for NOINLINE functions]
| Just stable_unf <- certainlyWillInline uf_opts fn_info
= return [ (fn_id `setIdUnfolding` stable_unf, rhs) ]
@@ -658,7 +658,7 @@ mkWWBindPair dflags fn_id fn_info arity rhs work_uniq div cpr
, inl_sat = Nothing
, inl_act = work_act
, inl_rule = FunLike }
- -- inl_inline: copy from fn_id; see Note [Worker-wrapper for INLINABLE functions]
+ -- inl_inline: copy from fn_id; see Note [Worker/wrapper for INLINABLE functions]
-- inl_act: see Note [Worker activation]
-- inl_rule: it does not make sense for workers to be constructorlike.
@@ -677,7 +677,7 @@ mkWWBindPair dflags fn_id fn_info arity rhs work_uniq div cpr
`setInlinePragma` work_prag
`setIdUnfolding` mkWorkerUnfolding simpl_opts work_fn fn_unfolding
- -- See Note [Worker-wrapper for INLINABLE functions]
+ -- See Note [Worker/wrapper for INLINABLE functions]
`setIdStrictness` mkClosedStrictSig work_demands div
-- Even though we may not be at top level,
diff --git a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
index b7468aa94a..9f4def8579 100644
--- a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
+++ b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs
@@ -720,7 +720,7 @@ If we have
f :: Ord a => [a] -> Int -> a
{-# INLINABLE f #-}
and we worker/wrapper f, we'll get a worker with an INLINABLE pragma
-(see Note [Worker-wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap),
+(see Note [Worker/wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap),
which can still be specialised by the type-class specialiser, something like
fw :: Ord a => [a] -> Int# -> a
@@ -1023,7 +1023,7 @@ splitting:
like U(AAAA) for suitable number of absent demands. So we have
a special case for it, with arity coming from the data constructor.
-Note [Worker-wrapper for bottoming functions]
+Note [Worker/wrapper for bottoming functions]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We used not to split if the result is bottom.
[Justification: there's no efficiency to be gained.]
diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs
index 8fdbc1b891..d76ee37e73 100644
--- a/compiler/GHC/Core/Unfold.hs
+++ b/compiler/GHC/Core/Unfold.hs
@@ -960,7 +960,7 @@ certainlyWillInline opts fn_info
= case fn_unf of
CoreUnfolding { uf_tmpl = expr, uf_guidance = guidance, uf_src = src }
| loop_breaker -> Nothing -- Won't inline, so try w/w
- | noinline -> Nothing -- See Note [Worker-wrapper for NOINLINE functions]
+ | noinline -> Nothing -- See Note [Worker/wrapper for NOINLINE functions]
| otherwise
-> case guidance of
UnfNever -> Nothing
@@ -1033,7 +1033,7 @@ certainlyWillInline /must/ return Nothing for a large INLINABLE thing,
even though we have a stable inlining, so that strictness w/w takes
place. It makes a big difference to efficiency, and the w/w pass knows
how to transfer the INLINABLE info to the worker; see WorkWrap
-Note [Worker-wrapper for INLINABLE functions]
+Note [Worker/wrapper for INLINABLE functions]
************************************************************************
* *
diff --git a/compiler/GHC/Core/Unfold/Make.hs b/compiler/GHC/Core/Unfold/Make.hs
index d9b541e49c..5e801682f5 100644
--- a/compiler/GHC/Core/Unfold/Make.hs
+++ b/compiler/GHC/Core/Unfold/Make.hs
@@ -88,7 +88,7 @@ mkWwInlineRule opts expr arity
, ug_boring_ok = boringCxtNotOk })
mkWorkerUnfolding :: SimpleOpts -> (CoreExpr -> CoreExpr) -> Unfolding -> Unfolding
--- See Note [Worker-wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap
+-- See Note [Worker/wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap
mkWorkerUnfolding opts work_fn
(CoreUnfolding { uf_src = src, uf_tmpl = tmpl
, uf_is_top = top_lvl })
diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs
index 76ad3c2a79..9b394a48f5 100644
--- a/compiler/GHC/Iface/Tidy.hs
+++ b/compiler/GHC/Iface/Tidy.hs
@@ -1262,7 +1262,7 @@ tidyTopIdInfo uf_opts rhs_tidy_env name orig_rhs tidy_rhs idinfo show_unfold
-- the function returns bottom
-- In this case, show_unfold will be false (we don't expose unfoldings
-- for bottoming functions), but we might still have a worker/wrapper
- -- split (see Note [Worker-wrapper for bottoming functions] in
+ -- split (see Note [Worker/wrapper for bottoming functions] in
-- GHC.Core.Opt.WorkWrap)
diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs
index 1d81b3636b..47da1c43dd 100644
--- a/compiler/GHC/Tc/Gen/Sig.hs
+++ b/compiler/GHC/Tc/Gen/Sig.hs
@@ -831,7 +831,7 @@ An imported Id may or may not have an unfolding. If not, we obviously
can't specialise it here; indeed the desugar falls over (#18118).
We used to test whether it had a user-specified INLINABLE pragma but,
-because of Note [Worker-wrapper for INLINABLE functions] in
+because of Note [Worker/wrapper for INLINABLE functions] in
GHC.Core.Opt.WorkWrap, even an INLINABLE function may end up with
a wrapper that has no pragma, just an unfolding (#19246). So now
we just test whether the function has an unfolding.