@@ -485,18 +485,25 @@ inspect $ 'readSumBytes `hasNoType` ''AT.FlattenState
485inspect $ 'readSumBytes `hasNoType` ''D.ConcatMapUState
485inspect $ 'readSumBytes `hasNoType` ''D.ConcatMapUState
488+-- XXX If we have two benchmarks using S.drain in one benchmark group then
489+-- somehow GHC ends up delaying the inlining of readDrain. since S.drain has an
490+-- INLINE[2] for proper rule firing, that does not work well because of delyaed
491+-- inlining and the code does not fuse. We need some way of propagating the
492+-- inline phase information up so that we can expedite inlining of the callers
493+-- too automatically. The minimal example for the problem can be created by
494+-- using just two benchmarks in a bench group both using "readDrain".
488−{-# INLINE readDrain #-}
495+{-# INLINE[2] readDrain #-}
489readDrain :: Handle -> IO ()
496readDrain :: Handle -> IO ()
490readDrain inh = S.drain $ S.unfold FH.read inh
497readDrain inh = S.drain $ S.unfold FH.read inh
492−{-# INLINE readDecodeLatin1 #-}
499+{-# INLINE[2] readDecodeLatin1 #-}
493readDecodeLatin1 :: Handle -> IO ()
500readDecodeLatin1 :: Handle -> IO ()
494readDecodeLatin1 inh =
501readDecodeLatin1 inh =
496 $ SS.decodeLatin1
503 $ SS.decodeLatin1
497 $ S.unfold FH.read inh
504 $ S.unfold FH.read inh
499−{-# INLINE readDecodeUtf8Lax #-}
506+{-# INLINE[2] readDecodeUtf8Lax #-}
500readDecodeUtf8Lax :: Handle -> IO ()
507readDecodeUtf8Lax :: Handle -> IO ()
501readDecodeUtf8Lax inh =
508readDecodeUtf8Lax inh =