- = UnfoldAlways -- There is /no original definition/, so you'd better unfold.
- -- The unfolding is guaranteed to have no free variables
- -- so no need to think about it during dependency analysis
-
- | InlineRule { -- See Note [InlineRules]
- -- Be very keen to inline this
- -- The uf_tmpl is the *original* RHS; do *not* replace it on
- -- each simlifier run. Hence, the *actual* RHS of the function
- -- may be different by now, because it may have been optimised.
- ug_ir_info :: InlineRuleInfo, -- Supplementary info about the InlineRule
- ug_small :: Bool -- True <=> the RHS is so small (eg no bigger than a call)
- -- that you should always inline a saturated call,
- } -- regardless of how boring the context is
- -- See Note [INLINE for small functions] in CoreUnfold]
-
- | UnfoldIfGoodArgs { -- Arose from a normal Id; the info here is the
+ = UnfWhen { -- Inline without thinking about the *size* of the uf_tmpl
+ -- Used (a) for small *and* cheap unfoldings
+ -- (b) for INLINE functions
+ -- See Note [INLINE for small functions] in CoreUnfold
+ ug_unsat_ok :: Bool, -- True <=> ok to inline even if unsaturated
+ ug_boring_ok :: Bool -- True <=> ok to inline even if the context is boring
+ -- So True,True means "always"
+ }
+
+ | UnfIfGoodArgs { -- Arose from a normal Id; the info here is the