This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 12/18] haifa-sched.c: make insn_queue[] a vec<rtx_insn *>


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
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]