Simon Peyton Jones pushed to branch wip/T26425 at Glasgow Haskell Compiler / GHC
Commits:
-
2d0950fe
by Simon Peyton Jones at 2025-11-14T17:14:40+00:00
1 changed file:
Changes:
| ... | ... | @@ -2381,12 +2381,13 @@ occAnalRule env rule@(Rule { ru_bndrs = bndrs, ru_args = args, ru_rhs = rhs }) |
| 2381 | 2381 | -- Note [Rules are extra RHSs]
|
| 2382 | 2382 | -- Note [Rule dependency info]
|
| 2383 | 2383 | rhs_uds' = markAllMany rhs_uds
|
| 2384 | + -- markAllMany: Note [Occurrences in stable unfoldings and RULES]
|
|
| 2384 | 2385 | rhs_ja = length args -- See Note [Join points and unfoldings/rules]
|
| 2385 | 2386 | |
| 2386 | 2387 | occAnalRule _ other_rule = (other_rule, emptyDetails, TUD 0 emptyDetails)
|
| 2387 | 2388 | |
| 2388 | -{- Note [Occurrences in stable unfoldings]
|
|
| 2389 | -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
| 2389 | +{- Note [Occurrences in stable unfoldings and RULES]
|
|
| 2390 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
| 2390 | 2391 | Consider
|
| 2391 | 2392 | f p = BIG
|
| 2392 | 2393 | {-# INLINE g #-}
|
| ... | ... | @@ -2409,6 +2410,8 @@ Bottom line: treat all occurrences in a stable unfolding as "Many". |
| 2409 | 2410 | We still leave tail call information intact, though, as to not spoil
|
| 2410 | 2411 | potential join points.
|
| 2411 | 2412 | |
| 2413 | +The same goes for RULES.
|
|
| 2414 | + |
|
| 2412 | 2415 | Note [Unfoldings and rules]
|
| 2413 | 2416 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| 2414 | 2417 | Generally unfoldings and rules are already occurrence-analysed, so we
|