<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 27, 2020 at 6:42 AM Robinson, Paul via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-9177320278490164258WordSection1">
<p class="MsoNormal">Older releases are still available for download at <a href="http://releases.llvm.org" target="_blank">releases.llvm.org</a>; I believe the 3.0 release was supposed to be able to read 2.x bitcode, so you should be able to upgrade the bitcode with 3.0 tools and proceed from there.  I *<b>think</b>*
 everything since 3.0 is still readable by current tools.</p></div></div></blockquote><div><br></div><div>Yes this is the process: use LLVM 3.0 to upgrade older bitcode to 3.0 format, and then 3.1 and above can load .bc files from 3.0.</div><div>The textual .ll files don't have any support across version though, only the .bc.</div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_-9177320278490164258WordSection1"><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The project generally has not favored indefinite backward compatibility.  There have not been any major bitcode format changes since then, so there has been little motivation to declare another compatibility break.  Being able to read 9-year-old
 bitcode does not seem like a valuable feature, given the above workaround.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Let me say, though, that I fully support efforts to review and address old bugs.  The LLVM project as a whole fixes (or otherwise closes) only about 2/3 of reported bugs.  Improving that statistic would be very nice.<u></u><u></u></p>
<p class="MsoNormal">--paulr<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-style:none none none solid;border-left-width:1.5pt;border-left-color:blue;padding:0in 0in 0in 4pt">
<div>
<div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(225,225,225);padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>> <b>On Behalf Of
</b>Ehud Katz via llvm-dev<br>
<b>Sent:</b> Monday, April 27, 2020 3:52 AM<br>
<b>To:</b> Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>><br>
<b>Cc:</b> llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject:</b> Re: [llvm-dev] Backward compatibility of LLVM IR - ll/bc files<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">I admit I didn't know about that, but that is because I am handling a lot of
<b>old</b> bugs, older than LLVM version 3.0.<u></u><u></u></p>
<div>
<p class="MsoNormal">Version 3.0 has been released in Dec 1st 2011, and there are still many bugs open from before that point.<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">The current BC Reader can't parse files produced by LLVM version 2.9 and below (I've checked).<u></u><u></u></p>
<div>
<p class="MsoNormal">So, I wonder if there is anyone in favor, against (, or just doesn't care) for supporting those versions?<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Apr 27, 2020 at 8:18 AM Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">I thought the binary bitcode reader was backwards compatible already. That's what is documented here <a href="https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility" target="_blank">https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility</a><u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">~Craig<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Sun, Apr 26, 2020 at 9:29 PM Ehud Katz via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Quite often I get to work on an old bug, where an old ll/bc file is attached as a testcase. These files, in most cases (if not all), need to be converted somehow to the latest format, for the trunk version to be able to parse it without
 an error.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">So a few questions arise:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">1. Is there a standard way to convert an old ll/bc to the latest? If not, what is the common approach for these cases?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">2. If there is no such tool, should we have one? (I think we should, of course.)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">3. What about automatically let the ll and bc Readers do the conversion (internally)? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">4. What about versions? Is there an RFC (probably old) for ll/bc file versioning? (I know there is an optional record for version in the bc file format, but it is not really utilized.)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Cheers,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Ehud.<u></u><u></u></p>
</div>
<p class="MsoNormal">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><u></u><u></u></p>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>