You can try to hook into the emscripten toolchain, this uses a custom LLVM backend called 'fastcomp', which at one point was derived or merged from the PNaCl LLVM backend. If your generated LLVM bytecode is compatible with what fastcomp generates, emscripten should be able to generate asm.js or WebAssembly from this.
There's also an 'official' WebAssembly backend for LLVM in the works, but I don't know how usable that is.
Rust also has a working asm.js/wasm backend for a while now, may be you can steal some ideas from there.
Cheers,
-Floh.