I've done this with a mini AOT toy I built. In addition to that, the JS 
codegen makes assumptions about legalization passes that have been run. In 
particular I believe the Julia project got bit by 64bit int instructions. 
You'd also definitely want to baby the relooper, if you give it very 
branchy code it will explode your code size.

On Wednesday, February 15, 2017 at 3:04:33 PM UTC-8, Alon Zakai wrote:
>
> In principle yes, the emscripten frontend emcc can accept IR as input 
> instead of C++. Just pass it a .ll or .bc file.
>
> However, in practice, the IR=>JS conversion is almost entirely tested on 
> IR output from clang. So if the custom compiler you have happens to emit 
> some IR element we don't support, you could hit an error.
>
> On Wed, Feb 15, 2017 at 11:15 AM, Tomas Reimers <[email protected] 
> <javascript:>> wrote:
>
>> Hi Everyone, 
>>
>> I know that emscripten goes from C/C++ -> llvm ir -> JS. Is there a way 
>> (ideally with a command line tool) to go directly from llvm ir to JS (if I 
>> already have the llvm from a custom compiler?)
>>
>> Thanks so much,
>> Tomas
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to