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
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