Re:Jank development update – Moving to LLVM IR
by RossBencina on Thursday October 17, 2024 @03:12AM
(#41867167)
Is LLVM IR a stable target these days? I once heard of a project that got bit pretty hard with LLVM IR interface changes in the (not all that recent) past.
[ Parent
| on HN ]
Re:Jank development update – Moving to LLVM IR
by michielderhaeg on Thursday October 17, 2024 @03:45AM
(#41867338)
Absolutely not. They do invasive changes all the time. At work we maintain an LLVM compatibility library that provides a stable interface across different LLVM versions. It has grown quite big over the years. The pure C interface is in comparison much more stable, but also quite limited.
Not just the API changes, the LLVM IR syntax can change drastically as well. E.g. not too long ago they switched from types pointer types to opaque pointers. `i32*` just becomes `ptr`. [1]
Re:Jank development update – Moving to LLVM IR
by fooker on Thursday October 17, 2024 @04:20AM
(#41867508)
IR can be auto-upgraded between LLVM versions.
Re:Jank development update – Moving to LLVM IR
by almostgotcaught on Thursday October 17, 2024 @07:05AM
(#41868402)
citation? i work on LLVM (like llvm/llvm-project) and i'm not aware of such a tool.
Re:Jank development update – Moving to LLVM IR
by theresistor on Thursday October 17, 2024 @07:42AM
(#41868681)
The textual IR is not backwards compatible, but the bitcode format has been best-effort auto-upgradeable for as long as I've been involved (2006). The policy is documented here: https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-comp...
Re:Jank development update – Moving to LLVM IR
by almostgotcaught on Thursday October 17, 2024 @08:23AM
(#41868980)
bitcode policy i'm aware of - it's the "IR" part that caught my attention.
Re:Jank development update – Moving to LLVM IR
by mannycalavera42 on Thursday October 17, 2024 @08:47AM
(#41869160)
a pretty evident case of not almost got caught
Re:Jank development update – Moving to LLVM IR
by fooker on Thursday October 17, 2024 @04:21AM
(#41867511)
As long as you use the C++ API, the pace of change is reasonable.
If you try to keep by by generating textual IR, it can be a nightmare.
Re:Jank development update – Moving to LLVM IR
by michielderhaeg on Thursday October 17, 2024 @05:43AM
(#41867947)
I do agree that the pace is reasonable.
Both with opaque pointers and the new pass manager API there was a quite a long transition period where both were supported before the old system was deprecated/removed.
But with every new non-patch release, some part of the public API is changed and we have to adapt.
Re:Jank development update – Moving to LLVM IR
by almostgotcaught on Thursday October 17, 2024 @07:13AM
(#41868454)
> But with every new non-patch release, some part of the public API is changed and we have to adapt.
bumping only on major release is recipe for pain and misery. everyone project i'm familiar with bumps weekly against HEAD. much more manageable.
Re:Jank development update – Moving to LLVM IR
by michielderhaeg on Thursday October 17, 2024 @05:40AM
(#41867925)
I think the bitcode parsers (binary and textual) are quite backwards compatible. Old bitcode IR will be upgraded transparently. So you might not have to keep up.