[PATCH] D54755: [DebugInfo] IR/Bitcode changes for DISubprogram flags

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 26 13:30:57 PST 2018


dblaikie added a comment.





================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1645
   Record.push_back(VE.getMetadataOrNullID(N->getType()));
-  Record.push_back(N->isLocalToUnit());
-  Record.push_back(N->isDefinition());
+  Record.push_back(0); // unused
+  Record.push_back(0); // unused
----------------
probinson wrote:
> aprantl wrote:
> > Am I right in assuming that these dead fields take up virtually no extra space in the bitcode? Otherwise we might want to add an extra bit distinguish old vs. a newer, more compact record layout.
> Each field in Record is 64-bit, so as written this is wasting 24 bytes per DISubprogram in the bitcode. Compressing those out would mean the reader would pretty much have to handle the old/new formats separately, as the indexes of all fields after this one would vary too much to handle cleanly any other way.
> I'm happy to make that change if you think the size is worthwhile.
I don't /think/ that's how the bitcode format works, though, right? I believe it's a more compact encoding than using all 64 bits regardless of the value encoded... but I don't know the specifics/not very sure about it.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54755/new/

https://reviews.llvm.org/D54755





More information about the llvm-commits mailing list