Conversation

Anyway what's interesting to me is - Packing memory into very specific memory layouts which C is not as good as it should be - If you're "nearly asm" you can put arch specific blocks (ifdefs or whatever) that call down to "real" asm (and thus regain SIMD)
1
3
Also, trying to turn LLVM IR into a truly stable and portable layer has already been tried: PNaCl which along with asm.js was one of the origins for WebAssembly. LLVM IR is fairly platform specific (more so than C) with a lot of unspecified and unsafe / undefined behavior like C.
1
3
It exposes more functionality than standard C, like pointers where you're allowed to index outside of objects / between objects (by leaving out inbounds markers) and options like well-defined signed integer overflow (like -fwrapv but case-by-case) or undefined unsigned overflow.
1
1
LLVM IR is nice to read, and I'd probably prefer writing a substantial amount of code in it rather than assembly (assuming macro systems could be used with both), but it's really not meant for that. It would be very weird, a major pain to keep it maintained and missing too much.
1
Show replies