Note [Worker activation]
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 the wrapper (or later). That is necessary to allow the wrapper to inline into the worker's unfolding: see GHC.Core.Opt.Simplify.Utils Note [Simplifying inside stable unfoldings]. If the original is NOINLINE, it's important that the worker inherits the original activation. Consider {-# NOINLINE expensive #
References 2
- Simplifying inside stable unfoldings GHC.Core.Opt.Simplify.Utils
- Worker/wrapper for INLINABLE functions GHC.Core.Opt.WorkWrap
Referenced by 3
- GHC.Core.Opt.WorkWrap call site ×2
- Wrapper activation GHC.Core.Opt.WorkWrap