]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/fibonacci_heap.h
Add pool_allocator for fibonaci heaps.
authorJan Hubicka <jh@suse.cz>
Wed, 20 Nov 2019 15:04:34 +0000 (16:04 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 20 Nov 2019 15:04:34 +0000 (15:04 +0000)
commit516fd7cedb025b09000563cdba6214461621400d
tree61c772013cc91032ba6dcdcaffd99445d40bd10b
parentf6fbdc385ae9fd3f07b2f5fe8b7fe2a134622be7
Add pool_allocator for fibonaci heaps.

* fibonacci_heap.h (fibonacci_heap<K,V>::fibonacci_heap):
Add allocator parameter.
(fibonacci_heap<K,V>::~fibonacci_heap): Optimize destruction.
(fibonacci_heap<K,V>::m_allocator): New.
(fibonacci_heap<K,V>::m_own_allocator): New.
(fibonacci_heap<K,V>::insert): Use allocator.
(fibonacci_heap<K,V>::extract_min): Likewise.
(fibonacci_heap<K,V>::union_with): Assert that both heaps share
allocator.
(fibonacci_heap<K,V>::consolidate): Allocate constant sized vector
on stack.
* fibonacci_heap.c: Include alloc-pool
(test_empty_heap): Initialize allocator.
(test_union): Likewise.
* bb-reorder.c: Include alloc-pool.h.
* tracer.c: Inlclude alloc-pool.h.

From-SVN: r278501
gcc/ChangeLog
gcc/bb-reorder.c
gcc/fibonacci_heap.c
gcc/fibonacci_heap.h
gcc/tracer.c