[LLVMdev] stability of llvm ir across releases

Neil Henning llvm at duskborn.com
Mon Mar 16 02:24:44 PDT 2015

I concur with Jeremy - it is mostly ok to consume older IR with newer 
LLVM, but metadata has changed significantly in just about every release 
since 3.2 (one of the issues with OpenCL SPIR 1.2 using the 3.2 IR is 
that all people implementing OpenCL drivers that support SPIR have to 
have some funky code on the go to support the older IR).

I think it is wrong to assume the IR wouldn't change though - one of the 
best things about LLVM is the utter disregard for backwards 
compatibility if it allows the project to do something in a better way - 
if that meant the IR had to be massively changed it would be done and 
the community wouldn't even glance backwards ;)


On 15/03/15 00:45, Jeremy Lakeman wrote:
> The general principle I've seen applied in mailing list discussions;
> Textual IR could change significantly, the complexity of preserving 
> backwards compatibility in the parser is often too high.
> Binary IR, is a much more structured format, backwards compatibility 
> is easier to support. IR Correctness should be preserved, but some 
> language features might be ignored. eg old meta-data formats will be 
> silently stripped out.
> On Sun, Mar 15, 2015 at 3:13 AM, Hayden Livingston 
> <halivingston at gmail.com <mailto:halivingston at gmail.com>> wrote:
>     Are you saying the textual form of IR can change, but bitcode
>     doesn't? I don't know what you mean by assembly syntax.
>     Is there a changlog entry when the textual IR changes?
>     On Sat, Mar 14, 2015 at 5:22 AM, Jeremy Lakeman
>     <Jeremy.Lakeman at gmail.com <mailto:Jeremy.Lakeman at gmail.com>> wrote:
>         Assembly syntax can and will break between versions. But
>         bitcode should generally be upgradeable, or a bug should be filed.
>         On Sat, Mar 14, 2015 at 4:41 PM, Hayden Livingston
>         <halivingston at gmail.com <mailto:halivingston at gmail.com>> wrote:
>             Is it safe to assume that LLVM IR will live more-or-less
>             the same for most releases, and that significant changes
>             will be communicated?
>             Or is it something that can change at any time and you
>             must not rely on it ever being same.
>             To me, it seems like the IR has evolved slowly but no
>             spectacularly large changes were made in the 1-1.5 years
>             I've been watching it, -- sure some experimental patch
>             point, gc stuff, but not your day-to-day types etc
>             I'm asking because I'm going to take somewhat major
>             dependencies in my upcoming system on the IR, and being
>             able to store it across multiple releases of my system.
>             I don't anticipate moving to newer versions of LLVM every
>             time I release, but I do imagine wanting to upgrade to
>             let's say LLVM 3.7 or whatever releases come by.
>             Hayden
>             _______________________________________________
>             LLVM Developers mailing list
>             LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>             http://llvm.cs.uiuc.edu
>             http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150316/7a738772/attachment.html>

More information about the llvm-dev mailing list