[PATCH] MCObjectSymbolizer

Stephen Checkoway s at pahtak.org
Tue Oct 15 20:28:51 PDT 2013

On Oct 14, 2013, at 8:16 PM, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote:

> By the way, the excessive memory usage is because of two main reasons
> (both are pretty low hanging though):
> - the MCModule keeps an MCInst for every disassembled instruction; I
> have a WIP patch experimenting with optional MCInst uniquing at the
> MCContext level, not sure if there's a better way
> - it also keeps redundant address/size information (see
> include/llvm/MC/MCAtom.h:109). I didn't get around to working on that
> yet.

I have a patch that moves the Address out of the MCDecodedInst (and in fact replaces that with a std::pair<MCInst, unsigned>) by putting the Address in the iterator and updating it as operator++ and operator-- are called. I don't see a way to remove both the Size and Address fields at the same time though. Is there some cheap way to get the size of an MCInst?

Stephen Checkoway

More information about the llvm-commits mailing list