On 11/12/19 9:39 AM, Richard Biener wrote:
On Tue, Nov 12, 2019 at 8:50 AM Martin Liška <mli...@suse.cz> wrote:

On 11/11/19 3:20 PM, Richard Biener wrote:
On Mon, Nov 11, 2019 at 9:23 AM Martin Liška <mli...@suse.cz> wrote:

Hi.

The small patch is about sorting of debug counter
values.

Ready to be installed?

OK

Thanks,
Martin

Hi.

There's a small follow up where I enforce the sorting via a selftest.

Well, it's either a bit over-engineering unless you also make use of this and
optimize

My motivation was to preserve sorted list in -dbg-cnt-list.


   int i;
   for (i = debug_counter_number_of_counters - 1; i >= 0; i--)
     if (strcmp (map[i].name, name) == 0)
       break;

no?

Heh, that can be rewritten to vec::bsearch, but would need to convert 'map'
to a 'vec' type. Or ideally to use a hash_map, but it will probably not pay 
back.

I don't insist on the patch :)

Martin


Ready for trunk?
Thanks,
Martin

Reply via email to