[PATCH gold/21066] Consider C++ exception handling metadata during ICF

Cary Coutant ccoutant@gmail.com
Fri May 10 23:29:00 GMT 2019


> > +  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



More information about the Binutils mailing list