Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mat-dev] Concurrent Dominator Tree Creation

The Dominator Tree is generated using depth-first search.  This means there is some data structure tracking which objects were visited.  This data structure might be able to be replaced with a concurrent one.  When a thread visits an object, all the children can be pushed into the front of a ConcurrentLinkedDequeue.  The thread always pushes and pops from the front of the dequeue.  This effectively makes the ConcurrentLinkedDequeue like a stack for that thread. If the thread finds its dequeue empty, then it tries to pop from the end of the other thread's dequeues.  Using dequeues instead of stacks allows for using ConcurrentLinkedDequeue and avoids lock contention.  Please enlighten me why this is not done.

Back to the top