[LLVMdev] [PATCH] -emit-bitcode-version
clattner at apple.com
Fri Nov 9 13:55:00 PST 2012
On Nov 8, 2012, at 7:09 AM, Joe Abbey <jabbey at arxan.com> wrote:
>>> The problem we face is that bitcode changes, and when it does… future versions
>>> can read it, but past versions are left in the lurch. For instance LLVM 3.2svn
>>> can BitcodeReader from LLVM 3.1, but LLVM 3.1 can't BitcodeReader LLVM 3.2
>>> (after r165739.) There was an element of this patch which would have helped
>>> enable bitcode compatibility (use-abs-operands), but alas it was not committed.
>> can't you use a combination of llvm-dis (from LLVM 3.2) and llvm-as (from LLVM
>> 3.1) to convert the bitcode?
>> Ciao, Duncan.
> I could for my immediate headache. My concern is that there will be future updates to the bitcode representation that may not work in this flow. That's impossible to predict, and llvm-dis -> .ll -> llvm-as is one path which certainly seems attractive. By providing an internal switch to emit bitcode, I think we save a step and have a method for future proofing.
> I'll be talking about this in a lightning talk, perhaps others have thoughts on this.
As you mentioned in your talk, I'm sympathetic to your desires, but highly skeptical of this approach - for a number of reasons. Off the top of my head:
1. This will (over time) accrete a ton of old gunk in the bitcode writer, and also slow down progress.
2. The use case for it is also very narrow (in contrast to having the *reader* handle old files, which many scenarios benefit from).
3. The open source project as a whole benefits from "forcing" users of LLVM to "stay up" on mainline… which this feature acts in opposition to.
More information about the llvm-dev