• Simon Marlow's avatar
    Code-size optimisation for top-level indirections (#7308) · 7da13762
    Simon Marlow authored
    Top-level indirections are often generated when there is a cast, e.g.
    foo :: T
    foo = bar `cast` (some coercion)
    For these we were generating a full-blown CAF, which is a fair chunk
    of code.
    This patch makes these indirections generate a single IND_STATIC
    closure (4 words) instead.  This is exactly what the CAF would
    evaluate to eventually anyway, we're just shortcutting the whole
StgCmmHeap.hs 24 KB