You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See this commit in the streamly repo. If the readDrain function is annotated plainly as INLINE then GHC is not able to inline it in the first phase (phase-2) for some reason because it is shared at two places in the bench group table. This has an effect that the drain does not fuse. If we mark readDrain as INLINE[2] then it fuses.
I have not investigated deeply but my guess is that if an underlying fusible function is marked to be inlined in a specific phase then we need to propagate that information to the functions that directly or indirectly call that function so that we can ensure that it is inlined in that phase.
It should be noted that if we remove INLINE from readDrain then the code fuses because in that case readDrain is not inlined in the benchgroup list and the code inside readDrain is properly inlined and fuses.
Activity
harendra-kumar commentedon Jul 9, 2020
It should be noted that if we remove INLINE from
readDrainthen the code fuses because in that casereadDrainis not inlined in the benchgroup list and the code insidereadDrainis properly inlined and fuses.