Simon Peyton Jones pushed to branch wip/T23109a at Glasgow Haskell Compiler / GHC
Commits:
-
ce5db8f6
by Simon Peyton Jones at 2025-04-24T11:39:08+01:00
1 changed file:
Changes:
... | ... | @@ -707,12 +707,12 @@ lvlMFE env strict_ctxt ann_expr |
707 | 707 | escapes_value_lam = dest_lvl `ltMajLvl` (le_ctxt_lvl env)
|
708 | 708 | |
709 | 709 | -- See Note [Floating to the top]
|
710 | - is_con_app = isSaturatedConApp expr -- True of literal strings too
|
|
710 | +-- is_con_app = isSaturatedConApp expr -- True of literal strings too
|
|
711 | 711 | saves_alloc = isTopLvl dest_lvl
|
712 | 712 | && (escapes_value_lam || floatConsts env)
|
713 | 713 | -- Always float allocation out of a value lambda
|
714 | 714 | -- if it gets to top level
|
715 | - && (not strict_ctxt || is_con_app || is_bot_lam)
|
|
715 | + && (not strict_ctxt || is_hnf || is_bot_lam)
|
|
716 | 716 | -- is_con_app: don't float PAPs to the top; they may well end
|
717 | 717 | -- up getting eta-expanded and re-inlined
|
718 | 718 | -- E.g. f = \x -> (++) ys
|