This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 12/18] haifa-sched.c: make insn_queue[] a vec<rtx_insn *>
- From: Trevor Saunders <tbsaunde at tbsaunde dot org>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: tbsaunde+gcc at tbsaunde dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Apr 2016 10:17:20 -0400
- Subject: Re: [PATCH 12/18] haifa-sched.c: make insn_queue[] a vec<rtx_insn *>
- Authentication-results: sourceware.org; auth=none
- References: <1461133342-10794-1-git-send-email-tbsaunde+gcc at tbsaunde dot org> <1461133342-10794-13-git-send-email-tbsaunde+gcc at tbsaunde dot org> <571E21C3 dot 40602 at redhat dot com>
On Mon, Apr 25, 2016 at 03:55:15PM +0200, Bernd Schmidt wrote:
> On 04/20/2016 08:22 AM, tbsaunde+gcc@tbsaunde.org wrote:
> >-/* Remove INSN from queue. */
> >+/* Remove INSN at idx from queue. */
> >+static void
> >+queue_remove (unsigned int q, unsigned int idx)
> >+{
> >+ QUEUE_INDEX (insn_queue[q][idx]) = QUEUE_NOWHERE;
> >+ insn_queue[q].ordered_remove (idx);
> >+ q_size--;
>
> I think I'm nacking this one, sorry. I don't think ordered_removes in the
> scheduler queues are going to fly.
So, we're going from a linear walk through a linked list to linear scan
of part of a vector and memcpy of the rest. That's certainly not great,
but the linked list walk doesn't seem great either. Is unordered_remove
here safe? Or do you have some other idea? I guess we could write a
forward_list.
Trev
>
>
> Bernd
>