public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: debug-early branch merged into mainline
Date: Tue, 09 Jun 2015 08:08:00 -0000	[thread overview]
Message-ID: <CAFiYyc3cjqK-5xD0mboRE88-U9j2+429ok7F=GLwq_orRV3f_Q@mail.gmail.com> (raw)
In-Reply-To: <5575FA44.1000708@redhat.com>

On Mon, Jun 8, 2015 at 10:25 PM, Aldy Hernandez <aldyh@redhat.com> wrote:
> On 06/08/2015 02:59 PM, Richard Biener wrote:
>>
>> On June 8, 2015 7:14:19 PM GMT+02:00, Aldy Hernandez <aldyh@redhat.com>
>> wrote:
>>>
>>> On 06/08/2015 09:30 AM, Richard Biener wrote:
>>>>
>>>> On Mon, Jun 8, 2015 at 2:05 PM, Aldy Hernandez <aldyh@redhat.com>
>>>
>>> wrote:
>>>>>
>>>>> On 06/08/2015 04:26 AM, Richard Biener wrote:
>>>>>>
>>>>>>
>>>>>> On Mon, Jun 8, 2015 at 3:23 AM, Aldy Hernandez <aldyh@redhat.com>
>
>
>>> What about if the comparison routine gets a named section and an
>>> unnamed
>>> section?  How to compare?  That's why I was giving priority to one over
>>>
>>> the other originally, but I didn't know about problematic qsort
>>> implementations.
>>
>>
>> Obviously unnamed and a named section can be sorted like you did in the
>> original patch.
>
>
> Obviously I'm not understanding :).
>
> How about this?

Ok with adding

v.create (object_block_htab->elements ());

and using v.quick_push () (avoids re-allocations)

and with adding a

v.release ();

at the end of the function.  And re-writing

+  return f1 < f2 ? -1 : (f1 > f2 ? 1 : 0);

to

   if (f1 == f2)
     return 0;
   return f1 < f2 ? -1 : 1;

Thanks,
Richard.

> Tested on x86-64 and ppc64le.
>
> Aldy

  reply	other threads:[~2015-06-09  8:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5571F319.205@redhat.com>
     [not found] ` <m2k2vf253a.fsf@linux-m68k.org>
2015-06-07 13:08   ` [patch] fix _OBJC_Module defined but not used warning Aldy Hernandez
2015-06-07 14:37     ` Andreas Schwab
2015-06-08  8:05     ` Iain Sandoe
2015-06-08 10:27       ` Aldy Hernandez
     [not found] ` <m2sia5p3ne.fsf@linux-m68k.org>
     [not found]   ` <55745D42.1000709@redhat.com>
     [not found]     ` <EC191B3F-2503-4979-8C6E-FD8868C3AD84@gmail.com>
     [not found]       ` <55746A85.8010208@redhat.com>
     [not found]         ` <B1EA82B7-CC5D-430B-88ED-00649931ADF8@gmail.com>
2015-06-08  4:18           ` debug-early branch merged into mainline Aldy Hernandez
2015-06-08  8:45             ` Richard Biener
2015-06-08 12:05               ` Aldy Hernandez
2015-06-08 13:32                 ` Richard Biener
2015-06-08 17:29                   ` Aldy Hernandez
2015-06-08 19:24                     ` Richard Biener
2015-06-08 20:33                       ` Aldy Hernandez
2015-06-09  8:08                         ` Richard Biener [this message]
2015-06-09  9:47                           ` Aldy Hernandez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFiYyc3cjqK-5xD0mboRE88-U9j2+429ok7F=GLwq_orRV3f_Q@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).