[LLVMdev] [RFC] Somewhat unrelated code in lib/MC

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Jun 28 22:25:33 PDT 2014


Now with a compressed patch. Sorry for the duplication.

Working on another patch I noticed quiet a bit of code in lib/MC that
uses MC types, but is not used by MC itself or by any MC clients other
than llvm-objdump.

As an experiment to see how big this was, I created a MC2 library
(patch attached).  The results are interesting. In a Release+Asserts
shared build I get

811464 lib/libLLVMMC.so
272296 lib/libLLVMMCParser.so
152744 lib/libLLVMMC2.so
61248  lib/libLLVMMCJIT.so
22008  lib/libLLVMMCDisassembler.so

Note how the new library is the third largest.

Now, what is this code? From the the commit messages it looks like it
is for "fancy" disassembly with CFG reconstruction. Is it
complementary to the existing MCDisassembler library? Should the code
be moved there instead? Should we have a MCDisassemblerCFG library?

Splitting this library would also make it trivial to remove the MC ->
Object dependency.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch.bz2
Type: application/x-bzip2
Size: 22829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140629/d7fbd46a/attachment.bin>


More information about the llvm-dev mailing list