Make small INLINE functions behave properly
Simon writes: Currently we check for a type arg rather than isTyCoArg. This in turn makes INLINE things look bigger than they should be, and stops them being inlined into boring contexts when they perfectly well could be. E.g. f x = g <refl> x {-# INLINE g #-} ... (map (f x) xs) ... The context is boring, so don't inline unconditionally. But f's RHS is no bigger than its call, provided you realise that the coercion argument is ultimately cost-free. This happens in practice for $WHRefl. It's not a big deal: at most it means we have an extra function call overhead. But it's untidy, and actually worse than what happens without an INLINE pragma. Fixes #17182 This makes 0.0% change in nofib binary sizes.
Showing
-
mentioned in merge request !1722 (closed)
-
mentioned in issue #17787 (closed)
-
mentioned in merge request !2666 (closed)
-
mentioned in commit 5ccd851f
-
mentioned in commit d5bfd4b2
-
mentioned in commit cc969b3e
-
mentioned in commit 7d8baa8d
-
mentioned in commit 1228aab1
-
mentioned in commit 621468f6
Please register or sign in to comment