Skip to content

Propagate inline phase information #26

@harendra-kumar

Description

@harendra-kumar

The drain combinator is marked to be inlined in phase 2.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions