LLVM passes for compiling Rust code with Emscripten
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
BreakStructArguments.cpp
BreakStructLiterals.cpp
FixNestedExtractValue.cpp
Hello.cpp
Makefile
README.md
RemoveAssume.cpp
RemoveOverflowChecks.cpp

README.md

LLVM passes for compiling Rust code with Emscripten. The code could use some cleanup, but it more or less works. Currently it appears only -remove-overflow-checks and -remove-assume are needed. Otherwise, upstream emscripten-fastcomp (version 1.29.0) works.

Compile with:

make RemoveOverflowChecks.so RemoveAssume.so \
    LLVM_PREFIX=.../emscripten-fastcomp/build

Use with:

.../emscripten-fastcomp/build/bin/opt \
    -load=RemoveOverflowChecks.so -load=RemoveAssume.so \
    -O3 -remove-overflow-checks -remove-assume -globaldce \
    input.ll -S -o output.ll