The amount of misinformation about LLVM out there is astounding.
-
-
Replying to @johnregehr
Popular sentiment. For example, people often don’t realize LLVM IR has lots of undefined behavior and that it’s target specific…
2 replies 2 retweets 7 likes -
Replying to @pcwalton @johnregehr
though, FWIW, if the source language is C or C++, it isn't exactly easy to make it portable at the IR level. lots of non-portability introduced even in the preprocessor stage (and meaningfully eliminating this issue is easier said than done).
1 reply 0 retweets 0 likes -
Most of that front end / preprocessor UB from C++ disappears as soon as IR is generated.
1 reply 0 retweets 1 like -
yes, but the code is still specific to a particular word-size and C library implementation, ... it is possible to be portable via a wrapper or VM layer (which provides an expected idealized target), but still falls short of ideal (full 'native' portability).
1 reply 0 retweets 1 like -
One could statically link the C library, only rely on a syscall layer (which you can make portable across OS), and enforce a little-endian 32-bit architecture (even on 64-bit platforms). Realistically this is extremely portable and can have almost no UB, even at the IR level.
2 replies 0 retweets 0 likes
Huh, we could actually put that on the Web… a kind of “Web Assembly”, I guess
-
-
I am aware of and have made use of WASM, but, the issues I was thinking of are subtly different than what has been achieved thus far.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.