Final phase Simplification should only happen after DmdAnal
In a call with Simon, he noted that currently we do the first final phase Simplification immediately after Call Arity. From GHC.Core.Opt.Pipeline:
-- Run GHC's internal simplification phase, after all rules have run. -- See Note [Compiler phases] in GHC.Types.Basic simplify name = simpl_phase FinalPhase name max_iter ... runWhen call_arity $ CoreDoPasses [ CoreDoCallArity , simplify "post-call-arity" ], -- Strictness analysis runWhen strictness demand_analyser, ...
So we will inline all wrappers (which are activated in FinalPhase) immediately before DmdAnal. Simon claims this is by accident and we should only do FinalPhase after DmdAnal.
I'm actually not so sure if that is so beneficial. Anyway, we get to see the analysis information from other modules (' wrapper functions) through their strictness signature, so it shouldn't make much of a difference.