[PATCH] MCObjectSymbolizer

Ahmed Bougacha ahmed.bougacha at gmail.com
Wed Oct 16 14:38:22 PDT 2013


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.

- Ahmed

> --
> Stephen Checkoway
>
>
>




More information about the llvm-commits mailing list