This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: debug-early branch merged into mainline
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 9 Jun 2015 10:00:38 +0200
- Subject: Re: debug-early branch merged into mainline
- Authentication-results: sourceware.org; auth=none
- References: <5571F319 dot 205 at redhat dot com> <m2sia5p3ne dot fsf at linux-m68k dot org> <55745D42 dot 1000709 at redhat dot com> <EC191B3F-2503-4979-8C6E-FD8868C3AD84 at gmail dot com> <55746A85 dot 8010208 at redhat dot com> <B1EA82B7-CC5D-430B-88ED-00649931ADF8 at gmail dot com> <5574EE9C dot 4070908 at redhat dot com> <CAFiYyc0902w4QL0aXaRjzjRuPd6D8ZKLkBPD4W=v9vYoe_=qqg at mail dot gmail dot com> <55758510 dot 6020106 at redhat dot com> <CAFiYyc1ugx4f+WNVy7j4ePtUcrXR=ZdaCVWXxjd7QPoy9XvEYQ at mail dot gmail dot com> <5575CD6B dot 6000205 at redhat dot com> <8718EC9E-01D8-4817-983B-147E32BCEBE5 at gmail dot com> <5575FA44 dot 1000708 at redhat dot 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