[PATCH] D13666: Add an (optional) identification block in the bitcode

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 19:53:33 PDT 2015


> On Oct 20, 2015, at 7:01 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
> 
> I'm sorry, I actually missed this comment. My bad.
> 
> On Wed, Oct 14, 2015 at 10:44 AM Mehdi Amini via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
> Rafael on IRC mentioned that it would be nice to have the option of progressively deprecating bitcode in the future. For instance LLVM 4.1 could be able to read bitcode generated by version 3.14 (random number) and above. And 4.2 deprecate in turn anything older than 3.19 (random number again).
> 
> We can do that by encoding the version directly (major.minor.patch) in separate bytes and use it instead of the epoch.
> 
> What’s your take on this?
> 
> Ultimately, I'm worried about adding this without having a clear use case. For example, it means we need to be careful about exactly when we bump the minor version. It also isn't clear how to define it if people are managing their own releases out-of-band with the upstream repository.
> 
> We can extend this with an IDENTIFICATION_CODE_MAJOR, IDENTIFICATION_CODE_MINOR, or whatever other fields we're interested within this block in the future. So I think we should move forward with this patch now, and revisit more detailed information here when there is a clear plan around both 1) how to update them meaningfully and 2) what problem they are solving.
> 
> That make sense to you Rafael?

In the meantime I uploaded another diff that encode a major.minor.patch in the bitcode instead of the epoch, just for the posterity (I implemented it before seeing your email).

I don’t mind going with any version.

— 
Mehdi


>  
> 
> Thanks,
> 
>> Mehdi
> 
> 
> > On Oct 14, 2015, at 12:59 PM, Mehdi AMINI <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote:
> >
> > joker.eph updated this revision to Diff 37380.
> > joker.eph added a comment.
> >
> > Add the "epoch" field along with the producer string.
> >
> >
> > http://reviews.llvm.org/D13666 <http://reviews.llvm.org/D13666>
> >
> > Files:
> >  include/llvm/Bitcode/LLVMBitCodes.h
> >  lib/Bitcode/Reader/BitcodeReader.cpp
> >  lib/Bitcode/Writer/BitcodeWriter.cpp
> >  test/Bitcode/identification.ll
> >  tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
> >
> > <D13666.37380.patch>
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151020/69195e48/attachment.html>


More information about the llvm-commits mailing list