On Mon, Apr 25, 2016 at 03:55:15PM +0200, Bernd Schmidt wrote:
> On 04/20/2016 08:22 AM, tbsaunde+...@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
> 

Reply via email to