]> git.ipfire.org Git - thirdparty/gcc.git/commit
Implement coalesce list with hash table instead of linked list.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 30 Nov 2006 21:36:32 +0000 (21:36 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Thu, 30 Nov 2006 21:36:32 +0000 (21:36 +0000)
commit9fa2efcd3d3adb1eac151d510ef2c8dd1799b4a0
tree846178c38c493762bf802c9fd5ce7f67e1f92d30
parentf7b410e0fbe76b707f76381f7dd684171353d1a9
Implement coalesce list with hash table instead of linked list.

* tree-ssa-live.c (create_coalesce_list): Create a hash table.
(COALESCE_HASH_FN): New.  Define hash function.
(partition_pair_map_hash): New.  Hash value for a partition pair.
(partition_pair_map_eq): New.  Equality for hash pairs.
(create_coalesce_list): Create hash table.
(delete_coalesce_list): Free hash table.
(find_partition_pair): Find/create pairs in hash table.
(compare_pairs):  Sort pairs in ascending order now.
(num_coalesce_pairs): New.  Number of pairs in hash table.
(struct partition_pair_iterator): Iterator struct for pair table.
(first_partition_pair): Iterator function for first pair.
(end_partition_pair_p): Iterator function for end of iteration.
(next_partition_pair): Iterator function for next pair.
(FOR_EACH_PARTITION_PAIR): Macro for iterating over pairs.
(sort_coalesce_list): Sort pairs from hash table into an array.
(pop_best_coalesce): Take pairs from the array.
(dump_coalesce_list): Update to use hash table or sorted array.
* tree-ssa-live.h (struct partition_pair_d): Remove next field.
(struct coalesce_list_d): Add hash table related fields.

From-SVN: r119378
gcc/ChangeLog
gcc/tree-ssa-live.c
gcc/tree-ssa-live.h