Duncan, I was wondering if you'd be open to making a change in the IR parser to accept and ignore 'metadata' keywords in the places they used to be required. My common workflow is to use a version of clang (from the last major release) to generate test IR fragments. Right now, this is not possible since IR generated by the previous released clang no longer parses with TOT. I know we don't generally support forward serialization of IR, but in practice, it generally works for this type of usage. What do you think? Philip
On Tue, Jan 6, 2015 at 4:23 PM, Philip Reames <listmail at philipreames.com> wrote:> Duncan, > > I was wondering if you'd be open to making a change in the IR parser to > accept and ignore 'metadata' keywords in the places they used to be > required. My common workflow is to use a version of clang (from the last > major release) to generate test IR fragments. Right now, this is not > possible since IR generated by the previous released clang no longer parses > with TOT.How about going through bitcode, which AFAIK doesn't have that problem? That is, assemble with the previous llvm-as, and disassemble with ToT llvm-dis (or use as is.) - Ahmed> I know we don't generally support forward serialization of IR, but in > practice, it generally works for this type of usage. What do you think? > > Philip > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On 01/06/2015 04:33 PM, Ahmed Bougacha wrote:> On Tue, Jan 6, 2015 at 4:23 PM, Philip Reames <listmail at philipreames.com> wrote: >> Duncan, >> >> I was wondering if you'd be open to making a change in the IR parser to >> accept and ignore 'metadata' keywords in the places they used to be >> required. My common workflow is to use a version of clang (from the last >> major release) to generate test IR fragments. Right now, this is not >> possible since IR generated by the previous released clang no longer parses >> with TOT. > How about going through bitcode, which AFAIK doesn't have that > problem? That is, assemble with the previous llvm-as, and disassemble > with ToT llvm-dis (or use as is.)This would certainly work. There's a number of possible workarounds. I'm not claiming this is any fundamental problem, only that it's slightly tedious and doesn't really cost us anything to fix. (Think about a person new to llvm who runs into this. How are they going to react?)> > - Ahmed > >> I know we don't generally support forward serialization of IR, but in >> practice, it generally works for this type of usage. What do you think? >> >> Philip >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Duncan P. N. Exon Smith
2015-Jan-07 00:58 UTC
[LLVMdev] Thoughts on limited forward serialization?
> On 2015-Jan-06, at 16:23, Philip Reames <listmail at philipreames.com> wrote: > > Duncan, > > I was wondering if you'd be open to making a change in the IR parser to accept and ignore 'metadata' keywords in the places they used to be required. My common workflow is to use a version of clang (from the last major release) to generate test IR fragments. Right now, this is not possible since IR generated by the previous released clang no longer parses with TOT. > > I know we don't generally support forward serialization of IR, but in practice, it generally works for this type of usage. What do you think? > > PhilipI don't like the precedent this would set. There was some discussion on the list already about this, starting with [1]. [1]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-December/079941.html [2]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-December/079958.html I think you'd be better off generating testcases from ToT, or outputting to bitcode and using `llvm-dis` from ToT.