[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...

Chris Lattner clattner at apple.com
Wed Oct 10 21:59:05 PDT 2012

On Oct 10, 2012, at 5:10 PM, Jan Voung <jvoung at chromium.org> wrote:

> Thanks for the review Rafael!
> Chris, did you want to take a look at the patch too?

Your most recent patch looks good to me, with a minor change:

+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -33,6 +33,13 @@
 using namespace llvm;
 static cl::opt<bool>
+                      cl::desc("Assign instruction operand IDs with the older "
+                               "absolute encoding instead of using "
+                               "relative IDs."),
+                      cl::init(false), cl::Hidden);

Please remove this, the new writer should just always generate the relative encoding.  Please feel free to land the patch with this change.

Also, this is a significant enough thing that it would be good to add something to the bitcode docs (in the IR section, http://llvm.org/docs/BitCodeFormat.html#llvm-ir-encoding) that describes the old and new format.

Thanks again for tackling this!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121010/303678d1/attachment.html>

More information about the llvm-dev mailing list