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
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
You can give the virtual registers meaningful names and you aren't limited to in how many you use, which is nice. It's quite verbose to do things with pointers, since it's for reading rather than writing - unless you used a preprocessor. It'd be quite weird to do this though...
1
Show replies