labath added a comment.

In D91241#2422403 <https://reviews.llvm.org/D91241#2422403>, @omjavaid wrote:

> In D91241#2422100 <https://reviews.llvm.org/D91241#2422100>, @labath wrote:
>
>> Looks great. One question about the member variable...
>
> m_remote_to_local_regnum_map is used by AddRegister where we add a 
> (key,value) pair for each of registers. We are doing this to maintain a list 
> of register sorted in increasing order of remote register numbers. This list 
> is then used in Finalize where we are calculating offsets. Keeping this map 
> as member saves us from generating a sorted list of remote register numbers.

Yes, but there's no reason that this _must_ be done in AddRegister, is there?

You could just build a local map directly inside the finalize function, right?


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

https://reviews.llvm.org/D91241

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to