[PATCH] MCObjectSymbolizer

Stephen Checkoway s at pahtak.org
Wed Oct 16 14:43:29 PDT 2013


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

> On Wed, Oct 16, 2013 at 5:28 AM, Stephen Checkoway <s at pahtak.org> wrote:
>> 
>> 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?
> 
> I don't think so, you do need to have one of them.


Okay, thanks. Once the other patches reducing the memory size land, I'll send out this one.

-- 
Stephen Checkoway









More information about the llvm-commits mailing list