This is an archive of the discontinued LLVM Phabricator instance.

Reserve a vendor reserved block ID for bitcode
AbandonedPublic

Authored by mehdi_amini on Sep 3 2015, 5:11 PM.

Details

Reviewers
rafael
Summary

The idea is that vendor toolchains can insert a block for their own
internal purpose while generating bitcode that will be compatible
with the open-source tools. The latter just ignoring this block.

We (Apple) intend to use it for versioning the bitcode. The versioning
would not make sense with respect to open-source release since our
internal versions/releases don't align.

Diff Detail

Event Timeline

mehdi_amini updated this revision to Diff 33995.Sep 3 2015, 5:11 PM
mehdi_amini retitled this revision from to Reserve a vendor reserved block ID for bitcode.
mehdi_amini updated this object.
mehdi_amini added a reviewer: rafael.
mehdi_amini added a subscriber: llvm-commits.
rafael edited edge metadata.Sep 4 2015, 6:23 AM
rafael added a subscriber: rafael.

Needs a test showing that it is actually ignored.

Can you expand on how you intend this to be used? We have a documented
policy on supporting old bitcode:

http://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility

Is that not what you are looking for?

mehdi_amini updated this revision to Diff 34030.Sep 4 2015, 7:57 AM
mehdi_amini edited edge metadata.

Add a test

aprantl added a subscriber: aprantl.Sep 9 2015, 3:29 PM
alexr added a subscriber: alexr.Sep 10 2015, 7:47 PM

So, we went through this last year.... http://lists.llvm.org/pipermail/llvm-dev/2014-November/078498.html

If we add a vendor block, we should at a minimum define a way to identify which vendor it is, in case we are handed bitcode from somewhere else. Bike shed away, but there should be something simple enough at the start that can tell us we're looking at the wrong thing.

Alex, you guys were right. I hadn't thought of all the cases we would need to check for. I agree that we should have a simple mechanism to distinguish content from different vendors.

mehdi_amini abandoned this revision.Nov 16 2015, 8:49 AM