Note [Eta expansion of hasNoBinding things in CorePrep]
maybeSaturate deals with eta expanding to saturate things that can't deal with unsaturated applications (identified by 'hasNoBinding', currently foreign calls, unboxed tuple/sum constructors, and representation-polymorphic primitives such as 'coerce' and 'unsafeCoerce#'). Historical Note: Note that eta expansion in CorePrep used to be very fragile due to the "prediction" of CAFfyness that we used to make during tidying. We previously saturated primop applications here as well but due to this fragility (see #16846) we now deal with this another way, as described in Note [Primop wrappers] in GHC.Builtin.PrimOps.
References 1
- Primop wrappers GHC.Builtin.PrimOps
Referenced by 2
- Eta expanding primops GHC.Builtin.PrimOps
- GHC.CoreToStg.Prep call site