[llvm] [MC][NFC] Use std::map for AddressProbesMap (PR #99553)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 11:09:16 PDT 2024


aaupov wrote:

> > AddressProbesMap is keyed by binary addresses, and it makes sense to treat them as ordered.
> 
> @aaupov this comment doesn't make sense. unordered_map is faster, and it was intentional. Order wasn't needed.

Sorry, the wording wasn't ideal. I was trying to convey that addresses can be treated as ordered keys (unlike e.g. GUIDs), which allows certain lookups as in the follow-up diff.

> 
> The intention of this patch is only obvious with the other patch that uses the map, so it'd be better to merge the two in one patch.

I see your point, but I tried to explain the intention in the message. I applied the usual logic of keeping changes small and isolated, but perhaps in this case the changes were best left coupled.

https://github.com/llvm/llvm-project/pull/99553


More information about the llvm-commits mailing list