-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try LLVM tailcall without ghccc #39
Comments
For the simple "hello-world" haskell code, the following works fine
It generates the
But in the machine code generation step it fails
Files here -> |
The wip branch is https://github.com/WebGHC/wasm-cross/tree/llvm-tailcall-1 The binaries generated via llvm backend are huge (10mb for hello-world, 115 mb reflex-todomvc) as the linker On doing a hack in linker to ignore On further analysis of the closure of the binaries I found that they contain roughly the same number of symbols as the native binaries (indicating that the linker is indeed removing most of the dead code). And comparing the sizes of some of the APIs revealed that the size of wasm code is significantly bigger than the native.
I also tried the x86 llvm binary with NO_REGS and TABLES_NEXT_TO_CODE disabled. With this size of the binary (hello-world) increased by about 25% So a combination of these two factors are behind the 2~3 times size difference between native x86 and wasm binaries. |
If we are able to use llvm using the already supported tailcall (musttail call, without the ghccc), then we will have better idea of the size of binary andd potential issues further in the compilation.
Also we could test the runtime in the chromium (by enabling the tail-call), and get to know if there are any issues in our approach, etc.
The text was updated successfully, but these errors were encountered: