Skip to content

Unregisterised code size is two orders of magnitude too large #13

@ElvishJerricco

Description

@ElvishJerricco

Just opening an issue for something we've known about for a couple weeks now. Binary sizes are on the order of 100M, which is clearly absurd. @dfordivam thinks this is due to a lack of DCE. This problem is present both with the wasm backend and the native unregisterised backend, so maybe this should be an issue on GHC trac.

As for solutions, it seems reasonable that we could implement some kind of DCE despite the trampolining the C code does. But another idea we had was to switch to the LLVM backend before wasm has tail calls. We could write an implementation for the GHC calling convention (ghccc) that lowers calls into a trampoline ABI. If we enable LTO in LLVM, we might get DCE in the linker before lowering out of bitcode, just based on the ghccc calls.

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