This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH gold/21066] Consider C++ exception handling metadata during ICF
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Joshua Oreman <oremanj at hudson-trading dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Sat, 11 May 2019 07:29:11 +0800
- Subject: Re: [PATCH gold/21066] Consider C++ exception handling metadata during ICF
- References: <CAKKg2YOHOrST5oJ1yik4u3YNsgH=JBYY_7fe5tQcNK8p_YmywQ@mail.gmail.com> <CAJimCsHH94YBQVQSoCJre=OjnstqsgHDZTTVKKAUGOepx6y8mQ@mail.gmail.com> <CAKKg2YNGnB5SD7ov1agui3xtSeEhkQ7sOMtgahjkSEPCe0Bftw@mail.gmail.com> <CAKKg2YPzZTAv=FTT4GzMdT0d=-0DD1=0Dy-sBYfDvSZ9z60JGQ@mail.gmail.com> <CAJimCsE7e-DD-QtdvGkG7BqE7DQNKmfWvpXBozCYa4MFRTGm5A@mail.gmail.com> <CAKKg2YOhWyLuy-wX5BE8B_-2Cys1_a+bp92N+92VNjBwJLAQBg@mail.gmail.com>
> > + typedef std::multimap<Section_id, Extra_identity_info> Extra_identity_list;
> >
> > Should use Unordered_multimap.
>
> I'm less sure about this one. Unordered_multimap does provide
> equal_range(), but it doesn't guarantee the order of the equal
> elements, while std::multimap preserves insertion order among equal
> elements. If the iteration order isn't consistent when iterating the
> extra_identity_list entries for two functions with identical code and
> identical EH metadata, they'll fail to be folded when they could
> otherwise safely be.
I agree with you on this, per my follow-up.
> Thanks! Feel free to update the patch from my notes above if that's
> easiest, or I've attached an updated version against current binutils
> master.
Thanks! I've committed the patch on your behalf.
-cary