-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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.