Hacker News new | ask | show | jobs
by legulere 4247 days ago
Well LLVM heavily relies on not having forward compatibility (new versions spew out LLVM IR that can't be used by older versions) and backward compatibility is merely an afterthought.
2 comments

That's a standards issue. If w3c froze a particular version as the "one true version", then whatever experimentation the llvm guys want to do with whatever other versions doesn't matter.

Another solution is to version your code <script type="llvm" src="foo.ll" version="3.6.1" />

I'm already of the belief that w3c needs to require versioning of js code instead of stuff like 'use strict' (if it's bad, just remove it in new versions and move on). For backwards compatibility, if there's no version, assume ECMAScript3.

Khronos Group standardized LLVM IR 3.2 as SPIR(Standard Portable Intermediate Representation). It is an existence proof that standardizing LLVM IR is possible.

https://www.khronos.org/spir/

I actually work a bit with SPIR. They standardized a subset of LLVM IR 3.2 as SPIR 1.2

SPIR 2.0 on the other hand already is based off LLVM IR 3.4